mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[CMake][runtimes] Skip adding 2nd set of the same variables for a generic target
No need to parse and add the same variables twice if runtimes is being built for a generic target (i.e. w/o multilib). Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D81574
This commit is contained in:
parent
0b700579c7
commit
621bfa7a69
@ -462,14 +462,16 @@ else() # if this is included from LLVM's CMake
|
||||
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(variableName ${variableNames})
|
||||
string(FIND "${variableName}" "RUNTIMES_${name}_" out)
|
||||
if("${out}" EQUAL 0)
|
||||
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
|
||||
string(REPLACE ";" "|" new_value "${${variableName}}")
|
||||
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT "${name}" STREQUAL "${target}")
|
||||
foreach(variableName ${variableNames})
|
||||
string(FIND "${variableName}" "RUNTIMES_${name}_" out)
|
||||
if("${out}" EQUAL 0)
|
||||
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
|
||||
string(REPLACE ";" "|" new_value "${${variableName}}")
|
||||
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES AND NOT RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES)
|
||||
string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}")
|
||||
|
Loading…
Reference in New Issue
Block a user