aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-ld
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-03-06 06:38:19 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-03-06 06:38:19 +0000
commit78df5c3121b2fa212354faaab32d81c8399bcbb4 (patch)
treef75c0828c49a7264bfe85e0cba31106043a2b73d /tools/llvm-ld
parent6b36ce920254dc8ca5c60baec1a23e271e7a34ce (diff)
downloadexternal_llvm-78df5c3121b2fa212354faaab32d81c8399bcbb4.zip
external_llvm-78df5c3121b2fa212354faaab32d81c8399bcbb4.tar.gz
external_llvm-78df5c3121b2fa212354faaab32d81c8399bcbb4.tar.bz2
Make sure command line options are parsed before we try to add the LibPath
(-L options) to TheLinker. Problem noticed by Wink Saville. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r--tools/llvm-ld/llvm-ld.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp
index f6c9c74..46fd291 100644
--- a/tools/llvm-ld/llvm-ld.cpp
+++ b/tools/llvm-ld/llvm-ld.cpp
@@ -406,14 +406,14 @@ int main(int argc, char **argv, char **envp) {
progname = sys::Path(argv[0]).getBasename();
Linker TheLinker(progname, OutputFilename, Verbose);
- // Set up the library paths for the Linker
- TheLinker.addPaths(LibPaths);
- TheLinker.addSystemPaths();
-
// Parse the command line options
cl::ParseCommandLineOptions(argc, argv, " llvm linker\n");
sys::PrintStackTraceOnErrorSignal();
+ // Set up the library paths for the Linker
+ TheLinker.addPaths(LibPaths);
+ TheLinker.addSystemPaths();
+
// Remove any consecutive duplicates of the same library...
Libraries.erase(std::unique(Libraries.begin(), Libraries.end()),
Libraries.end());