Go to file
Michal Gorny 9283f5b200 [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

llvm-svn: 291284
2017-01-06 21:33:48 +00:00
clang Use CodegenOpts::less when creating a TargetMachine for clang `-O1` 2017-01-06 20:52:30 +00:00
clang-tools-extra Reapply "Fix for shared_ptrification in Clang" 2017-01-06 19:49:09 +00:00
compiler-rt [asan] Teach asan_symbolize.py to use :arch with atos and llvm-symbolizer on Darwin 2017-01-06 21:02:50 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Fix build since r286752. 2016-11-14 16:06:33 +00:00
libcxx Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANG 2017-01-06 20:58:25 +00:00
libcxxabi tweak definition to avoid GCC warning 2017-01-04 05:45:24 +00:00
libunwind EHABI: mark some functions as exported 2016-11-17 23:53:35 +00:00
lld Revert r291221. 2017-01-06 19:01:49 +00:00
lldb Reapply "Fixes for Clang API changes to use std::shared_ptr" 2017-01-06 19:49:05 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [cmake] Canonicalize CMake booleans to 0/1 for lit interop 2017-01-06 21:33:48 +00:00
openmp [CMake] Make openmp build under runtimes/ 2017-01-04 18:11:37 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Fix some typos in comments 2017-01-06 17:30:34 +00:00