File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -381,9 +381,11 @@ template <class ELFT> void Writer<ELFT>::run() {
381381 if (errCount (ctx))
382382 return ;
383383
384- if (auto e = buffer->commit ())
385- Err (ctx) << " failed to write output '" << buffer->getPath ()
386- << " ': " << std::move (e);
384+ if (!ctx.e .disableOutput ) {
385+ if (auto e = buffer->commit ())
386+ Err (ctx) << " failed to write output '" << buffer->getPath ()
387+ << " ': " << std::move (e);
388+ }
387389
388390 if (!ctx.arg .cmseOutputLib .empty ())
389391 writeARMCmseImportLib<ELFT>(ctx);
Original file line number Diff line number Diff line change 11# REQUIRES: x86
22
33# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4- # RUN: ld.lld %t.o -o - > %t1
4+ ## Test that we only write to "-" once.
5+ # RUN: LLD_IN_TEST=2 ld.lld %t.o -o - > %t1
56# RUN: llvm-objdump -d %t1 | FileCheck %s
67
78# CHECK: nop
You can’t perform that action at this time.
0 commit comments