From c983cac3a9552881bc90403831592438ee7ce9a9 Mon Sep 17 00:00:00 2001 From: Eric Miotto Date: Mon, 24 Mar 2025 14:12:53 -0700 Subject: [PATCH] Use LLVM_ENABLE_RUNTIMES to build compiler-rt by default Addresses rdar://113972453 --- utils/build_swift/build_swift/driver_arguments.py | 2 +- utils/build_swift/tests/expected_options.py | 2 +- ...vm-build-compiler-rt-with-enable-external-compiler-rt.test | 4 ---- .../BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/utils/build_swift/build_swift/driver_arguments.py b/utils/build_swift/build_swift/driver_arguments.py index 55609aaab3376..59250d9220d3b 100644 --- a/utils/build_swift/build_swift/driver_arguments.py +++ b/utils/build_swift/build_swift/driver_arguments.py @@ -1404,7 +1404,7 @@ def create_argument_parser(): 'separated options "-DCMAKE_VAR1=YES,-DCMAKE_VAR2=/tmp". Can ' 'be called multiple times to add multiple such options.') - option('--llvm-build-compiler-rt-with-use-runtimes', toggle_true, + option('--llvm-build-compiler-rt-with-use-runtimes', toggle_true, default=True, help='Switch to LLVM_ENABLE_RUNTIMES as the mechanism to build compiler-rt' 'It will become the default with LLVM 21, this flag is ' 'meant to stage its introduction and account for edge cases') diff --git a/utils/build_swift/tests/expected_options.py b/utils/build_swift/tests/expected_options.py index 9c2de4fd96ce6..058383946555f 100644 --- a/utils/build_swift/tests/expected_options.py +++ b/utils/build_swift/tests/expected_options.py @@ -231,7 +231,7 @@ 'lldb_build_variant': 'Debug', 'lldb_build_with_xcode': '0', 'llvm_assertions': True, - 'llvm_build_compiler_rt_with_use_runtimes': False, + 'llvm_build_compiler_rt_with_use_runtimes': True, 'llvm_build_variant': 'Debug', 'llvm_cmake_options': [], 'llvm_enable_modules': False, diff --git a/validation-test/BuildSystem/llvm-build-compiler-rt-with-enable-external-compiler-rt.test b/validation-test/BuildSystem/llvm-build-compiler-rt-with-enable-external-compiler-rt.test index 6f8e95a42d517..909d4e98172f5 100644 --- a/validation-test/BuildSystem/llvm-build-compiler-rt-with-enable-external-compiler-rt.test +++ b/validation-test/BuildSystem/llvm-build-compiler-rt-with-enable-external-compiler-rt.test @@ -1,7 +1,5 @@ # REQUIRES: standalone_build -# RUN: %empty-directory(%t) -# 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 # RUN: %empty-directory(%t) # 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 @@ -12,8 +10,6 @@ # EXTERNAL-COMPILER-RT-CHECK-SAME: -DLLVM_ENABLE_PROJECTS{{[^ ]*}}={{[^ ]*}}compiler-rt # EXTERNAL-COMPILER-RT-CHECK-SAME: llvm -# RUN: %empty-directory(%t) -# 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 # RUN: %empty-directory(%t) # 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 diff --git a/validation-test/BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test b/validation-test/BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test index 1101c40f3bc38..89c7d3834c6c8 100644 --- a/validation-test/BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test +++ b/validation-test/BuildSystem/llvm-build-compiler-rt-with-use-runtimes.test @@ -1,7 +1,7 @@ # REQUIRES: standalone_build # RUN: %empty-directory(%t) -# 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 +# 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 # RUN: %empty-directory(%t) # 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 @@ -14,7 +14,7 @@ # LLVM-USE-RUNTIMES-SAME: llvm # RUN: %empty-directory(%t) -# 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 +# 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 # RUN: %empty-directory(%t) # 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