summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-08-05 20:03:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-08-05 20:03:57 +0000
commit4280a96468b00f8afb097b8fef737a4b5454b5e4 (patch)
tree1a2df2823e09ea01c2f637efc60a37b84f0d35e0
parent23280472c363314fef03720a11fd9537cf4c4c54 (diff)
downloadbcm5719-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.cpp3
-rw-r--r--lld/test/COFF/export.test1
-rw-r--r--lld/test/COFF/export32.test1
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
OpenPOWER on IntegriCloud