summaryrefslogtreecommitdiff
path: root/test/JitListener
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2017-01-06 21:33:48 +0000
committerMichal Gorny <mgorny@gentoo.org>2017-01-06 21:33:48 +0000
commit1159e421994d6bab805683f41a069e9189ed2ac4 (patch)
treeb22452ffb49e5ee77d32f47cca0180512374d076 /test/JitListener
parentc56b5dc8d8994aacbb5900c9be95c901bf79f4ca (diff)
[cmake] Canonicalize CMake booleans to 0/1 for lit interop
Canonicalize all CMake booleans to 0/1 before passing them to lit, to ensure that the Python side handles all of them consistently and correctly. 0/1 is a safe choice of values that trigger the same boolean interpretation in CMake, Python and C++. Furthermore, using them without quotes improves the chance Python will explicitly fail when an incorrect value (such as ON/OFF, TRUE/FALSE, YES/NO) is accidentally passed, rather than silently misinterpreting the value. This replaces a lot of different logics spread around lit site files, attempting to partially reproduce the boolean logic used in CMake and usually silently failing when an uncommon value was used instead. In fact, some of them were never working correctly since different values were assigned in CMake and checked in Python. The alternative solution could be to create a common parser for CMake booleans in lit and use it consistently throughout the site files. However, it does not seem like the best idea to create redundant implementation of the same logic and have to follow upstream if it ever is extended to handle more values. Differential Revision: https://reviews.llvm.org/D28294 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/JitListener')
-rw-r--r--test/JitListener/lit.local.cfg2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/JitListener/lit.local.cfg b/test/JitListener/lit.local.cfg
index 05f34a744ad..f485229b01c 100644
--- a/test/JitListener/lit.local.cfg
+++ b/test/JitListener/lit.local.cfg
@@ -1,3 +1,3 @@
-if not config.root.llvm_use_intel_jitevents == "true":
+if not config.root.llvm_use_intel_jitevents:
config.unsupported = True