diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs index d50e4cf5269..e750c2963dd 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs @@ -129,7 +129,8 @@ pub fn find(build: &mut Build) { set_compiler(&mut cfg, Language::CPlusPlus, target, config, build); true } else { - false + // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars). + cfg.try_get_compiler().is_ok() }; // for VxWorks, record CXX compiler which will be used in lib.rs:linker() diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 33e85dc5e2a..6c2c05ac719 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1202,7 +1202,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the // Only pass correct values for these flags for the `run-make` suite as it // requires that a C++ compiler was configured which isn't always the case. - if !builder.config.dry_run && suite == "run-make-fulldeps" { + if !builder.config.dry_run && matches!(suite, "run-make" | "run-make-fulldeps") { cmd.arg("--cc") .arg(builder.cc(target)) .arg("--cxx") diff --git a/src/test/run-make-fulldeps/issue-36710/Makefile b/src/test/run-make/issue-36710/Makefile similarity index 57% rename from src/test/run-make-fulldeps/issue-36710/Makefile rename to src/test/run-make/issue-36710/Makefile index 4f93d97636e..b7bf366c918 100644 --- a/src/test/run-make-fulldeps/issue-36710/Makefile +++ b/src/test/run-make/issue-36710/Makefile @@ -1,6 +1,6 @@ --include ../tools.mk +include ../../run-make-fulldeps/tools.mk -# ignore-musl +# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64) all: foo $(call RUN,foo) diff --git a/src/test/run-make-fulldeps/issue-36710/foo.cpp b/src/test/run-make/issue-36710/foo.cpp similarity index 100% rename from src/test/run-make-fulldeps/issue-36710/foo.cpp rename to src/test/run-make/issue-36710/foo.cpp diff --git a/src/test/run-make-fulldeps/issue-36710/foo.rs b/src/test/run-make/issue-36710/foo.rs similarity index 100% rename from src/test/run-make-fulldeps/issue-36710/foo.rs rename to src/test/run-make/issue-36710/foo.rs