[llvm] e37cb63 - Fix build when LLVM_BUILTIN_TARGETS is not set

Yi Kong via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 21:58:26 PST 2023


Author: Yi Kong
Date: 2023-01-10T14:56:03+09:00
New Revision: e37cb6390c892b88efc511bc616e34f88443a133

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

LOG: Fix build when LLVM_BUILTIN_TARGETS is not set

If LLVM_BUILTIN_TARGETS is not set, no OS specific variants will be
created, causing CMake build failure. Depend on the generic builtins
target if LLVM_BUILTIN_TARGETS is not set.

Differential Revision: https://reviews.llvm.org/D141273

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index e7150902af54f..694f346ee8e93 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -421,7 +421,11 @@ if(runtimes)
 
     foreach(name ${LLVM_RUNTIME_TARGETS})
       if(builtins_dep)
-        set(builtins_dep_name "${builtins_dep}-${name}")
+        if (LLVM_BUILTIN_TARGETS)
+          set(builtins_dep_name "${builtins_dep}-${name}")
+        else()
+          set(builtins_dep_name ${builtins_dep})
+        endif()
       endif()
       runtime_register_target(${name} ${name}
         DEPENDS ${builtins_dep_name})


        


More information about the llvm-commits mailing list