[llvm-config] Teach llvm-config about global-isel.

llvm-config can know tell whether or not a build has been configured to support
global-isel.
Use '--has-global-isel' for that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Quentin Colombet 2016-03-08 00:02:50 +00:00
parent 8f023303dc
commit a7b1d455cc
3 changed files with 5 additions and 0 deletions

View File

@ -33,3 +33,4 @@
#define LLVM_ENABLE_SHARED "@LLVM_ENABLE_SHARED@"
#define LLVM_DYLIB_COMPONENTS "@LLVM_DYLIB_COMPONENTS@"
#define LLVM_DYLIB_VERSION "@LLVM_DYLIB_VERSION@"
#define LLVM_HAS_GLOBAL_ISEL "@LLVM_HAS_GLOBAL_ISEL@"

View File

@ -31,6 +31,7 @@ set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
set(LLVM_HAS_GLOBAL_ISEL "${LLVM_BUILD_GLOBAL_ISEL}")
# Use the C++ link flags, since they should be a superset of C link flags.
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")

View File

@ -211,6 +211,7 @@ Options:\n\
--assertion-mode Print assertion mode of LLVM tree (ON or OFF).\n\
--build-system Print the build system used to build LLVM (autoconf or cmake).\n\
--has-rtti Print whether or not LLVM was built with rtti (YES or NO).\n\
--has-global-isel Print whether or not LLVM was built with global-isel support (YES or NO).\n\
--shared-mode Print how the provided components can be collectively linked (`shared` or `static`).\n\
--link-shared Link the components as shared libraries.\n\
--link-static Link the component libraries statically.\n\
@ -559,6 +560,8 @@ int main(int argc, char **argv) {
OS << LLVM_BUILD_SYSTEM << '\n';
} else if (Arg == "--has-rtti") {
OS << LLVM_HAS_RTTI << '\n';
} else if (Arg == "--has-global-isel") {
OS << LLVM_HAS_GLOBAL_ISEL << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
} else if (Arg == "--obj-root") {