[lld] r311682 - Allow not only -O<number> but also -O <number>.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 11:34:44 PDT 2017
Author: ruiu
Date: Thu Aug 24 11:34:44 2017
New Revision: 311682
URL: http://llvm.org/viewvc/llvm-project?rev=311682&view=rev
Log:
Allow not only -O<number> but also -O <number>.
Fixes https://bugs.llvm.org/show_bug.cgi?id=34311
Modified:
lld/trunk/ELF/Options.td
lld/trunk/test/ELF/merge-string.s
Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=311682&r1=311681&r2=311682&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Thu Aug 24 11:34:44 2017
@@ -35,7 +35,7 @@ defm defsym: Eq<"defsym">, HelpText<"Def
defm library_path: Eq<"library-path">,
HelpText<"Add a directory to the library search path">, MetaVarName<"<dir>">;
-def O: Joined<["-"], "O">, HelpText<"Optimize output file size">;
+def O: JoinedOrSeparate<["-"], "O">, HelpText<"Optimize output file size">;
defm Tbss: Eq<"Tbss">,
HelpText<"Same as --section-start with .bss as the sectionname">;
Modified: lld/trunk/test/ELF/merge-string.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/merge-string.s?rev=311682&r1=311681&r2=311682&view=diff
==============================================================================
--- lld/trunk/test/ELF/merge-string.s (original)
+++ lld/trunk/test/ELF/merge-string.s Thu Aug 24 11:34:44 2017
@@ -1,10 +1,10 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld -O2 %t.o -o %t.so -shared
+// RUN: ld.lld -O 2 %t.o -o %t.so -shared
// RUN: llvm-readobj -s -section-data -t %t.so | FileCheck %s
-// RUN: ld.lld -O1 %t.o -o %t.so -shared
+// RUN: ld.lld -O 1 %t.o -o %t.so -shared
// RUN: llvm-readobj -s -section-data -t %t.so | FileCheck --check-prefix=NOTAIL %s
-// RUN: ld.lld -O0 %t.o -o %t.so -shared
+// RUN: ld.lld -O 0 %t.o -o %t.so -shared
// RUN: llvm-readobj -s -section-data -t %t.so | FileCheck --check-prefix=NOMERGE %s
.section .rodata1,"aMS", at progbits,1
More information about the llvm-commits
mailing list