summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-12-13 23:01:53 +0000
committerDerek Schuff <dschuff@google.com>2016-12-13 23:01:53 +0000
commit7ff587a96dc661258a3ac44c2fc182e7ed9863f8 (patch)
tree438b7273f0770472c8ef26927b1a8d5ec7b1f3eb /llvm/tools
parentf6f82c2cc8a3dc8584cf19e521da93a8d17ba9eb (diff)
downloadbcm5719-llvm-7ff587a96dc661258a3ac44c2fc182e7ed9863f8.tar.gz
bcm5719-llvm-7ff587a96dc661258a3ac44c2fc182e7ed9863f8.zip
llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvm
Summary: LinkDyLib is only used (before arg processing) to set up the default for LinkMode. So reset LinkMode as well, and process before --link-shared or --link-static to allow those flags to continue to override it. Reviewers: beanz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27736 llvm-svn: 289608
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-config/llvm-config.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
index 6fdc304dbf1..d6e67813147 100644
--- a/llvm/tools/llvm-config/llvm-config.cpp
+++ b/llvm/tools/llvm-config/llvm-config.cpp
@@ -550,12 +550,13 @@ int main(int argc, char **argv) {
OS << ActivePrefix << '\n';
} else if (Arg == "--src-root") {
OS << LLVM_SRC_ROOT << '\n';
+ } else if (Arg == "--ignore-libllvm") {
+ LinkDyLib = false;
+ LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
} else if (Arg == "--link-shared") {
LinkMode = LinkModeShared;
} else if (Arg == "--link-static") {
LinkMode = LinkModeStatic;
- } else if (Arg == "--ignore-libllvm") {
- LinkDyLib = false;
} else {
usage();
}
OpenPOWER on IntegriCloud