Index: lld/trunk/ELF/LinkerScript.cpp =================================================================== --- lld/trunk/ELF/LinkerScript.cpp +++ lld/trunk/ELF/LinkerScript.cpp @@ -1247,10 +1247,10 @@ } void ScriptParser::readOutputArch() { - // Error checking only for now. + // OUTPUT_ARCH is ignored for now. expect("("); - skip(); - expect(")"); + while (!Error && !consume(")")) + skip(); } void ScriptParser::readOutputFormat() { Index: lld/trunk/test/ELF/linkerscript/outputarch.s =================================================================== --- lld/trunk/test/ELF/linkerscript/outputarch.s +++ lld/trunk/test/ELF/linkerscript/outputarch.s @@ -1,9 +1,4 @@ # REQUIRES: x86 -# RUN: echo "OUTPUT_ARCH(x)" > %t.script +# RUN: echo "OUTPUT_ARCH(All data written here is ignored)" > %t.script # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s -o %t1 # RUN: ld.lld -shared -o %t2 %t1 %t.script -# RUN: llvm-readobj %t2 > /dev/null - -# RUN: echo "OUTPUT_ARCH(x, y)" > %t.script -# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s -o %t1 -# RUN: not ld.lld -shared -o %t2 %t1 %t.script