You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 628b899be14a6bab4b32dbd53aabd447dcc16cb7 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
|
Date: Sat, 20 Aug 2016 23:47:41 +0200
|
|
Subject: [PATCH] llvm-config: Clean up exported values, update for shared
|
|
linking
|
|
|
|
Gentoo-specific fixup for llvm-config, including:
|
|
- making --src-root return invalid path (/dev/null).
|
|
|
|
Thanks to Steven Newbury for the initial patch.
|
|
|
|
Bug: https://bugs.gentoo.org/565358
|
|
Bug: https://bugs.gentoo.org/501684
|
|
|
|
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
|
index d780094861c..c61c72ff48c 100644
|
|
--- a/tools/llvm-config/llvm-config.cpp
|
|
+++ b/tools/llvm-config/llvm-config.cpp
|
|
@@ -549,7 +550,11 @@ int main(int argc, char **argv) {
|
|
} else if (Arg == "--obj-root") {
|
|
OS << ActivePrefix << '\n';
|
|
} else if (Arg == "--src-root") {
|
|
- OS << LLVM_SRC_ROOT << '\n';
|
|
+ if (IsInDevelopmentTree) {
|
|
+ OS << LLVM_SRC_ROOT << '\n';
|
|
+ } else {
|
|
+ OS << "/dev/null\n";
|
|
+ }
|
|
} else if (Arg == "--ignore-libllvm") {
|
|
LinkDyLib = false;
|
|
LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
|
|
--
|
|
2.11.0
|
|
|