thakis added a comment.

For posterity, https://bugs.chromium.org/p/chromium/issues/detail?id=960881#c31 
has the explanation for what exactly was happening in the Chromium/Android 
build. It's a bit different from rnk's example since no cross-TU imports are 
happening. It likely explains why rnk couldn't find an example that doesn't use 
thinlto though: To get the bug, you need to require debug info in a TU but all 
actual code of the TU needs to be stripped. In regular builds this can't 
happen, but in thinlto builds it can happen in several cases:

- rnk's example: A function is inlined into a different TU for inlining, but 
the definition (+ debug info) is in a different, now-empty TU.

- my example: An inline function is in two TUs. The thin link step marks one of 
them as weak_odr and the others as available_externally, which causes the debug 
info to go into only the TU where the function is weak_odr. If this TU happens 
to contain no actual code, it will now be dead-stripped, even though the other 
TUs relied on it to provide debug info. This doesn't require any cross-TU 
function importing.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54747/new/

https://reviews.llvm.org/D54747



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to