Skip to content

Commit b8db9d4

Browse files
authored
[build-script][embedded] Conditionally force compiler-rt baremetal builtins (#77395)
This change allows build-script to be invoked with the following combination: ``` --llvm-targets-to-build=host --build-embedded-stdlib=false ``` When `--build-embedded-stdlib=false` is used, it's unnecessary to force-configure additional compiler-rt targets. Further, when `--llvm-targets-to-build` is used, the resulting llvm usually won't support the forced targets of armv6/armv7.
1 parent f80035a commit b8db9d4

File tree

1 file changed

+1
-1
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+1
-1
lines changed

utils/swift_build_support/swift_build_support/products/llvm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def build(self, host_target):
296296
llvm_cmake_options.define('LLVM_ENABLE_LTO:STRING', self.args.lto_type)
297297
llvm_cmake_options.define('COMPILER_RT_INTERCEPT_LIBDISPATCH', 'ON')
298298

299-
if system() == 'Darwin':
299+
if self.args.build_embedded_stdlib and system() == "Darwin":
300300
# Ask for Mach-O cross-compilation builtins (for Embedded Swift)
301301
llvm_cmake_options.define(
302302
'COMPILER_RT_FORCE_BUILD_BAREMETAL_MACHO_BUILTINS_ARCHS:STRING',

0 commit comments

Comments
 (0)