Skip to content

Commit a66c050

Browse files
committed
Remove -Wno-cast-function-type flag when compiling for Windows (not supported by msvc)
1 parent aa88bf2 commit a66c050

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/godot/hazmat/meson.build

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,23 @@ c_gdnative_ptrs = custom_target(
7777

7878
if host_platform.startswith('linux')
7979
gdnative_ptrs_rpath = '$ORIGIN/../../../..'
80+
# LoadedGDExtensionInterface's initialization code uses
81+
# `pythonscript_gdextension_get_proc_address` which provide opaque function pointers,
82+
# which we must then cast to the correct type before using them.
83+
gdnative_ptrs_c_args = ['-Wno-cast-function-type']
8084
elif host_platform.startswith('macos')
8185
gdnative_ptrs_rpath = '@loader_path/../../../..'
86+
gdnative_ptrs_c_args = ['-Wno-cast-function-type']
8287
else
8388
gdnative_ptrs_rpath = ''
89+
gdnative_ptrs_c_args = []
8490
endif
8591

8692

8793
shared_library(
8894
'gdnative_ptrs',
8995
c_gdnative_ptrs,
90-
# LoadedGDExtensionInterface's initialization code uses
91-
# `pythonscript_gdextension_get_proc_address` which provide opaque function pointers,
92-
# which we must then cast to the correct type before using them.
93-
c_args: ['-Wno-cast-function-type'],
96+
c_args: gdnative_ptrs_c_args,
9497
dependencies : [dep_godot, dep_python, dep_pythonscript],
9598
install_rpath: gdnative_ptrs_rpath, # To find libpython
9699
name_prefix: python_native_module_name_prefix,

0 commit comments

Comments
 (0)