Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

split DWARF .dwo not saved/restored by ThinLTO cache #45662

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR46692
Status CONFIRMED
Importance P normal
Reported by Trass3r (trass3r@gmail.com)
Reported on 2020-07-12 09:49:35 -0700
Last modified on 2021-10-27 10:41:27 -0700
Version trunk
Hardware PC Linux
CC agrieve@google.com, dblaikie@gmail.com, i@maskray.me, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

clang++ -O3 -flto=thin -gsplit-dwarf test.cpp -o test -fuse-ld=lld -Wl,--thinlto-cache-dir=/tmp/testltocache

or

clang++ -O3 -flto=thin -gsplit-dwarf test.cpp -o test -Wl,-plugin-opt,cache-dir=/tmp/testltocache

The first time it runs it does produce a test_dwo/1.dwo file but after that it fetches the object file from the cache and the .dwo is lost.

Quuxplusone commented 3 years ago
Ran into this when trying to enable -gsplit-dwarf in chromium. There are also
issues for incremental builds where stale .dwo files can exist, which I suspect
might be the same root cause. Some details here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1263177