Skip to content

Commit 3781120

Browse files
authored
Rollup merge of #104245 - kubycsolutions:master, r=jyn514
Reduce default configuration's dependency upon static libstdcpp library (#103606) Fixes #103606 Remove default dependency on static libstdcpp except during dist llvm builds (where we want static libraries so `libLLVM.so` is self-contained).
2 parents 6026785 + b8edf02 commit 3781120

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

config.toml.example

+4-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ changelog-seen = 2
8787
# this flag will indicate that this version check should not be done.
8888
#version-check = true
8989

90-
# Link libstdc++ statically into the rustc_llvm instead of relying on a
91-
# dynamic version to be available.
92-
#static-libstdcpp = true
90+
# When true, link libstdc++ statically into the rustc_llvm.
91+
# This is useful if you don't want to use the dynamic version of that
92+
# library provided by LLVM.
93+
#static-libstdcpp = false
9394

9495
# Whether to use Ninja to build LLVM. This runs much faster than make.
9596
#ninja = true

src/bootstrap/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ impl Config {
781781
config.llvm_optimize = true;
782782
config.ninja_in_file = true;
783783
config.llvm_version_check = true;
784-
config.llvm_static_stdcpp = true;
784+
config.llvm_static_stdcpp = false;
785785
config.backtrace = true;
786786
config.rust_optimize = true;
787787
config.rust_optimize_tests = true;

src/ci/run.sh

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ else
123123
# (And PGO is its own can of worms).
124124
if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then
125125
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-available"
126+
else
127+
# When building for CI we want to use the static C++ Standard library
128+
# included with LLVM, since a dynamic libstdcpp may not be available.
129+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp"
126130
fi
127131
fi
128132

0 commit comments

Comments
 (0)