Skip to content

Commit ad1d9ff

Browse files
authored
Merge pull request #73970 from al45tair/eng/PR-128925574
[6.0] Start building and including lld even in Darwin toolchains
2 parents 412f5a5 + e9ae7ab commit ad1d9ff

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

utils/build-presets.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ swift-install-components=back-deployment;compiler;clang-builtin-headers;libexec;
1919
[preset: mixin_buildbot_install_components_with_clang]
2020

2121
swift-install-components=autolink-driver;back-deployment;compiler;clang-resource-dir-symlink;libexec;stdlib;sdk-overlay;static-mirror-lib;toolchain-tools;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers;swift-external-generic-metadata-builder;swift-external-generic-metadata-builder-headers
22-
llvm-install-components=llvm-ar;llvm-ranlib;llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd;dsymutil;LTO;clang-features-file
22+
llvm-install-components=llvm-ar;llvm-ranlib;llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd;dsymutil;LTO;clang-features-file;lld
2323

2424
[preset: mixin_buildbot_trunk_base]
2525
# Build standard library and SDK overlay for iOS device and simulator.

utils/build_swift/build_swift/defaults.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,10 @@ def llvm_install_components():
121121
platforms.
122122
"""
123123
components = ['llvm-ar', 'llvm-cov', 'llvm-profdata', 'IndexStore', 'clang',
124-
'clang-resource-headers', 'compiler-rt', 'clangd', 'LTO']
124+
'clang-resource-headers', 'compiler-rt', 'clangd', 'LTO',
125+
'lld']
125126
if os.sys.platform == 'darwin':
126127
components.extend(['dsymutil'])
127-
else:
128-
components.extend(['lld'])
129128
return ';'.join(components)
130129

131130

utils/swift_build_support/swift_build_support/products/llvm.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,13 @@ def build(self, host_target):
295295
if self.args.build_clang_tools_extra:
296296
llvm_enable_projects.append('clang-tools-extra')
297297

298-
# On non-Darwin platforms, build lld so we can always have a
298+
# Always build lld -- on non-Darwin so we can always have a
299299
# linker that is compatible with the swift we are using to
300-
# compile the stdlib.
300+
# compile the stdlib, but on Darwin too for Embedded Swift use cases.
301301
#
302302
# This makes it easier to build target stdlibs on systems that
303303
# have old toolchains without more modern linker features.
304-
305-
target = targets.StdlibDeploymentTarget.get_target_for_name(host_target)
306-
307-
if not target.platform.is_darwin or self.args.build_lld:
308-
llvm_enable_projects.append('lld')
304+
llvm_enable_projects.append('lld')
309305

310306
llvm_cmake_options.define('LLVM_ENABLE_PROJECTS',
311307
';'.join(llvm_enable_projects))

0 commit comments

Comments
 (0)