aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorJames Nagurne <j-nagurne@ti.com>2020-01-17 15:16:34 -0800
committerPetr Hosek <phosek@google.com>2020-01-17 15:18:18 -0800
commit128e1ebd931027c58065f0c0dc83c0b6a1c53a83 (patch)
tree55471ebea6f75764509a0388b0e68e2310d70aba /llvm/lib/CodeGen/MachineOperand.cpp
parent9b9c68a2d6adea397e6bc22b29d6d81bb997a256 (diff)
downloadllvm-128e1ebd931027c58065f0c0dc83c0b6a1c53a83.zip
llvm-128e1ebd931027c58065f0c0dc83c0b6a1c53a83.tar.gz
llvm-128e1ebd931027c58065f0c0dc83c0b6a1c53a83.tar.bz2
[CMake] Prefer multi-target variables over generic target variables in runtimes build
Runtimes variables in a multi-target environment are defined like: RUNTIMES_target_VARIABLE_NAME RUNTIMES_target+multi_VARIABLE_NAME In my case, I have a downstream runtimes cache that does the following: set(RUNTIMES_${target}+except_LIBCXXABI_ENABLE_EXCEPTIONS ON CACHE BOOL "") set(RUNTIMES_${target}_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") I found that I was always getting the 'target' variable value (OFF) in my 'target+except' build, which was unexpected. This behavior was caused by the loop in llvm/runtimes/CMakeLists.txt that runs through all variable names, adding '-DVARIABLE_NAME=' options to the subsequent external project's cmake command. The issue is that the loop does a single pass, such that if the 'target' value appears in the cache after the 'target+except' value, the 'target' value will take precedence. I suggest in my change here that the more specific 'target+except' value should take precedence always, without relying on CMake cache ordering. Differential Revision: https://reviews.llvm.org/D71570 Patch By: JamesNagurne
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions