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

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 16:02:50 PST 2016


Author: qcolombet
Date: Mon Mar  7 18:02:50 2016
New Revision: 262877

URL: http://llvm.org/viewvc/llvm-project?rev=262877&view=rev
Log:
[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.

Modified:
    llvm/trunk/tools/llvm-config/BuildVariables.inc.in
    llvm/trunk/tools/llvm-config/CMakeLists.txt
    llvm/trunk/tools/llvm-config/llvm-config.cpp

Modified: llvm/trunk/tools/llvm-config/BuildVariables.inc.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/BuildVariables.inc.in?rev=262877&r1=262876&r2=262877&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/BuildVariables.inc.in (original)
+++ llvm/trunk/tools/llvm-config/BuildVariables.inc.in Mon Mar  7 18:02:50 2016
@@ -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@"

Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=262877&r1=262876&r2=262877&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-config/CMakeLists.txt Mon Mar  7 18:02:50 2016
@@ -31,6 +31,7 @@ set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${
 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}")

Modified: llvm/trunk/tools/llvm-config/llvm-config.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/llvm-config.cpp?rev=262877&r1=262876&r2=262877&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/llvm-config.cpp (original)
+++ llvm/trunk/tools/llvm-config/llvm-config.cpp Mon Mar  7 18:02:50 2016
@@ -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") {




More information about the llvm-commits mailing list