From: LLVM Packaging Team Date: Wed, 18 Dec 2024 09:01:43 +0000 (+0100) Subject: llvm-runtimes-builtins-build-check X-Git-Tag: archive/raspbian/1%19.1.7-1+rpi1^2^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1e44bfc6c7a346645b58458c54d95fd0f48b401f;p=llvm-toolchain-19.git llvm-runtimes-builtins-build-check add a check and only set up and build compiler-rt builtins if they have not been disabled Gbp-Pq: Name llvm-runtimes-builtins-build-check.diff --- diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 1dd9b84687..09eb468b24 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -142,10 +142,15 @@ endfunction() # is required because the other runtimes need the builtin libraries present # before the just-built compiler can pass the configuration tests. get_compiler_rt_path(compiler_rt_path) -if(compiler_rt_path) +# check if builtins have been disabled +set(RUNTIMES_BUILD_BUILTINS ON) +if(DEFINED COMPILER_RT_BUILD_BUILTINS) + set(RUNTIMES_BUILD_BUILTINS ${COMPILER_RT_BUILD_BUILTINS}) +endif() +if(compiler_rt_path AND RUNTIMES_BUILD_BUILTINS) # If the user did not specify the targets infer them from the runtimes. set(builtin_targets ${LLVM_BUILTIN_TARGETS}) - if(NOT builtin_targets) + if(NOT LLVM_BUILTIN_TARGETS) if("compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES) list(APPEND builtin_targets "default") endif()