File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ static bool isCompatible(Ctx &ctx, InputFile *file) {
284
284
StringRef target =
285
285
!ctx.arg .bfdname .empty () ? ctx.arg .bfdname : ctx.arg .emulation ;
286
286
if (!target.empty ()) {
287
- ErrAlways (ctx) << file << " is incompatible with " << target;
287
+ Err (ctx) << file << " is incompatible with " << target;
288
288
return false ;
289
289
}
290
290
@@ -295,10 +295,10 @@ static bool isCompatible(Ctx &ctx, InputFile *file) {
295
295
existing = ctx.sharedFiles [0 ];
296
296
else if (!ctx.bitcodeFiles .empty ())
297
297
existing = ctx.bitcodeFiles [0 ];
298
- std::string with;
298
+ auto diag = Err (ctx);
299
+ diag << file << " is incompatible" ;
299
300
if (existing)
300
- with = " with " + toStr (ctx, existing);
301
- ErrAlways (ctx) << file << " is incompatible" << with;
301
+ diag << " with " << existing;
302
302
return false ;
303
303
}
304
304
Original file line number Diff line number Diff line change 6
6
7
7
// RUN: not ld.lld %ta.o %tb.o -o /dev/null 2>&1 | \
8
8
// RUN: FileCheck --check-prefix=A-AND-B %s
9
- // A-AND-B: b.o is incompatible with {{.*}}a.o
9
+ // A-AND-B: error: {{.*}} b.o is incompatible with {{.*}}a.o
10
10
11
- // RUN: not ld.lld %tb.o %tc.o -o /dev/null 2>&1 | \
11
+ // RUN: ld.lld --noinhibit-exec %tb.o %tc.o -o /dev/null 2>&1 | \
12
12
// RUN: FileCheck --check-prefix=B-AND-C %s
13
- // B-AND-C: c.o is incompatible with {{.*}}b.o
13
+ // B-AND-C: warning: {{.*}} c.o is incompatible with {{.*}}b.o
14
14
15
15
// RUN: not ld.lld %ta.o %ti686.so -o /dev/null 2>&1 | \
16
16
// RUN: FileCheck --check-prefix=A-AND-SO %s
69
69
// RUN: rm -f %t.a
70
70
// RUN: llvm-ar rc %t.a %tc.o
71
71
// RUN: llvm-mc -filetype=obj -triple=i686-linux %s -o %td.o
72
- // RUN: not ld.lld %t.a %td.o 2>&1 -o /dev/null | FileCheck --check-prefix=ARCHIVE %s
73
- // ARCHIVE: {{.*}}d.o is incompatible
72
+ // RUN: ld.lld --noinhibit-exec %t.a %td.o 2>&1 -o /dev/null | FileCheck --check-prefix=ARCHIVE %s
73
+ // ARCHIVE: warning: {{.*}}d.o is incompatible{{$}}
74
74
.global _start
75
75
_start:
76
76
.data
You can’t perform that action at this time.
0 commit comments