Skip to content

Commit

Permalink
Rollup merge of #104245 - kubycsolutions:master, r=jyn514
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Dylan-DPC authored Nov 11, 2022
2 parents 6026785 + b8edf02 commit 3781120
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ changelog-seen = 2
# this flag will indicate that this version check should not be done.
#version-check = true

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

# Whether to use Ninja to build LLVM. This runs much faster than make.
#ninja = true
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ impl Config {
config.llvm_optimize = true;
config.ninja_in_file = true;
config.llvm_version_check = true;
config.llvm_static_stdcpp = true;
config.llvm_static_stdcpp = false;
config.backtrace = true;
config.rust_optimize = true;
config.rust_optimize_tests = true;
Expand Down
4 changes: 4 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ else
# (And PGO is its own can of worms).
if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-available"
else
# When building for CI we want to use the static C++ Standard library
# included with LLVM, since a dynamic libstdcpp may not be available.
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp"
fi
fi

Expand Down

0 comments on commit 3781120

Please sign in to comment.