Skip to content

Commit e963cfd

Browse files
committed
Run tests with LD_LIBRARY_PATH set to the target libs, not the host libs
Setting it to the host libs uses those compiled from the previous stage
1 parent edf2622 commit e963cfd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CFG_TESTLIB=$(CFG_BUILD_DIR)/$(strip \
8989
stage2/lib, \
9090
$(if $(findstring stage3,$(1)), \
9191
stage3/lib, \
92-
)))))
92+
)))))/rustc/$(CFG_HOST_TRIPLE)/lib
9393

9494
ifdef CFG_UNIXY
9595
CFG_INFO := $(info cfg: unix-y environment)

mk/tests.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ test/rustctest.stage$(1)$$(X): \
160160

161161
check-stage$(1)-rustc-dummy: test/rustctest.stage$(1)$$(X)
162162
@$$(call E, run: $$<)
163-
$$(Q)$$(call CFG_RUN,$$(HOST_LIB$(1)),$$(CFG_VALGRIND) $$<) \
163+
$$(Q)$$(call CFG_RUN_TEST,$$<) \
164164
$$(TESTARGS)
165165

166166

@@ -286,11 +286,12 @@ test/$(FT).rc test/$(FT_DRIVER).rs: $(TEST_RPASS_SOURCES_STAGE2) \
286286
@$(call E, check: building combined stage2 test runner)
287287
$(Q)$(S)src/etc/combine-tests.py
288288

289-
stage2/lib/$(FT_LIB): test/$(FT).rc $(SREQ2$(CFG_HOST_TRIPLE))
289+
$(TARGET_HOST_LIB2)/$(FT_LIB): test/$(FT).rc $(SREQ2$(CFG_HOST_TRIPLE))
290290
@$(call E, compile_and_link: $@)
291291
$(STAGE2) --lib -o $@ $<
292292

293-
test/$(FT_DRIVER)$(X): test/$(FT_DRIVER).rs $(HOST_LIB2)/$(FT_LIB) $(SREQ2$(CFG_HOST_TRIPLE))
293+
test/$(FT_DRIVER)$(X): test/$(FT_DRIVER).rs $(TARGET_HOST_LIB2)/$(FT_LIB) \
294+
$(SREQ2$(CFG_HOST_TRIPLE))
294295
@$(call E, compile_and_link: $@)
295296
$(STAGE2) -L $(HOST_LIB2) -o $@ $<
296297

0 commit comments

Comments
 (0)