Skip to content

Commit 839d7ae

Browse files
committed
build-script: Build foundation tests without debug info to workaround a linker crash
On amazon-linux2 the gold linker (version 1.14) crashes when linking debug info. rdar://137760869
1 parent 009ff8a commit 839d7ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

utils/swift_build_support/swift_build_support/products/swiftfoundationtests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ def test(self, host_target):
7373
]
7474
if self.args.verbose_build:
7575
cmd.append('--verbose')
76+
77+
# On amazon-linux2 the gold linker (version 1.14) crashes when linking
78+
# debug info. Workaround this issue by building without debug info.
79+
# rdar://137760869
80+
if host_target.startswith('linux'):
81+
cmd += ['-Xswiftc', '-gnone']
82+
7683
shell.call(cmd, env={'SWIFTCI_USE_LOCAL_DEPS': '1'})
7784

7885
@classmethod

0 commit comments

Comments
 (0)