[llvm] 9848c03 - [cmake] LLVM_BUILTINS_TARGET='default' should bootstrap builtins without compiler-rt (#171536)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 08:44:58 PST 2025


Author: Andrew Haberlandt
Date: 2025-12-10T16:44:53Z
New Revision: 9848c03ef8e271bfbfc9b4749f4a0f537a2ed4db

URL: https://github.com/llvm/llvm-project/commit/9848c03ef8e271bfbfc9b4749f4a0f537a2ed4db
DIFF: https://github.com/llvm/llvm-project/commit/9848c03ef8e271bfbfc9b4749f4a0f537a2ed4db.diff

LOG: [cmake] LLVM_BUILTINS_TARGET='default' should bootstrap builtins without compiler-rt (#171536)

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 88fb323e5e449..658db4f2babc9 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 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)
+    set(${path} "${CMAKE_CURRENT_SOURCE_DIR}/../../compiler-rt" PARENT_SCOPE)
+  endif()
 endfunction()
 
 include(LLVMExternalProjectUtils)


        


More information about the llvm-commits mailing list