summaryrefslogtreecommitdiffstats
path: root/lld/lib
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-07-19 01:38:49 +0000
committerRui Ueyama <ruiu@google.com>2013-07-19 01:38:49 +0000
commit9f24922bd18a59d13282f26f2d4e6e6c7207a8e0 (patch)
tree4a1bfc55a6fcb79ef02e169f436b942882f721b6 /lld/lib
parent32488bd55927247cd07d8e540ab48c5ffbcfd055 (diff)
downloadbcm5719-llvm-9f24922bd18a59d13282f26f2d4e6e6c7207a8e0.tar.gz
bcm5719-llvm-9f24922bd18a59d13282f26f2d4e6e6c7207a8e0.zip
[PECOFF][Driver] Add -libpath command line option.
The logic to search a library from the library paths will be implemented in a different patch. llvm-svn: 186644
Diffstat (limited to 'lld/lib')
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp7
-rw-r--r--lld/lib/Driver/WinLinkOptions.td4
2 files changed, 11 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 0eff1b27384..d1e51f95706 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -254,6 +254,13 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
if (llvm::opt::Arg *arg = parsedArgs->getLastArg(OPT_entry))
info.setEntrySymbolName(arg->getValue());
+ // Hanlde -libpath
+ for (llvm::opt::arg_iterator it = parsedArgs->filtered_begin(OPT_libpath),
+ ie = parsedArgs->filtered_end();
+ it != ie; ++it) {
+ info.appendInputSearchPath((*it)->getValue());
+ }
+
// Handle -force
if (parsedArgs->getLastArg(OPT_force))
info.setAllowRemainingUndefines(true);
diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td
index 8669ca8fb65..16ebcd3a9de 100644
--- a/lld/lib/Driver/WinLinkOptions.td
+++ b/lld/lib/Driver/WinLinkOptions.td
@@ -25,6 +25,10 @@ def entry : Separate<["-", "/"], "entry">,
HelpText<"Name of entry point symbol">;
def entry_c: Joined<["-", "/"], "entry:">, Alias<entry>;
+def libpath : Separate<["-", "/"], "libpath">,
+ HelpText<"Additional library search path">;
+def libpath_c: Joined<["-", "/"], "libpath:">, Alias<libpath>;
+
def force : Flag<["-", "/"], "force">,
HelpText<"Allow undefined symbols when creating executables">;
OpenPOWER on IntegriCloud