[PECOFF][Driver] Allow multiple /include options.

llvm-svn: 187100
This commit is contained in:
Rui Ueyama
2013-07-25 02:57:39 +00:00
parent 5b15037fc9
commit de25a69531
2 changed files with 8 additions and 4 deletions

View File

@@ -373,8 +373,11 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
info.setTerminalServerAware(false);
// handle /include
if (llvm::opt::Arg *sym = parsedArgs->getLastArg(OPT_incl))
info.addInitialUndefinedSymbol(sym->getValue());
for (llvm::opt::arg_iterator it = parsedArgs->filtered_begin(OPT_incl),
ie = parsedArgs->filtered_end();
it != ie; ++it) {
info.addInitialUndefinedSymbol((*it)->getValue());
}
// handle /out
if (llvm::opt::Arg *outpath = parsedArgs->getLastArg(OPT_out))

View File

@@ -1,7 +1,8 @@
# RUN: yaml2obj %p/Inputs/nop.obj.yaml > %t.obj
#
# RUN: not lld -flavor link /out:%t1 /subsystem:console \
# RUN: /include:nosuchsym -- %t.obj 2> %t1
# RUN: /include:sym1 /include:sym2 -- %t.obj 2> %t1
# RUN: FileCheck %s < %t1
CHECK: Undefined Symbol: Linker Internal File : nosuchsym
CHECK: Undefined Symbol: Linker Internal File : sym1
CHECK: Undefined Symbol: Linker Internal File : sym2