Skip to content

Commit ec74b91

Browse files
committed
Set toolchain clang linker to gold
BFD doesn't work with Swift symbols. We get nasty errors like this: ``` error: link command failed with exit code 1 (use -v to see invocation) /usr/bin/ld: ...wift/CMakeFiles/swiftDispatch.dir/Block.swift.o: relocation R_X86_64_PC32 against protected symbol `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a shared object /usr/bin/ld: final link failed: bad value ```
1 parent 1780320 commit ec74b91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/build-presets.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,9 @@ reconfigure
904904

905905
# gcc version on amazon linux 2 is too old to configure and build tablegen.
906906
# Use the clang that we install in the path for macros
907-
llvm-cmake-options=-DCROSS_TOOLCHAIN_FLAGS_LLVM_NATIVE='-DCMAKE_C_COMPILER=clang;-DCMAKE_CXX_COMPILER=clang++'
907+
llvm-cmake-options=
908+
-DCROSS_TOOLCHAIN_FLAGS_LLVM_NATIVE='-DCMAKE_C_COMPILER=clang;-DCMAKE_CXX_COMPILER=clang++'
909+
-DCLANG_DEFAULT_LINKER=gold
908910

909911
[preset: buildbot_linux]
910912
mixin-preset=

0 commit comments

Comments
 (0)