[llvm] r289608 - llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvm
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 15:01:53 PST 2016
Author: dschuff
Date: Tue Dec 13 17:01:53 2016
New Revision: 289608
URL: http://llvm.org/viewvc/llvm-project?rev=289608&view=rev
Log:
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
Modified:
llvm/trunk/tools/llvm-config/llvm-config.cpp
Modified: llvm/trunk/tools/llvm-config/llvm-config.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/llvm-config.cpp?rev=289608&r1=289607&r2=289608&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/llvm-config.cpp (original)
+++ llvm/trunk/tools/llvm-config/llvm-config.cpp Tue Dec 13 17:01:53 2016
@@ -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();
}
More information about the llvm-commits
mailing list