mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
glapi: Make _GLAPI_EXPORT a no-op on Windows.
DLL import/export annotations unneeded, now that glapi is statically linked into libgallium_wgl. However _mesa_glapi_get_proc_address and _mesa_glapi_get_dispatch need to be explicitly exported for libEGL and libGLESv2. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12573 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33822>
This commit is contained in:
parent
80fef30531
commit
e3741a5731
5 changed files with 10 additions and 22 deletions
|
|
@ -18,7 +18,7 @@ libopengl32 = shared_library(
|
|||
inc_include, inc_wgl, inc_src, inc_gallium,
|
||||
],
|
||||
link_with : [
|
||||
libgallium_wgl, libglapi_bridge, libglapi
|
||||
libgallium_wgl, libglapi_bridge
|
||||
],
|
||||
dependencies : [
|
||||
idep_mesautil
|
||||
|
|
|
|||
|
|
@ -50,3 +50,6 @@ stw_get_config_xml
|
|||
stw_interop_query_device_info
|
||||
stw_interop_export_object
|
||||
stw_interop_flush_objects
|
||||
|
||||
_mesa_glapi_get_proc_address
|
||||
_mesa_glapi_get_dispatch
|
||||
|
|
|
|||
|
|
@ -54,21 +54,13 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef _GLAPI_NO_EXPORTS
|
||||
#ifdef _WIN32
|
||||
# define _GLAPI_EXPORT
|
||||
#else /* _GLAPI_NO_EXPORTS */
|
||||
# ifdef _WIN32
|
||||
# ifdef _GLAPI_DLL_EXPORTS
|
||||
# define _GLAPI_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define _GLAPI_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
# elif defined(__GNUC__)
|
||||
# define _GLAPI_EXPORT __attribute__((visibility("default")))
|
||||
# else
|
||||
# define _GLAPI_EXPORT
|
||||
# endif
|
||||
#endif /* _GLAPI_NO_EXPORTS */
|
||||
#elif defined(__GNUC__)
|
||||
# define _GLAPI_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
# define _GLAPI_EXPORT
|
||||
#endif
|
||||
|
||||
|
||||
typedef void (*_glapi_proc)(void);
|
||||
|
|
|
|||
|
|
@ -20,16 +20,10 @@ shared_glapi_mapi_tmp_h = custom_target(
|
|||
capture : true,
|
||||
)
|
||||
|
||||
_glapi_c_args = []
|
||||
if with_platform_windows
|
||||
_glapi_c_args += ['-D_GLAPI_DLL_EXPORTS']
|
||||
endif
|
||||
|
||||
libglapi = static_library(
|
||||
'glapi',
|
||||
[files_shared_glapi, shared_glapi_mapi_tmp_h],
|
||||
c_args : [
|
||||
_glapi_c_args,
|
||||
c_msvc_compat_args,
|
||||
'-DMAPI_MODE_GLAPI',
|
||||
'-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path()),
|
||||
|
|
|
|||
|
|
@ -443,7 +443,6 @@ endif
|
|||
_mesa_windows_args = []
|
||||
if with_platform_windows
|
||||
_mesa_windows_args += [
|
||||
'-D_GLAPI_NO_EXPORTS',
|
||||
'-D_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
|
||||
]
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue