Skip to content

Commit bab6e44

Browse files
committed
Default Linux toolchain linker to gold
The BFD linker on most of the Linux box is unable to link Swift objects. Currently the Swift driver hard-codes forcing the default linker to gold, but we want to support configuring this, so we need build-script to force it at the clang level instead. Cherry-Picks: d63152f 7596d00 8262552
1 parent 1132152 commit bab6e44

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

utils/build-presets.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,9 @@ install-foundation
914914
install-libdispatch
915915
reconfigure
916916

917+
llvm-cmake-options=
918+
-DCLANG_DEFAULT_LINKER=gold
919+
917920
[preset: buildbot_linux]
918921
mixin-preset=
919922
mixin_lightweight_assertions,no-stdlib-asserts
@@ -1066,6 +1069,8 @@ reconfigure
10661069
skip-test-lldb
10671070
test-optimized
10681071

1072+
llvm-cmake-options=
1073+
-DCLANG_DEFAULT_LINKER=gold
10691074

10701075
[preset: buildbot_linux_1404_no_lldb]
10711076
mixin-preset=buildbot_incremental_linux
@@ -1144,6 +1149,8 @@ reconfigure
11441149
# in Linux CI bots
11451150
relocate-xdg-cache-home-under-build-subdir
11461151

1152+
llvm-cmake-options=
1153+
-DCLANG_DEFAULT_LINKER=gold
11471154

11481155
[preset: buildbot_incremental_linux]
11491156
mixin-preset=
@@ -1762,6 +1769,9 @@ skip-test-foundation
17621769
skip-test-libdispatch
17631770
skip-test-xctest
17641771

1772+
llvm-cmake-options=
1773+
-DCLANG_DEFAULT_LINKER=gold
1774+
17651775
# Builds enough of the toolchain to build a swift package on macOS.
17661776
[preset: mixin_swiftpm_package_macos_platform]
17671777
mixin-preset=mixin_swiftpm_macos_platform
@@ -1784,6 +1794,8 @@ mixin-preset=mixin_swiftpm_linux_platform
17841794
skip-test-llbuild
17851795
skip-test-swiftpm
17861796

1797+
llvm-cmake-options=
1798+
-DCLANG_DEFAULT_LINKER=gold
17871799

17881800
#===------------------------------------------------------------------------===#
17891801
# Test swiftPM on macOS builder
@@ -2035,6 +2047,9 @@ skip-test-swift
20352047
skip-test-libdispatch
20362048
skip-test-foundation
20372049

2050+
llvm-cmake-options=
2051+
-DCLANG_DEFAULT_LINKER=gold
2052+
20382053
#===------------------------------------------------------------------------===#
20392054
# Remote Mirror Library
20402055
#===------------------------------------------------------------------------===#
@@ -2814,6 +2829,9 @@ install-libdispatch
28142829
install-xctest
28152830
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;libexec;swift-remote-mirror;sdk-overlay;license
28162831

2832+
llvm-cmake-options=
2833+
-DCLANG_DEFAULT_LINKER=gold
2834+
28172835
[preset: source_compat_suite_macos_DA]
28182836
mixin-preset=source_compat_suite_macos_base
28192837
debug
@@ -2900,6 +2918,9 @@ skip-test-swift
29002918
skip-build-benchmarks
29012919
skip-test-foundation
29022920

2921+
llvm-cmake-options=
2922+
-DCLANG_DEFAULT_LINKER=gold
2923+
29032924
# Temporarily disable early swift driver builds so that linux images
29042925
# can use the swift release images as a base.
29052926
skip-early-swift-driver

0 commit comments

Comments
 (0)