llvm/tools/llvm-config/BuildVariables.inc.in
Michal Gorny 71b8698703 [llvm-config] Canonicalize CMake booleans to 0/1
Following the similar change to lit configuration, ensure that all CMake
booleans are canonicalized to 0/1 when being passed to llvm-config. This
fixes the incorrect interpretation of values when user passes another
value than the ON/OFF, and simplifies the code by removing unnecessary
string matching.

Furthermore, the code for --has-rtti and --has-global-isel has been
modified to print consistent values indepdently of the boolean used by
passed by the user to CMake. Sadly, the code already implicitly used
different values for the two (YES/NO for --has-rtti, ON/OFF for
--has-global-isel).

Include tests for all booleans and multi-value options in llvm-config.

Differential Revision: https://reviews.llvm.org/D28366

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 19:55:51 +00:00

37 lines
1.5 KiB
C++

//===-- BuildVariables.inc.in - llvm-config build variables -*- C++ -*-----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is configured by the build system to define the variables
// llvm-config wants to report to the user, but which can only be determined at
// build time.
//
// The variant of this file not ending with .in has been autogenerated by the
// LLVM build. Do not edit!
//
//===----------------------------------------------------------------------===//
#define LLVM_SRC_ROOT "@LLVM_SRC_ROOT@"
#define LLVM_OBJ_ROOT "@LLVM_OBJ_ROOT@"
#define LLVM_CPPFLAGS "@LLVM_CPPFLAGS@"
#define LLVM_CFLAGS "@LLVM_CFLAGS@"
#define LLVM_LDFLAGS "@LLVM_LDFLAGS@"
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
#define LLVM_HAS_RTTI @LLVM_HAS_RTTI@
#define LLVM_ENABLE_DYLIB @LLVM_BUILD_LLVM_DYLIB@
#define LLVM_LINK_DYLIB @LLVM_LINK_LLVM_DYLIB@
#define LLVM_ENABLE_SHARED @BUILD_SHARED_LIBS@
#define LLVM_DYLIB_COMPONENTS "@LLVM_DYLIB_COMPONENTS@"
#define LLVM_DYLIB_VERSION "@LLVM_DYLIB_VERSION@"
#define LLVM_HAS_GLOBAL_ISEL @LLVM_HAS_GLOBAL_ISEL@