diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-05 20:03:57 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-05 20:03:57 +0000 |
| commit | 4280a96468b00f8afb097b8fef737a4b5454b5e4 (patch) | |
| tree | 1a2df2823e09ea01c2f637efc60a37b84f0d35e0 | |
| parent | 23280472c363314fef03720a11fd9537cf4c4c54 (diff) | |
| download | bcm5719-llvm-4280a96468b00f8afb097b8fef737a4b5454b5e4.tar.gz bcm5719-llvm-4280a96468b00f8afb097b8fef737a4b5454b5e4.zip | |
Handle writeImportLibrary failing.
We were printing an error but exiting with 0.
Not sure how to test this. We could add a no-winlib feature,
but that is probably not worth it.
llvm-svn: 244109
| -rw-r--r-- | lld/COFF/Driver.cpp | 3 | ||||
| -rw-r--r-- | lld/test/COFF/export.test | 1 | ||||
| -rw-r--r-- | lld/test/COFF/export32.test | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index ce2db0945c0..225453291a9 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -710,7 +710,8 @@ bool LinkerDriver::link(llvm::ArrayRef<const char *> ArgsArr) { if (!Config->Exports.empty()) { if (fixupExports()) return false; - writeImportLibrary(); + if (writeImportLibrary()) + return false; assignExportOrdinals(); } diff --git a/lld/test/COFF/export.test b/lld/test/COFF/export.test index aa6343dab34..bb18ca597a6 100644 --- a/lld/test/COFF/export.test +++ b/lld/test/COFF/export.test @@ -2,6 +2,7 @@ # # RUN: lld -flavor link2 /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 # RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK1 %s +# REQUIRES: winlib CHECK1: Export Table: CHECK1: DLL name: export.test.tmp.dll diff --git a/lld/test/COFF/export32.test b/lld/test/COFF/export32.test index 62ee1a66f4f..7681f877d65 100644 --- a/lld/test/COFF/export32.test +++ b/lld/test/COFF/export32.test @@ -2,6 +2,7 @@ # # RUN: lld -flavor link2 /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 # RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK1 %s +# REQUIRES: winlib # CHECK1: Export Table: # CHECK1: DLL name: export32.test.tmp.dll |

