From 74d1520c22943a0306c856c1fb873826c3c0760f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 3 May 2016 09:34:35 -0700 Subject: [PATCH] mk: Pass CFLAGS for target, not host This changes the CFLAGS and related variables passed to compiletest to be passed for the target, not the host, so we can correctly test 32-bit cross compiles on 64-bit host machines. Hopefuly fixes #33379 --- mk/tests.mk | 10 +++++----- src/tools/compiletest/src/runtest.rs | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mk/tests.mk b/mk/tests.mk index 9d45203b7b6..90a7888af09 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -636,11 +636,11 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \ --host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \ --lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \ --target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \ - --cc '$$(CC_$(3))' \ - --cxx '$$(CXX_$(3))' \ - --cflags "$$(CFG_GCCISH_CFLAGS_$(3))" \ - --llvm-components "$$(LLVM_ALL_COMPONENTS_$(3))" \ - --llvm-cxxflags "$$(LLVM_CXXFLAGS_$(3))" \ + --cc '$$(CC_$(2))' \ + --cxx '$$(CXX_$(2))' \ + --cflags "$$(CFG_GCCISH_CFLAGS_$(2))" \ + --llvm-components "$$(LLVM_ALL_COMPONENTS_$(2))" \ + --llvm-cxxflags "$$(LLVM_CXXFLAGS_$(2))" \ $$(CTEST_TESTARGS) ifdef CFG_VALGRIND_RPASS diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index fb296d57ebf..acaec0b5199 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2063,6 +2063,11 @@ fn run_incremental_test(config: &Config, props: &TestProps, testpaths: &TestPath } fn run_rmake_test(config: &Config, _props: &TestProps, testpaths: &TestPaths) { + // FIXME(#11094): we should fix these tests + if config.host != config.target { + return + } + let cwd = env::current_dir().unwrap(); let src_root = config.src_base.parent().unwrap().parent().unwrap() .parent().unwrap();