diff --git a/BUILD.gn b/BUILD.gn index c72321891..c3ca8677f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -281,15 +281,9 @@ config("libANGLE_config") { ] if (is_win) { - defines += [ - "GL_APICALL=", - "EGLAPI=", - ] + defines += [ "GL_APICALL=" ] } else { - defines += [ - "GL_APICALL=__attribute__((visibility(\"default\")))", - "EGLAPI=__attribute__((visibility(\"default\")))", - ] + defines += [ "GL_APICALL=__attribute__((visibility(\"default\")))" ] } if (is_win) { cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled. @@ -473,10 +467,14 @@ shared_library("libEGL") { ":debug_annotations_config", ":extra_warnings", ":internal_config", - ":libANGLE_config", ] defines = [ "LIBEGL_IMPLEMENTATION" ] + if (is_win) { + defines += [ "EGLAPI=" ] + } else { + defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ] + } deps = [ ":includes", diff --git a/src/libEGL.gypi b/src/libEGL.gypi index 86158a6e9..4d37bee9e 100644 --- a/src/libEGL.gypi +++ b/src/libEGL.gypi @@ -12,7 +12,6 @@ 'type': '<(angle_gl_library_type)', 'dependencies': [ - 'libANGLE', 'libGLESv2', ], 'includes': @@ -34,6 +33,24 @@ { 'msvs_requires_importlibrary' : 'true', }], + ['OS=="win"', { + 'defines': + [ + 'EGLAPI=', + ], + }, { + 'defines': + [ + 'EGLAPI=__attribute__((visibility("default")))', + ], + }], + ['OS == "mac"', + { + 'xcode_settings': + { + 'DYLIB_INSTALL_NAME_BASE': '@rpath', + }, + }], ], }, ], diff --git a/src/libGLESv2.gypi b/src/libGLESv2.gypi index 595d2e79c..c54a31643 100644 --- a/src/libGLESv2.gypi +++ b/src/libGLESv2.gypi @@ -763,13 +763,11 @@ 'defines': [ 'GL_APICALL=', - 'EGLAPI=', ], }, { 'defines': [ 'GL_APICALL=__attribute__((visibility("default")))', - 'EGLAPI=__attribute__((visibility("default")))', ], }], ['OS == "mac"', diff --git a/src/tests/deqp.gypi b/src/tests/deqp.gypi index 0854134a9..b788f552e 100644 --- a/src/tests/deqp.gypi +++ b/src/tests/deqp.gypi @@ -1718,6 +1718,8 @@ 'dependencies': [ 'angle_deqp_libgles2', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1731,6 +1733,8 @@ 'dependencies': [ 'angle_deqp_libgles3', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1744,6 +1748,8 @@ 'dependencies': [ 'angle_deqp_libgles31', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1757,6 +1763,8 @@ 'dependencies': [ 'angle_deqp_libegl', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1861,6 +1869,8 @@ [ 'angle_deqp_gtest_support', 'angle_deqp_libgles2', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1876,6 +1886,8 @@ [ 'angle_deqp_gtest_support', 'angle_deqp_libgles3', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1891,6 +1903,8 @@ [ 'angle_deqp_gtest_support', 'angle_deqp_libgles31', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ @@ -1906,6 +1920,8 @@ [ 'angle_deqp_gtest_support', 'angle_deqp_libegl', + # Real dependency is in angle_deqp_libtester, however, not propagated here by GYP + '<(angle_path)/src/angle.gyp:libEGL', ], 'sources': [ diff --git a/src/tests/egl_tests/EGLThreadTest.cpp b/src/tests/egl_tests/EGLThreadTest.cpp index 305ccc25f..77a8db359 100644 --- a/src/tests/egl_tests/EGLThreadTest.cpp +++ b/src/tests/egl_tests/EGLThreadTest.cpp @@ -3,11 +3,11 @@ #include #include -typedef EGLAPI EGLDisplay EGLAPIENTRY EGLGetDisplay(EGLNativeDisplayType display_id); -typedef EGLAPI EGLBoolean EGLAPIENTRY EGLInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); -typedef EGLAPI EGLContext EGLAPIENTRY EGLGetCurrentContext(void); -typedef EGLAPI EGLSurface EGLAPIENTRY EGLGetCurrentSurface(EGLint readdraw); -typedef EGLAPI EGLBoolean EGLAPIENTRY EGLTerminate(EGLDisplay dpy); +typedef EGLDisplay EGLAPIENTRY EGLGetDisplay(EGLNativeDisplayType display_id); +typedef EGLBoolean EGLAPIENTRY EGLInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); +typedef EGLContext EGLAPIENTRY EGLGetCurrentContext(void); +typedef EGLSurface EGLAPIENTRY EGLGetCurrentSurface(EGLint readdraw); +typedef EGLBoolean EGLAPIENTRY EGLTerminate(EGLDisplay dpy); class EGLThreadTest : public testing::Test {