Prevent LTO from eliminating releaseTexImage() calls.
Texture::releaseTexImage() is a virtual method called by libEGL but
defined by libGLESv2, so prevent LTO from treating it as undefined.
This fixes running Chromium swiftshader_unittests with an 'is_official'
build.
Bug chromium:720933
Change-Id: I58c4441f9bd32b96703a28267837cc79b6087659
Reviewed-on: https://swiftshader-review.googlesource.com/19708
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/OpenGL/libEGL/Texture.hpp b/src/OpenGL/libEGL/Texture.hpp
index 0483185..ebeb8d1 100644
--- a/src/OpenGL/libEGL/Texture.hpp
+++ b/src/OpenGL/libEGL/Texture.hpp
@@ -24,7 +24,7 @@
namespace egl
{
-class Texture : public gl::NamedObject
+class [[clang::lto_visibility_public]] Texture : public gl::NamedObject
{
public:
Texture(GLuint name) : NamedObject(name) {}