Files
haikuports/sys-devel/llvm/patches/llvm-3.9.0.patchset
Jérôme Duval 17a8d6fe2e llvm: add recipe for version 3.9.0.
* update git recipe.
2016-11-20 16:37:38 +01:00

55 lines
1.8 KiB
Plaintext

From 99fd5918bd3259536ec5bb32f7ab57e0d5d98caa Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 20 Jan 2016 21:13:28 +0000
Subject: llvm-config: use /develop/headers instead of /include
* don't provide obj-root and src-root.
* use /develop/lib instead of /lib
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 94d426b..9dfc43c 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -327,9 +327,17 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+#endif
ActiveBinDir = ActivePrefix + "/bin";
+#ifdef __HAIKU__
+ ActiveLibDir = ActivePrefix + "/develop/lib";
+#else
ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -537,10 +545,16 @@ int main(int argc, char **argv) {
OS << LLVM_HAS_GLOBAL_ISEL << '\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 == "--link-shared") {
LinkMode = LinkModeShared;
} else if (Arg == "--link-static") {
--
2.2.2