[Fuchsia] Correctly pass lists from STAGE2_ vars
authorAlex Brachet <abrachet@google.com>
Wed, 17 May 2023 17:24:58 +0000 (17:24 +0000)
committerAlex Brachet <abrachet@google.com>
Wed, 17 May 2023 17:24:58 +0000 (17:24 +0000)
Differential Revision: https://reviews.llvm.org/D150799

clang/cmake/caches/Fuchsia.cmake

index 1032dc8..5596cc6 100644 (file)
@@ -182,7 +182,8 @@ get_cmake_property(variableNames VARIABLES)
 foreach(variableName ${variableNames})
   if(variableName MATCHES "^STAGE2_")
     string(REPLACE "STAGE2_" "" new_name ${variableName})
-    list(APPEND EXTRA_ARGS "-D${new_name}=${${variableName}}")
+    string(REPLACE ";" "|" value "${${variableName}}")
+    list(APPEND EXTRA_ARGS "-D${new_name}=${value}")
   endif()
 endforeach()