OSDN Git Service
Prevent LTO from eliminating cross-library virtual methods.
libEGL has to call virtual methods on objects created withing libGLESv2,
and vice-versa. Clang's aggressive link-time-optimization considers
calls to these methods unreachable, because they're not defined within
the same linkage unit. So when they do get called, we're hitting UD
instructions. It can be fixed by marking these classes with
[[clang::lto_visibility_public]] attributes:
https://clang.llvm.org/docs/LTOVisibility.html
Bug chromium:720933
Change-Id: I87f9b09921a1b2d443121efcdb5525ff4cb5797b
Reviewed-on: https://swiftshader-review.googlesource.com/9688
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
20 files changed: