[PATCH] D27736: llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvm
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 15:08:14 PST 2016
dschuff created this revision.
dschuff added a reviewer: beanz.
dschuff added a subscriber: llvm-commits.
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.
https://reviews.llvm.org/D27736
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
@@ -550,12 +550,13 @@
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();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27736.81314.patch
Type: text/x-patch
Size: 745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161213/a26b8cc4/attachment.bin>
More information about the llvm-commits
mailing list