[PATCH] D49479: llvm-config: use /develop/headers instead of /include on Haiku
Alexander von Gluck IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 06:49:26 PDT 2018
kallisti5 created this revision.
Herald added a subscriber: llvm-commits.
- don't provide obj-root and src-root.
Repository:
rL LLVM
https://reviews.llvm.org/D49479
Files:
tools/llvm-config/llvm-config.cpp
Index: tools/llvm-config/llvm-config.cpp
===================================================================
--- tools/llvm-config/llvm-config.cpp
+++ tools/llvm-config/llvm-config.cpp
@@ -333,11 +333,16 @@
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+ ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX;
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+ ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
sys::fs::make_absolute(ActivePrefix, path);
ActiveBinDir = path.str();
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -557,10 +562,16 @@
OS << (LLVM_HAS_GLOBAL_ISEL ? "ON" : "OFF") << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } else if (Arg == "--obj-root") {
- OS << ActivePrefix << '\n';
- } else if (Arg == "--src-root") {
- OS << LLVM_SRC_ROOT << '\n';
+ } else if (Arg == "--obj-root" || Arg == "--src-root") {
+ if (IsInDevelopmentTree) {
+ if (Arg == "--obj-root")
+ OS << ActivePrefix << '\n';
+ else
+ OS << LLVM_SRC_ROOT << '\n';
+ } else {
+ llvm::errs() << "llvm-config: sources not installed\n";
+ exit(1);
+ }
} else if (Arg == "--ignore-libllvm") {
LinkDyLib = false;
LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49479.156059.patch
Type: text/x-patch
Size: 1745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/359c137b/attachment.bin>
More information about the llvm-commits
mailing list