]> granicus.if.org Git - clang/commitdiff
[CMake] Don't use comma as an alternate separator
authorPetr Hosek <phosek@chromium.org>
Tue, 5 Dec 2017 00:15:20 +0000 (00:15 +0000)
committerPetr Hosek <phosek@chromium.org>
Tue, 5 Dec 2017 00:15:20 +0000 (00:15 +0000)
Using comma can break in cases when we're passing flags that already
use comma as a separator.

Fixes PR35504.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319720 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index e27a718e41a13f9ed272fb53031a5cb53f804ca5..884879851544dbf94b296fd7013f22ffd3d77067 100644 (file)
@@ -655,7 +655,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
   foreach(variableName ${variableNames})
     if(variableName MATCHES "^BOOTSTRAP_")
       string(SUBSTRING ${variableName} 10 -1 varName)
-      string(REPLACE ";" "," value "${${variableName}}")
+      string(REPLACE ";" "|" value "${${variableName}}")
       list(APPEND PASSTHROUGH_VARIABLES
         -D${varName}=${value})
     endif()
@@ -671,7 +671,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
       if("${${variableName}}" STREQUAL "")
         set(value "")
       else()
-        string(REPLACE ";" "," value "${${variableName}}")
+        string(REPLACE ";" "|" value "${${variableName}}")
       endif()
       list(APPEND PASSTHROUGH_VARIABLES
         -D${variableName}=${value})
@@ -699,7 +699,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
     USES_TERMINAL_CONFIGURE 1
     USES_TERMINAL_BUILD 1
     USES_TERMINAL_INSTALL 1
-    LIST_SEPARATOR ,
+    LIST_SEPARATOR |
     )
 
   # exclude really-install from main target