[llvm] [cmake] LLVM_BUILTINS_TARGET='default' should bootstrap builtins without compiler-rt (PR #171536)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 08:11:54 PST 2025
https://github.com/ndrewh updated https://github.com/llvm/llvm-project/pull/171536
>From 1a664bef29e5daa7bc1d242277e52e8f71b0b021 Mon Sep 17 00:00:00 2001
From: Andrew Haberlandt <ahaberlandt at apple.com>
Date: Tue, 9 Dec 2025 15:44:27 -0800
Subject: [PATCH 1/2] LLVM_BUILTINS_TARGET='default' should bootstrap builtins
even w/o compiler-rt
---
llvm/runtimes/CMakeLists.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 7f8f239efbe68..babf94e430abb 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -34,6 +34,13 @@ function(get_compiler_rt_path path)
return()
endif()
endforeach()
+
+ # If LLVM_BUILTIN_TARGETS is spcified, we still need
+ # to locate the compiler-rt runtime to be able to build builtins.
+ # This supports bootstrapping builtins without compiler-rt.
+ if (LLVM_BUILTIN_TARGETS)
+ set(${path} "${CMAKE_CURRENT_SOURCE_DIR}/../../compiler-rt" PARENT_SCOPE)
+ endif()
endfunction()
include(LLVMExternalProjectUtils)
>From c9cd0bdc42ddc0547ade18976a96d2d403ac794c Mon Sep 17 00:00:00 2001
From: Andrew Haberlandt <ndrewh at users.noreply.github.com>
Date: Wed, 10 Dec 2025 08:11:45 -0800
Subject: [PATCH 2/2] spelling
Co-authored-by: Petr Hosek <phosek at google.com>
---
llvm/runtimes/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index babf94e430abb..29838f25a392b 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -35,7 +35,7 @@ function(get_compiler_rt_path path)
endif()
endforeach()
- # If LLVM_BUILTIN_TARGETS is spcified, we still need
+ # If LLVM_BUILTIN_TARGETS is specified, we still need
# to locate the compiler-rt runtime to be able to build builtins.
# This supports bootstrapping builtins without compiler-rt.
if (LLVM_BUILTIN_TARGETS)
More information about the llvm-commits
mailing list