Skip to content

Commit 27f6007

Browse files
committed
Auto merge of #55835 - alexcrichton:llvm-upgrade, r=<try>
Upgrade LLVM to trunk, still version 8 This commit upgrades the LLVM/LLD/compiler-rt submodules used to the current trunk versions in upstream. Some activity has happened on the wasm SIMD side of things as well as LLD which we'd like to pick up!
2 parents 36a50c2 + 67053e5 commit 27f6007

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

src/librustc_codegen_utils/linker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,11 @@ impl<'a> Linker for WasmLd<'a> {
10851085
// indicative of bugs, let's prevent them.
10861086
self.cmd.arg("--fatal-warnings");
10871087

1088+
// LLD only implements C++-like demangling, which doesn't match our own
1089+
// mangling scheme. Tell LLD to not demangle anything and leave it up to
1090+
// us to demangle these symbols later.
1091+
self.cmd.arg("--no-demangle");
1092+
10881093
let mut cmd = Command::new("");
10891094
::std::mem::swap(&mut cmd, &mut self.cmd);
10901095
cmd

src/llvm

Submodule llvm updated 4618 files

src/rustllvm/PassWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
953953
GlobalValue::LinkageTypes NewLinkage) {
954954
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
955955
};
956+
#if LLVM_VERSION_GE(8, 0)
957+
thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
958+
#else
956959
thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
960+
#endif
957961

958962
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
959963
// callback below. This callback below will dictate the linkage for all
@@ -1016,7 +1020,11 @@ extern "C" bool
10161020
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
10171021
Module &Mod = *unwrap(M);
10181022
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
1023+
#if LLVM_VERSION_GE(8, 0)
1024+
thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
1025+
#else
10191026
thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
1027+
#endif
10201028
return true;
10211029
}
10221030

src/rustllvm/RustWrapper.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,11 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
796796
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
797797
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
798798
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
799-
InitExpr, unwrapDIPtr<MDNode>(Decl), AlignInBits);
799+
InitExpr, unwrapDIPtr<MDNode>(Decl),
800+
#if LLVM_VERSION_GE(8, 0)
801+
/* templateParams */ nullptr,
802+
#endif
803+
AlignInBits);
800804

801805
InitVal->setMetadata("dbg", VarExpr);
802806

src/tools/lld

Submodule lld updated 372 files

0 commit comments

Comments
 (0)