lld::stdoutOS = &stdoutOS;
lld::stderrOS = &stderrOS;
+ stderrOS.enable_colors(stderrOS.has_colors());
+ // TODO: Set up error handler properly, e.g. the errorLimitExceededMsg
+
MachOOptTable parser;
opt::InputArgList args = parser.parse(argsArr.slice(1));
# RUN: yaml2obj %s -o %t.o
# RUN: not lld -flavor darwinnew -o %t %t.o 2>&1 | FileCheck %s
#
-# CHECK: alignment 32 of section __text is too large
+# CHECK: error: alignment 32 of section __text is too large
--- !mach-o
FileHeader:
magic: 0xFEEDFACF
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-darwin %s -o %t.o
# RUN: lld -flavor darwinnew -arch x86_64 -o /dev/null %t.o
# RUN: not lld -flavor darwinnew -arch i386 -o /dev/null %t.o 2>&1 | FileCheck %s
-# CHECK: missing or unsupported -arch i386
+# CHECK: error: missing or unsupported -arch i386
.text
.global _main
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t-dup.o
# RUN: not lld -flavor darwinnew -o /dev/null %t-dup.o %t.o 2>&1 | FileCheck %s
-# CHECK: duplicate symbol: _main
+# CHECK: error: duplicate symbol: _main
.text
.global _main
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: lld -flavor darwinnew -o /dev/null %t.o -e _not_main
# RUN: not lld -flavor darwinnew -o /dev/null %t.o -e _missing 2>&1 | FileCheck %s
-# RUN: not lld -flavor darwinnew -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=DEFAULT_ENTRY
+# RUN: not lld -flavor darwinnew -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=DEFAULT-ENTRY
-# CHECK: undefined symbol: _missing
-# DEFAULT_ENTRY: undefined symbol: _main
+# CHECK: error: undefined symbol: _missing
+# DEFAULT-ENTRY: error: undefined symbol: _main
.text
.global _not_main
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-darwin %s -o %t.o
# RUN: lld -flavor darwinnew -o %t %t.o
-# RUN: not lld -flavor darwinnew -o /dev/null %t 2>&1 | FileCheck %s
-# CHECK: unhandled file type
+# RUN: not lld -flavor darwinnew -o /dev/null %t 2>&1 | FileCheck %s -DFILE=%t
+# CHECK: error: [[FILE]]: unhandled file type
.text
.global _main
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: not lld -flavor darwinnew -Z -o %t -lmissing %t.o 2>&1 | FileCheck %s
-# CHECK: library not found for -lmissing
+# CHECK: error: library not found for -lmissing
# RUN: yaml2obj %p/Inputs/no-id-dylib.yaml -o %t/libnoid.dylib
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/no-id-dylink.o
# RUN: not lld -flavor darwinnew -o %t/no-id-dylink -Z -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s
-# CHECK: dylib {{.*}}libnoid.dylib missing LC_ID_DYLIB load command
+# CHECK: error: dylib {{.*}}libnoid.dylib missing LC_ID_DYLIB load command
.text
.globl _main
# REQUIRES: x86
# RUN: not lld -flavor darwinnew -o /dev/null %t-no-such-file.o 2>&1 | FileCheck %s
-# CHECK: cannot open {{.*}}no-such-file.o
+# CHECK: error: cannot open {{.*}}no-such-file.o
RUN: -lto_library /lib/foo \
RUN: -macosx_version_min 0
RUN: not lld -flavor darwinnew -v --not-an-ignored-argument 2>&1 | FileCheck %s
-CHECK: unknown argument: --not-an-ignored-argument
+CHECK: error: unknown argument: --not-an-ignored-argument