From 8a1c56ba251bc4eb289a4794ef67421c6ac36b36 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sat, 4 Mar 2023 17:41:13 +0000 Subject: [PATCH] meson: remove broken -Dwith_dlsym The option does not even build, so let's remove it. Signed-off-by: Emil Velikov --- meson_options.txt | 1 - src/meson.build | 4 ---- src/real_dlsym.cpp | 26 -------------------------- 3 files changed, 31 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 4542cc2d..ef0e83e2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,7 +12,6 @@ option('with_xnvctrl', type : 'feature', value : 'enabled', description: 'Enable option('with_x11', type : 'feature', value : 'enabled') option('with_wayland', type : 'feature', value : 'disabled') option('with_dbus', type : 'feature', value : 'enabled') -option('with_dlsym', type : 'feature', value : 'disabled') option('loglevel', type: 'combo', choices : ['trace', 'debug', 'info', 'warn', 'err', 'critical', 'off'], value : 'info', description: 'Max log level in non-debug build') option('mangoapp', type: 'boolean', value : false) option('mangoapp_32bit', type: 'boolean', value : false) diff --git a/src/meson.build b/src/meson.build index d4445b9e..4c6bca3d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -93,10 +93,6 @@ if is_unixy 'gl/inject_egl.cpp', ) - if get_option('with_dlsym').enabled() - pre_args += '-DHOOK_DLSYM' - endif - nvml_h_found = get_option('with_nvml') == 'enabled' if get_option('with_nvml') == 'system' nvml_h_found = cc.has_header('nvml.h') diff --git a/src/real_dlsym.cpp b/src/real_dlsym.cpp index f3817565..9867a784 100644 --- a/src/real_dlsym.cpp +++ b/src/real_dlsym.cpp @@ -103,29 +103,3 @@ void* get_proc_address(const char* name) { void (*func)() = (void (*)())real_dlsym(RTLD_NEXT, name); return (void*)func; } - -#ifdef HOOK_DLSYM -EXPORT_C_(void *) mangohud_find_glx_ptr(const char *name); -EXPORT_C_(void *) mangohud_find_egl_ptr(const char *name); - -EXPORT_C_(void*) dlsym(void * handle, const char * name) -{ - void* func = nullptr; -#ifdef HAVE_X11 - func = mangohud_find_glx_ptr(name); - if (func) { - //fprintf(stderr,"%s: local: %s\n", __func__ , name); - return func; - } -#endif - - func = mangohud_find_egl_ptr(name); - if (func) { - //fprintf(stderr,"%s: local: %s\n", __func__ , name); - return func; - } - - //fprintf(stderr,"%s: foreign: %s\n", __func__ , name); - return real_dlsym(handle, name); -} -#endif