Skip to content

Commit 8e67307

Browse files
committed
statically link the tools to libstdc++
1 parent a1ef529 commit 8e67307

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/native.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ impl Step for Llvm {
174174
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
175175
}
176176

177+
// For distribution we want the LLVM tools to be *statically* linked to libstdc++
178+
if builder.config.ship_llvm_tools {
179+
cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-Bsymbolic -static-libstdc++");
180+
}
181+
177182
if target.contains("msvc") {
178183
cfg.define("LLVM_USE_CRT_DEBUG", "MT");
179184
cfg.define("LLVM_USE_CRT_RELEASE", "MT");

0 commit comments

Comments
 (0)