diff options
| author | bors <bors@rust-lang.org> | 2019-01-08 16:47:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-08 16:47:27 +0000 |
| commit | 2cb7cdcb3681c131cd2e2472c6fa9b42194b85b5 (patch) | |
| tree | 1b941fc09422193391c503f59b2a7bc990c35fe4 | |
| parent | b8c8f0bdf62728198696cab7d00a8fdc3ee381d3 (diff) | |
| parent | d58555323ff5b6aaf7b95876f256a6f1d2fe0e03 (diff) | |
| download | rust-2cb7cdcb3681c131cd2e2472c6fa9b42194b85b5.tar.gz rust-2cb7cdcb3681c131cd2e2472c6fa9b42194b85b5.zip | |
Auto merge of #57429 - alexcrichton:fix-dist, r=Mark-Simulacrum
Build LLVM with -static-libstdc++ on dist builds This commit is intended on fixing a regression from #57286 where the distributed LLVM shared library unfortunately depends on a dynamic copy of libstdc++, meaning we're no longer as binary compatible as we thought! This tweaks the build of LLVM as out distribution is slightly different now, and is hoped to fix the issue. Closes #57426
| -rw-r--r-- | src/bootstrap/native.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index c548d7f6948..7ddfc385fc0 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -235,7 +235,7 @@ impl Step for Llvm { cfg.define("PYTHON_EXECUTABLE", python); } - configure_cmake(builder, target, &mut cfg, false); + configure_cmake(builder, target, &mut cfg); // FIXME: we don't actually need to build all LLVM tools and all LLVM // libraries here, e.g., we just want a few components and a few @@ -277,8 +277,7 @@ fn check_llvm_version(builder: &Builder, llvm_config: &Path) { fn configure_cmake(builder: &Builder, target: Interned<String>, - cfg: &mut cmake::Config, - building_dist_binaries: bool) { + cfg: &mut cmake::Config) { if builder.config.ninja { cfg.generator("Ninja"); } @@ -363,10 +362,11 @@ fn configure_cmake(builder: &Builder, cfg.build_arg("-j").build_arg(builder.jobs().to_string()); cfg.define("CMAKE_C_FLAGS", builder.cflags(target, GitRepo::Llvm).join(" ")); let mut cxxflags = builder.cflags(target, GitRepo::Llvm).join(" "); - if building_dist_binaries { - if builder.config.llvm_static_stdcpp && !target.contains("windows") { - cxxflags.push_str(" -static-libstdc++"); - } + if builder.config.llvm_static_stdcpp && + !target.contains("windows") && + !target.contains("netbsd") + { + cxxflags.push_str(" -static-libstdc++"); } cfg.define("CMAKE_CXX_FLAGS", cxxflags); if let Some(ar) = builder.ar(target) { @@ -431,7 +431,7 @@ impl Step for Lld { t!(fs::create_dir_all(&out_dir)); let mut cfg = cmake::Config::new(builder.src.join("src/tools/lld")); - configure_cmake(builder, target, &mut cfg, true); + configure_cmake(builder, target, &mut cfg); // This is an awful, awful hack. Discovered when we migrated to using // clang-cl to compile LLVM/LLD it turns out that LLD, when built out of |
