diff options
| author | bors <bors@rust-lang.org> | 2019-04-27 19:53:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-27 19:53:00 +0000 |
| commit | 938d4ffe16c4430e1dcede570b06227114cb73d5 (patch) | |
| tree | fa28d3d796d0ae584c9fac54c782ec9aa7c5a9fa /src/rustllvm/PassWrapper.cpp | |
| parent | a9c8c08ecb6740be5c0beaf94bbcc7c580eefec4 (diff) | |
| parent | b4131e297e18fde119f6f461b3e622218166b009 (diff) | |
| download | rust-938d4ffe16c4430e1dcede570b06227114cb73d5.tar.gz rust-938d4ffe16c4430e1dcede570b06227114cb73d5.zip | |
Auto merge of #60313 - cuviper:thinlto-import, r=alexcrichton
Limit internalization in LLVM 8 ThinLTO Fixes #60184. r? @alexcrichton
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 319c66a21f1..0ebef82d376 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -873,8 +873,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, return PrevailingType::Unknown; }; #if LLVM_VERSION_GE(8, 0) + // We don't have a complete picture in our use of ThinLTO, just our immediate + // crate, so we need `ImportEnabled = false` to limit internalization. + // Otherwise, we sometimes lose `static` values -- see #60184. computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols, - deadIsPrevailing, /* ImportEnabled = */ true); + deadIsPrevailing, /* ImportEnabled = */ false); #else computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing); #endif |
