-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b52f35e
commit b9e7551
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 2eeaf61e374..640e492cc15 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -897,7 +897,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT CMAKE_HOST_SYSTEM_NAME STREQ | ||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
set(SWIFT_USE_LINKER_default "") | ||
else() | ||
- set(SWIFT_USE_LINKER_default "gold") | ||
+ set(SWIFT_USE_LINKER_default "lld") | ||
endif() | ||
set(SWIFT_USE_LINKER ${SWIFT_USE_LINKER_default} CACHE STRING | ||
"Build Swift with a non-default linker") | ||
diff --git a/lib/Driver/UnixToolChains.cpp b/lib/Driver/UnixToolChains.cpp | ||
index 61498c144a2..f9f540ec144 100644 | ||
--- a/lib/Driver/UnixToolChains.cpp | ||
+++ b/lib/Driver/UnixToolChains.cpp | ||
@@ -125,14 +125,14 @@ std::string toolchains::GenericUnix::getDefaultLinker() const { | ||
// section on these targets, it also generates COPY relocations for | ||
// final executables, as such, unless specified, we default to gold | ||
// linker. | ||
- return "gold"; | ||
+ return "lld"; | ||
case llvm::Triple::x86: | ||
case llvm::Triple::x86_64: | ||
case llvm::Triple::ppc64: | ||
case llvm::Triple::ppc64le: | ||
case llvm::Triple::systemz: | ||
// BFD linker has issues wrt relocations against protected symbols. | ||
- return "gold"; | ||
+ return "lld"; | ||
default: | ||
// Otherwise, use the default BFD linker. | ||
return ""; |