summaryrefslogtreecommitdiff
path: root/src/mapi
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-09-01 06:58:14 -0700
committerJesse Natalie <jenatali@microsoft.com>2021-09-08 07:21:53 -0700
commit2a76c976d1cddb6a9db6eea644cc73ea75d755db (patch)
tree633bd4119a132bffb5810c914116750d3248ea50 /src/mapi
parent03006926de1b204085a1c37f9abb7df7ce566e68 (diff)
static-glapi: Fix MSVC preprocessor definitions
Previously, any DLL which links any function from libglapi-static would end up exporting the entire GL API surface area, due to the dllexport introduced by BUILD_GL32. This fix allows DLLs to internally include definitions of gl* APIs without having to export the entire surface. Also, remove unreachable with_shared_glapi branch already in an else block. Reviewed By: Bill Kristiansen <billkris@microsoft.com> Reviewed-by: Charmaine Lee >charmainel@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/meson.build9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build
index 1b8b685f207..3eb4318dedb 100644
--- a/src/mapi/glapi/meson.build
+++ b/src/mapi/glapi/meson.build
@@ -47,17 +47,12 @@ if with_shared_glapi
gcc_lto_quirk,
]
if with_platform_windows
- static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32']
+ static_glapi_args += ['-D_GDI32_']
endif
else
static_glapi_args += '-DMAPI_MODE_UTIL'
if with_platform_windows
- static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32', '-DKHRONOS_DLL_EXPORTS']
- if with_shared_glapi
- static_glapi_args += '-D_GLAPI_DLL_EXPORTS'
- else
- static_glapi_args += '-D_GLAPI_NO_EXPORTS'
- endif
+ static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32', '-DKHRONOS_DLL_EXPORTS', '-D_GLAPI_NO_EXPORTS']
endif
static_glapi_files += files(
'glapi_dispatch.c',