Skip to content

Commit 6bfb46e

Browse files
committed
Auto merge of #55835 - alexcrichton:llvm-upgrade, r=nikomatsakis
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 b51632e + 7215963 commit 6bfb46e

File tree

7 files changed

+30
-7
lines changed

7 files changed

+30
-7
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ matrix:
3030

3131
- env: >
3232
RUST_CHECK_TARGET=dist
33-
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb --set rust.jemalloc"
33+
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --set rust.jemalloc"
3434
SRC=.
3535
DEPLOY_ALT=1
3636
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -87,7 +87,7 @@ matrix:
8787
# OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
8888
- env: >
8989
RUST_CHECK_TARGET=dist
90-
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc"
90+
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --set rust.jemalloc"
9191
SRC=.
9292
DEPLOY=1
9393
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -102,7 +102,7 @@ matrix:
102102
103103
- env: >
104104
RUST_CHECK_TARGET=dist
105-
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --enable-lldb --set rust.jemalloc"
105+
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc"
106106
SRC=.
107107
DEPLOY=1
108108
RUSTC_RETRY_LINKER_ON_SEGFAULT=1

src/librustc_codegen_ssa/back/linker.rs

+11
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,17 @@ impl<'a> Linker for WasmLd<'a> {
10371037
// indicative of bugs, let's prevent them.
10381038
self.cmd.arg("--fatal-warnings");
10391039

1040+
// The symbol visibility story is a bit in flux right now with LLD.
1041+
// It's... not entirely clear to me what's going on, but this looks to
1042+
// make everything work when `export_symbols` isn't otherwise called for
1043+
// things like executables.
1044+
self.cmd.arg("--export-dynamic");
1045+
1046+
// LLD only implements C++-like demangling, which doesn't match our own
1047+
// mangling scheme. Tell LLD to not demangle anything and leave it up to
1048+
// us to demangle these symbols later.
1049+
self.cmd.arg("--no-demangle");
1050+
10401051
::std::mem::replace(&mut self.cmd, Command::new(""))
10411052
}
10421053

src/llvm

Submodule llvm updated 4618 files

src/rustllvm/PassWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
922922
GlobalValue::LinkageTypes NewLinkage) {
923923
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
924924
};
925+
#if LLVM_VERSION_GE(8, 0)
926+
thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
927+
#else
925928
thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
929+
#endif
926930

927931
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
928932
// callback below. This callback below will dictate the linkage for all
@@ -977,7 +981,11 @@ extern "C" bool
977981
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
978982
Module &Mod = *unwrap(M);
979983
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
984+
#if LLVM_VERSION_GE(8, 0)
985+
thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
986+
#else
980987
thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
988+
#endif
981989
return true;
982990
}
983991

src/rustllvm/RustWrapper.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,11 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
708708
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
709709
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
710710
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
711-
InitExpr, unwrapDIPtr<MDNode>(Decl), AlignInBits);
711+
InitExpr, unwrapDIPtr<MDNode>(Decl),
712+
#if LLVM_VERSION_GE(8, 0)
713+
/* templateParams */ nullptr,
714+
#endif
715+
AlignInBits);
712716

713717
InitVal->setMetadata("dbg", VarExpr);
714718

src/tools/lld

Submodule lld updated 372 files

0 commit comments

Comments
 (0)