diff options
Diffstat (limited to 'tools/llvm-config/llvm-config.cpp')
-rw-r--r-- | tools/llvm-config/llvm-config.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp index e8afcbaaf485..25344e4cd011 100644 --- a/tools/llvm-config/llvm-config.cpp +++ b/tools/llvm-config/llvm-config.cpp @@ -212,7 +212,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 (always 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\ + --has-global-isel Print whether or not LLVM was built with global-isel support (ON or OFF).\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\ @@ -242,7 +242,7 @@ std::vector<std::string> GetAllDyLibComponents(const bool IsInDevelopmentTree, size_t Offset = 0; while (true) { const size_t NextOffset = DyLibComponentsStr.find(';', Offset); - DyLibComponents.push_back(DyLibComponentsStr.substr(Offset, NextOffset)); + DyLibComponents.push_back(DyLibComponentsStr.substr(Offset, NextOffset-Offset)); if (NextOffset == std::string::npos) { break; } @@ -383,10 +383,10 @@ int main(int argc, char **argv) { StaticPrefix = SharedPrefix = "lib"; } - const bool BuiltDyLib = (std::strcmp(LLVM_ENABLE_DYLIB, "ON") == 0); + const bool BuiltDyLib = !!LLVM_ENABLE_DYLIB; /// CMake style shared libs, ie each component is in a shared library. - const bool BuiltSharedLibs = std::strcmp(LLVM_ENABLE_SHARED, "ON") == 0; + const bool BuiltSharedLibs = !!LLVM_ENABLE_SHARED; bool DyLibExists = false; const std::string DyLibName = @@ -395,7 +395,7 @@ int main(int argc, char **argv) { // If LLVM_LINK_DYLIB is ON, the single shared library will be returned // for "--libs", etc, if they exist. This behaviour can be overridden with // --link-static or --link-shared. - bool LinkDyLib = (std::strcmp(LLVM_LINK_DYLIB, "ON") == 0); + bool LinkDyLib = !!LLVM_LINK_DYLIB; if (BuiltDyLib) { std::string path((SharedDir + DirSep + DyLibName).str()); @@ -549,9 +549,9 @@ int main(int argc, char **argv) { } else if (Arg == "--build-system") { OS << LLVM_BUILD_SYSTEM << '\n'; } else if (Arg == "--has-rtti") { - OS << LLVM_HAS_RTTI << '\n'; + OS << (LLVM_HAS_RTTI ? "YES" : "NO") << '\n'; } else if (Arg == "--has-global-isel") { - OS << LLVM_HAS_GLOBAL_ISEL << '\n'; + OS << (LLVM_HAS_GLOBAL_ISEL ? "ON" : "OFF") << '\n'; } else if (Arg == "--shared-mode") { PrintSharedMode = true; } else if (Arg == "--obj-root") { |