Commit ff7aac5e by Jamie Madill Committed by Commit Bot

Re-land "Export angle::PlatformMethods."

This should fix undefined function call sanitizer warnings. Re-land fixes the build and uses proper export annotation. Also fixes the missing source includes in BUILD.gn for libANGLE so future changes to Platform.h (and other includes) will get picked up by the dependency analyzer step. BUG=chromium:778918 Change-Id: I92cc8a43bbbdc70de50a67f73b223d8f903cd6cd Reviewed-on: https://chromium-review.googlesource.com/767111 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarAntoine Labour <piman@chromium.org>
parent 36f34243
...@@ -111,20 +111,7 @@ angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ] ...@@ -111,20 +111,7 @@ angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ]
# Holds the shared includes so we only need to list them once. # Holds the shared includes so we only need to list them once.
source_set("includes") { source_set("includes") {
sources = [ sources = rebase_path(gles_gypi.libangle_includes, ".", "src")
"include/EGL/egl.h",
"include/EGL/eglext.h",
"include/EGL/eglplatform.h",
"include/GLES2/gl2.h",
"include/GLES2/gl2ext.h",
"include/GLES2/gl2platform.h",
"include/GLES3/gl3.h",
"include/GLES3/gl31.h",
"include/GLES3/gl32.h",
"include/GLES3/gl3platform.h",
"include/GLSLANG/ShaderLang.h",
"include/KHR/khrplatform.h",
]
} }
static_library("preprocessor") { static_library("preprocessor") {
......
...@@ -16,10 +16,8 @@ ...@@ -16,10 +16,8 @@
# if !defined(LIBANGLE_IMPLEMENTATION) # if !defined(LIBANGLE_IMPLEMENTATION)
# define ANGLE_PLATFORM_EXPORT __declspec(dllimport) # define ANGLE_PLATFORM_EXPORT __declspec(dllimport)
# endif # endif
#elif defined(__GNUC__) #elif defined(__GNUC__) || defined(__clang__)
# if defined(LIBANGLE_IMPLEMENTATION) # define ANGLE_PLATFORM_EXPORT __attribute__((visibility ("default")))
# define ANGLE_PLATFORM_EXPORT __attribute__((visibility ("default")))
# endif
#endif #endif
#if !defined(ANGLE_PLATFORM_EXPORT) #if !defined(ANGLE_PLATFORM_EXPORT)
# define ANGLE_PLATFORM_EXPORT # define ANGLE_PLATFORM_EXPORT
...@@ -264,7 +262,7 @@ inline void DefaultCacheProgram(PlatformMethods *platform, ...@@ -264,7 +262,7 @@ inline void DefaultCacheProgram(PlatformMethods *platform,
#define ANGLE_PLATFORM_METHOD_DEF(Name, CapsName) CapsName##Func Name = Default##CapsName; #define ANGLE_PLATFORM_METHOD_DEF(Name, CapsName) CapsName##Func Name = Default##CapsName;
struct PlatformMethods struct ANGLE_PLATFORM_EXPORT PlatformMethods
{ {
// User data pointer for any implementation specific members. Put it at the start of the // User data pointer for any implementation specific members. Put it at the start of the
// platform structure so it doesn't become overwritten if one version of the platform // platform structure so it doesn't become overwritten if one version of the platform
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment