mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-28 00:07:22 +00:00
[runtimes] Fix passing lists to runtimes configures
We have to replace the ";" with "|" (since LLVMExternalProjectUtils uses "|" as the `LIST_SEPARATOR` when invoking `ExternalProject_Add`) in order for lists to be passed correctly to the runtimes CMake configures. Remove the special case for `LLVM_ENABLE_RUNTIMES`, since it'll just get handled by the general logic now. Differential Revision: https://reviews.llvm.org/D73512
This commit is contained in:
parent
87d13166c7
commit
cfc8ee6256
@ -266,7 +266,8 @@ else() # if this is included from LLVM's CMake
|
|||||||
string(FIND "${variableName}" "BUILTINS_${target}" out)
|
string(FIND "${variableName}" "BUILTINS_${target}" out)
|
||||||
if("${out}" EQUAL 0)
|
if("${out}" EQUAL 0)
|
||||||
string(REPLACE "BUILTINS_${target}_" "" new_name ${variableName})
|
string(REPLACE "BUILTINS_${target}_" "" new_name ${variableName})
|
||||||
list(APPEND ${target}_extra_args "-D${new_name}=${${variableName}}")
|
string(REPLACE ";" "|" new_value "${${variableName}}")
|
||||||
|
list(APPEND ${target}_extra_args "-D${new_name}=${new_value}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@ -452,22 +453,19 @@ else() # if this is included from LLVM's CMake
|
|||||||
string(FIND "${variableName}" "RUNTIMES_${target}_" out)
|
string(FIND "${variableName}" "RUNTIMES_${target}_" out)
|
||||||
if("${out}" EQUAL 0)
|
if("${out}" EQUAL 0)
|
||||||
string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
|
string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
|
||||||
list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
|
string(REPLACE ";" "|" new_value "${${variableName}}")
|
||||||
|
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
foreach(variableName ${variableNames})
|
foreach(variableName ${variableNames})
|
||||||
string(FIND "${variableName}" "RUNTIMES_${name}_" out)
|
string(FIND "${variableName}" "RUNTIMES_${name}_" out)
|
||||||
if("${out}" EQUAL 0)
|
if("${out}" EQUAL 0)
|
||||||
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
|
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
|
||||||
list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
|
string(REPLACE ";" "|" new_value "${${variableName}}")
|
||||||
|
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES)
|
|
||||||
string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}")
|
|
||||||
list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(target IN_LIST LLVM_RUNTIME_BUILD_ID_LINK_TARGETS)
|
if(target IN_LIST LLVM_RUNTIME_BUILD_ID_LINK_TARGETS)
|
||||||
list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link)
|
list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user