Skip to content

Commit ad79877

Browse files
committed
Use LLVM_USE_RUNTIMES to build compiler-rt by default
Addresses rdar://113972453
1 parent 442edf4 commit ad79877

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ def create_argument_parser():
13981398
'separated options "-DCMAKE_VAR1=YES,-DCMAKE_VAR2=/tmp". Can '
13991399
'be called multiple times to add multiple such options.')
14001400

1401-
option('--llvm-build-compiler-rt-with-use-runtimes', toggle_true,
1401+
option('--llvm-build-compiler-rt-with-use-runtimes', toggle_true, default=True,
14021402
help='Switch to LLVM_USE_RUNTIMES as the mechanism to build compiler-rt'
14031403
'It will become the default with LLVM 21, this flag is '
14041404
'meant to stage its introduction and account for edge cases')

utils/build_swift/tests/expected_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
'lldb_build_variant': 'Debug',
233233
'lldb_build_with_xcode': '0',
234234
'llvm_assertions': True,
235-
'llvm_build_compiler_rt_with_use_runtimes': False,
235+
'llvm_build_compiler_rt_with_use_runtimes': True,
236236
'llvm_build_variant': 'Debug',
237237
'llvm_cmake_options': [],
238238
'llvm_enable_modules': False,
@@ -854,7 +854,7 @@ class BuildScriptImplOption(_BaseOption):
854854
AppendOption('--llvm-ninja-targets'),
855855
AppendOption('--llvm-ninja-targets-for-cross-compile-hosts'),
856856
AppendOption('--llvm-cmake-options'),
857-
SetTrueOption('--llvm-build-compiler-rt-with-use-runtimes'),
857+
EnableOption('--llvm-build-compiler-rt-with-use-runtimes'),
858858
AppendOption('--darwin-symroot-path-filters'),
859859

860860
UnsupportedOption('--build-jobs'),

validation-test/BuildSystem/llvm-build-compiler-rt-with-enable-external-compiler-rt.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# REQUIRES: standalone_build
22

3-
# RUN: %empty-directory(%t)
4-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --cmake %cmake 2>&1 | %FileCheck --check-prefix=EXTERNAL-COMPILER-RT-CHECK %s
53
# RUN: %empty-directory(%t)
64
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=0 --cmake %cmake 2>&1 | %FileCheck --check-prefix=EXTERNAL-COMPILER-RT-CHECK %s
75

@@ -12,8 +10,6 @@
1210
# EXTERNAL-COMPILER-RT-CHECK-SAME: -DLLVM_ENABLE_PROJECTS{{[^ ]*}}={{[^ ]*}}compiler-rt
1311
# EXTERNAL-COMPILER-RT-CHECK-SAME: llvm
1412

15-
# RUN: %empty-directory(%t)
16-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --skip-build-compiler-rt --cmake %cmake 2>&1 | %FileCheck --check-prefix=DONT-BUILD-COMPILER-RT %s
1713
# RUN: %empty-directory(%t)
1814
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=0 --skip-build-compiler-rt --cmake %cmake 2>&1 | %FileCheck --check-prefix=DONT-BUILD-COMPILER-RT %s
1915

validation-test/BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: standalone_build
22

33
# RUN: %empty-directory(%t)
4-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes --cmake %cmake 2>&1 | %FileCheck --check-prefix=LLVM-USE-RUNTIMES %s
4+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --cmake %cmake 2>&1 | %FileCheck --check-prefix=LLVM-USE-RUNTIMES %s
55
# RUN: %empty-directory(%t)
66
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=1 --cmake %cmake 2>&1 | %FileCheck --check-prefix=LLVM-USE-RUNTIMES %s
77

@@ -14,7 +14,7 @@
1414
# LLVM-USE-RUNTIMES-SAME: llvm
1515

1616
# RUN: %empty-directory(%t)
17-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes --skip-build-compiler-rt --cmake %cmake 2>&1 | %FileCheck --check-prefix=DONT-BUILD-COMPILER-RT %s
17+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --skip-build-compiler-rt --cmake %cmake 2>&1 | %FileCheck --check-prefix=DONT-BUILD-COMPILER-RT %s
1818
# RUN: %empty-directory(%t)
1919
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --skip-build --llvm-build-compiler-rt-with-use-runtimes=1 --skip-build-compiler-rt --cmake %cmake 2>&1 | %FileCheck --check-prefix=DONT-BUILD-COMPILER-RT %s
2020

0 commit comments

Comments
 (0)