[lld] r244109 - Handle writeImportLibrary failing.
Rafael Espindola
rafael.espindola at gmail.com
Wed Aug 5 13:03:58 PDT 2015
Author: rafael
Date: Wed Aug 5 15:03:57 2015
New Revision: 244109
URL: http://llvm.org/viewvc/llvm-project?rev=244109&view=rev
Log:
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.
Modified:
lld/trunk/COFF/Driver.cpp
lld/trunk/test/COFF/export.test
lld/trunk/test/COFF/export32.test
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=244109&r1=244108&r2=244109&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Wed Aug 5 15:03:57 2015
@@ -710,7 +710,8 @@ bool LinkerDriver::link(llvm::ArrayRef<c
if (!Config->Exports.empty()) {
if (fixupExports())
return false;
- writeImportLibrary();
+ if (writeImportLibrary())
+ return false;
assignExportOrdinals();
}
Modified: lld/trunk/test/COFF/export.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/export.test?rev=244109&r1=244108&r2=244109&view=diff
==============================================================================
--- lld/trunk/test/COFF/export.test (original)
+++ lld/trunk/test/COFF/export.test Wed Aug 5 15:03:57 2015
@@ -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
Modified: lld/trunk/test/COFF/export32.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/export32.test?rev=244109&r1=244108&r2=244109&view=diff
==============================================================================
--- lld/trunk/test/COFF/export32.test (original)
+++ lld/trunk/test/COFF/export32.test Wed Aug 5 15:03:57 2015
@@ -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
More information about the llvm-commits
mailing list