glx: remove the hack that forced exporting GL functions from libGL

GL functions were exported by luck because we incorrectly used
link_with in meson, which exports functions only if the static lib is
used. link_whole guarantees that the functions are always exported
even if the static lib is unused.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
This commit is contained in:
Marek Olšák 2025-03-08 22:25:27 -05:00 committed by Marge Bot
parent e6da775506
commit b928304732
2 changed files with 1 additions and 15 deletions

View file

@ -424,20 +424,7 @@ static const __DRIextension *kopper_extensions_noshm[] = {
static void
drisw_wait_gl(struct glx_context *context)
{
/* TODO: Calling glFinish directly is the only thing that causes libGL.so
* to export all GL functions. This is fragile and needs a proper solution.
*
* On top of that, this code is only compiled with GLX_DIRECT_RENDERING,
* which means that indirect-only libGL (-Dglx-direct=false) doesn't export
* any GL functions.
*
* TODO: Always use CALL_Finish instead of glFinish.
*/
#if USE_LIBGLVND
CALL_Finish(GET_DISPATCH(), ());
#else
glFinish();
#endif
}
static void

View file

@ -136,8 +136,7 @@ libgl_link = with_glvnd ? [] : [libglapi_bridge]
libgl = shared_library(
gl_lib_name,
[],
link_with : libgl_link,
link_whole : libglx,
link_whole : [libglx, libgl_link],
link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
dependencies : [
dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,