[PATCH] D81574: [CMake][runtimes] Skip adding 2nd set of the same variables for a generic target
Kristina Bessonova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 01:03:54 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5a39bf2dc5ae: [CMake][runtimes] Skip adding 2nd set of the same variables for a generic target (authored by krisb).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81574/new/
https://reviews.llvm.org/D81574
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -462,14 +462,16 @@
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}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81574.270676.patch
Type: text/x-patch
Size: 1307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200615/d455208a/attachment.bin>
More information about the llvm-commits
mailing list