[PATCH] D71737: [CMake][runtimes] Skip the generic target variable if named matches
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 17:19:55 PST 2019
phosek created this revision.
phosek added reviewers: beanz, smeenai, JamesNagurne.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
The existing logic relies on ordering, so if you use the following:
RUNTIMES_target+multi_VARIABLE_NAME
RUNTIMES_target_VARIABLE_NAME
The generic target variable would override the target+multi one. To
avoid that issue, we skip matching the generic target if the named
matches.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71737
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -452,12 +452,13 @@
if("${out}" EQUAL 0)
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
- endif()
+ else()
string(FIND "${variableName}" "RUNTIMES_${target}_" out)
if("${out}" EQUAL 0)
string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
endif()
+ endif()
endforeach()
if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71737.234812.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191220/779fc47a/attachment.bin>
More information about the llvm-commits
mailing list