GCC: readd visibility attributes for EGL/GLESv2
https://crbug.com/1122889 removed all defines for EGLAPI and
GL_APICALL when compiled with GCC. However, that made all symbols
of libEGL.so and libGLESv2.so hidden. Therefore SwiftShader
can't be used with Chromium anymore.
Bug: chromium:1122889
Change-Id: Ic05e7b5539537731141d945cf7944d07f4c389df
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/55048
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/OpenGL/libEGL/BUILD.gn b/src/OpenGL/libEGL/BUILD.gn
index 1421911..cf86974 100644
--- a/src/OpenGL/libEGL/BUILD.gn
+++ b/src/OpenGL/libEGL/BUILD.gn
@@ -42,7 +42,7 @@
} else if (is_clang) {
defines += [ "EGLAPI=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ]
} else {
- defines += [ "EGLAPI= " ]
+ defines += [ "EGLAPI=__attribute__((visibility(\"protected\")))" ]
}
}
}
diff --git a/src/OpenGL/libGLESv2/BUILD.gn b/src/OpenGL/libGLESv2/BUILD.gn
index f71dc68..fc3ba3a 100644
--- a/src/OpenGL/libGLESv2/BUILD.gn
+++ b/src/OpenGL/libGLESv2/BUILD.gn
@@ -57,7 +57,7 @@
} else if (is_clang) {
defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ]
} else {
- defines += [ "GL_APICALL= " ]
+ defines += [ "GL_APICALL=__attribute__((visibility(\"protected\")))" ]
}
}
}