[PATCH] D50105: Allow oformat option to accept elf format
Rumeet Dhindsa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 14:44:52 PDT 2018
rdhindsa updated this revision to Diff 158390.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50105
Files:
lld/ELF/Driver.cpp
lld/test/ELF/oformat-binary.s
Index: lld/test/ELF/oformat-binary.s
===================================================================
--- lld/test/ELF/oformat-binary.s
+++ lld/test/ELF/oformat-binary.s
@@ -19,6 +19,8 @@
# RUN: | FileCheck %s --check-prefix ERR
# ERR: unknown --oformat value: foo
+# RUN: ld.lld -o /dev/null %t --oformat elf
+
.text
.align 4
.globl _start
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -501,6 +501,8 @@
StringRef S = Arg->getValue();
if (S == "binary")
return true;
+ if (S.startswith("elf"))
+ return false;
error("unknown --oformat value: " + S);
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50105.158390.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/64fee3af/attachment.bin>
More information about the llvm-commits
mailing list