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() {
381
381
if (errCount (ctx))
382
382
return ;
383
383
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
+ }
387
389
388
390
if (!ctx.arg .cmseOutputLib .empty ())
389
391
writeARMCmseImportLib<ELFT>(ctx);
Original file line number Diff line number Diff line change 1
1
# REQUIRES: x86
2
2
3
3
# 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
5
6
# RUN: llvm-objdump -d %t1 | FileCheck %s
6
7
7
8
# CHECK: nop
You can’t perform that action at this time.
0 commit comments