Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: untangle static-libstdcpp & llvm-tools #94832

Merged
merged 1 commit into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ changelog-seen = 2

# Link libstdc++ statically into the rustc_llvm instead of relying on a
# dynamic version to be available.
#static-libstdcpp = false
#static-libstdcpp = true

# Whether to use Ninja to build LLVM. This runs much faster than make.
#ninja = true
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ impl Config {
config.llvm_optimize = true;
config.ninja_in_file = true;
config.llvm_version_check = true;
config.llvm_static_stdcpp = true;
config.backtrace = true;
config.rust_optimize = true;
config.rust_optimize_tests = true;
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ fn configure_cmake(

// For distribution we want the LLVM tools to be *statically* linked to libstdc++.
// We also do this if the user explicitly requested static libstdc++.
if builder.config.llvm_tools_enabled || builder.config.llvm_static_stdcpp {
if builder.config.llvm_static_stdcpp {
if !target.contains("msvc") && !target.contains("netbsd") {
if target.contains("apple") {
ldflags.push_all("-static-libstdc++");
Expand Down