[ELF] - Linkerscript - fix handling of OUTPUT_ARCH command.
OUTPUT_ARCH command can contain architecture values separated with ":", like:
OUTPUT_ARCH(i386:x86-64)
We did not support that, because got 3 lexer tokens here after recent changes.
This trivial patch fixes the issue, now whole expression inside
OUTPUT_ARCH is just ignored.
Differential revision: https://reviews.llvm.org/D29640
llvm-svn: 294432
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index c6b9009..2fa2ff4 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/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() {