[PATCH] D40761: [CMake] Don't use comma as an alternate separator

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 17:31:43 PST 2017


phosek created this revision.
Herald added a subscriber: mgorny.

Using comma can break in cases when we're passing flags that already
use comma as a separator.

Fixes PR35504.


Repository:
  rL LLVM

https://reviews.llvm.org/D40761

Files:
  cmake/modules/LLVMExternalProjectUtils.cmake


Index: cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- cmake/modules/LLVMExternalProjectUtils.cmake
+++ cmake/modules/LLVMExternalProjectUtils.cmake
@@ -95,7 +95,7 @@
   foreach(prefix ${ARG_PASSTHROUGH_PREFIXES})
     foreach(variableName ${variableNames})
       if(variableName MATCHES "^${prefix}")
-        string(REPLACE ";" "," value "${${variableName}}")
+        string(REPLACE ";" "|" value "${${variableName}}")
         list(APPEND PASSTHROUGH_VARIABLES
           -D${variableName}=${value})
       endif()
@@ -160,7 +160,7 @@
     USES_TERMINAL_CONFIGURE 1
     USES_TERMINAL_BUILD 1
     USES_TERMINAL_INSTALL 1
-    LIST_SEPARATOR ,
+    LIST_SEPARATOR |
     )
 
   if(ARG_USE_TOOLCHAIN)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40761.125249.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171202/63f04614/attachment.bin>


More information about the llvm-commits mailing list