statically link the tools to libstdc++

This commit is contained in:
Jorge Aparicio 2018-05-01 06:34:24 +02:00
parent a1ef529703
commit 8e673073f3
1 changed files with 5 additions and 0 deletions

View File

@ -174,6 +174,11 @@ impl Step for Llvm {
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
}
// For distribution we want the LLVM tools to be *statically* linked to libstdc++
if builder.config.ship_llvm_tools {
cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-Bsymbolic -static-libstdc++");
}
if target.contains("msvc") {
cfg.define("LLVM_USE_CRT_DEBUG", "MT");
cfg.define("LLVM_USE_CRT_RELEASE", "MT");