forked from OSchip/llvm-project
Allow not only -O<number> but also -O <number>.
Fixes https://bugs.llvm.org/show_bug.cgi?id=34311 llvm-svn: 311682
This commit is contained in:
parent
00cf731ecd
commit
5c19028cec
|
@ -35,7 +35,7 @@ defm defsym: Eq<"defsym">, HelpText<"Define a symbol alias">;
|
|||
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">;
|
||||
|
|
|
@ -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",@progbits,1
|
||||
|
|
Loading…
Reference in New Issue