mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
LibDriver: Silently do nothing when provided no inputs.
This behavior is strange, but it matches lib.exe. Based on a patch by Nico Weber. Fixes PR27335. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266236 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a486ec618
commit
9e81c60d6e
@ -122,8 +122,8 @@ int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
|
||||
llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
|
||||
|
||||
if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) {
|
||||
llvm::errs() << "no input files.\n";
|
||||
return 1;
|
||||
// No input files. To match lib.exe, silently do nothing.
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<StringRef> SearchPaths = getSearchPaths(&Args, Saver);
|
||||
|
2
test/LibDriver/no-inputs.test
Normal file
2
test/LibDriver/no-inputs.test
Normal file
@ -0,0 +1,2 @@
|
||||
RUN: llvm-lib -out:%t.a
|
||||
RUN: test ! -e %t.a
|
Loading…
Reference in New Issue
Block a user