Skip to content

Commit 64958c9

Browse files
committed
Add gnu_symbol_visibility: 'hidden' option to .so compilation
1 parent 6bb6639 commit 64958c9

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

β€Žsrc/godot/hazmat/meson.buildβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ endif
7373
shared_library(
7474
'extension_class',
7575
c_extension_class,
76+
gnu_symbol_visibility: 'hidden', # Used by both clang & gcc (see https://gcc.gnu.org/wiki/Visibility)
7677
dependencies : [dep_godot, dep_python, dep_pythonscript],
7778
install_rpath: extension_class_rpath, # To find libpython
7879
name_prefix: python_native_module_name_prefix,

β€Žsrc/godot/meson.buildβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ shared_library(
128128
'builtins',
129129
cbuiltins,
130130
c_args: builtins_c_args,
131+
gnu_symbol_visibility: 'hidden', # Used by both clang & gcc (see https://gcc.gnu.org/wiki/Visibility)
131132
dependencies : [dep_godot, dep_python, dep_pythonscript],
132133
install_rpath: builtins_rpath, # To find libpython
133134
name_prefix: python_native_module_name_prefix,
@@ -189,6 +190,7 @@ shared_library(
189190
'classes',
190191
cclasses,
191192
c_args: classes_c_args,
193+
gnu_symbol_visibility: 'hidden', # Used by both clang & gcc (see https://gcc.gnu.org/wiki/Visibility)
192194
dependencies : [dep_godot, dep_python, dep_pythonscript],
193195
install_rpath: classes_rpath, # To find libpython
194196
name_prefix: python_native_module_name_prefix,

β€Žsrc/meson.buildβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ lib_pythonscript = shared_library(
286286
'pythonscript',
287287
['pythonscript.c', c_pythonscript_gdextension_ptrs, c_pythonscript],
288288
c_args: lib__pythonscript_c_args,
289+
gnu_symbol_visibility: 'hidden', # Used by both clang & gcc (see https://gcc.gnu.org/wiki/Visibility)
289290
dependencies: [dep_godot, dep_python],
290291
install_rpath: lib_pythonscript_rpath, # To find libpython
291292
install: true,

0 commit comments

Comments
Β (0)