Open Quuxplusone opened 6 years ago
Bugzilla Link | PR35895 |
Status | NEW |
Importance | P enhancement |
Reported by | Rui Ueyama (ruiu@google.com) |
Reported on | 2018-01-10 16:58:30 -0800 |
Last modified on | 2018-04-02 16:29:04 -0700 |
Version | unspecified |
Hardware | PC Windows NT |
CC | ditaliano@apple.com, grimar@accesssoftek.com, llvm-bugs@lists.llvm.org, pawel_sikora@zoho.com, rafael@espindo.la |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
there's no Os for LTO, as far as I can tell. So you can probably ignore?
What I do not understand is that gold plugin doesn't take -plugin-opt=Os as well.
How does it work?
Should it work with gold ? Does not work for me, looks like expected behavior
actually:
~/LLVM/build_goldplugin/bin/clang -fuse-ld=gold -Os -flto=thin 1.cpp -o out -v
...
"/usr/local/bin/ld.gold" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o out /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7.2.0/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/7.2.0 -L/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../.. -L/home/umb/LLVM/build_goldplugin/bin/../lib -L/lib -L/usr/lib -plugin /home/umb/LLVM/build_goldplugin/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=Os -plugin-opt=thinlto /tmp/1-f9536b.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/7.2.0/crtend.o /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../x86_64-linux-gnu/crtn.o
/usr/local/bin/ld.gold: fatal error: Optimization level must be between 0 and 3
clang-7.0: error: linker command failed with exit code 1 (use -v to see
invocation)
Is there any issue here? Seems invalid for me.
Lets reassign to clang for now as both lld and the gold plugin reject this.