[PATCH] D158791: [runtimes] Add a mechanism to use cache files for a runtimes build

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 14:52:36 PDT 2023


smeenai updated this revision to Diff 554500.
smeenai added a comment.

Change to CACHE_FILES


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158791/new/

https://reviews.llvm.org/D158791

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -105,8 +105,14 @@
     string(FIND "${variable_name}" "BUILTINS_${name}" out)
     if("${out}" EQUAL 0)
       string(REPLACE "BUILTINS_${name}_" "" new_name ${variable_name})
-      string(REPLACE ";" "|" new_value "${${variable_name}}")
-      list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
+      if(new_name STREQUAL CACHE_FILES)
+        foreach(cache IN LISTS ${variable_name})
+          list(APPEND ${name}_extra_args -C ${cache})
+        endforeach()
+      else()
+        string(REPLACE ";" "|" new_value "${${variable_name}}")
+        list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
+      endif()
     endif()
   endforeach()
 
@@ -326,8 +332,14 @@
       string(FIND "${variable_name}" "RUNTIMES_${extra_name}_" out)
       if("${out}" EQUAL 0)
         string(REPLACE "RUNTIMES_${extra_name}_" "" new_name ${variable_name})
-        string(REPLACE ";" "|" new_value "${${variable_name}}")
-        list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
+        if(new_name STREQUAL CACHE_FILES)
+          foreach(cache IN LISTS ${variable_name})
+            list(APPEND ${name}_extra_args -C ${cache})
+          endforeach()
+        else()
+          string(REPLACE ";" "|" new_value "${${variable_name}}")
+          list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
+        endif()
       endif()
     endforeach()
   endforeach()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158791.554500.patch
Type: text/x-patch
Size: 1573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230829/4fdbbe0d/attachment.bin>


More information about the llvm-commits mailing list