diff options
author | Fangrui Song <i@maskray.me> | 2020-07-20 09:58:31 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2020-07-20 10:02:56 -0700 |
commit | 55fa315b0352b63454206600d6803fafacb42d5e (patch) | |
tree | 1b94450f20d43f5c9621de8586478c6bb937d868 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 2875df0d56572168b478f80f59106284ef15d87d (diff) | |
download | llvm-55fa315b0352b63454206600d6803fafacb42d5e.zip llvm-55fa315b0352b63454206600d6803fafacb42d5e.tar.gz llvm-55fa315b0352b63454206600d6803fafacb42d5e.tar.bz2 |
[LLVMgold.so] -plugin-opt=save-temps: save combined module to .lto.o instead of .o
This matches LLD and fixes https://sourceware.org/bugzilla/show_bug.cgi?id=26262#c1
.o is a bad choice for save-temps output because it is easy to override the bitcode file (*.o)
```
# Use bfd for the example, -fuse-ld=gold is similar.
clang -flto -c a.c # generate bitcode file a.o
clang -fuse-ld=bfd -flto a.o -o a -Wl,-plugin-opt=save-temps # override a.o
# The user repeats the command but get surprised, because a.o is now a combined module.
clang -fuse-ld=bfd -flto a.o -o a -Wl,-plugin-opt=save-temps
```
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D84132
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions