mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
meson: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
This commit is contained in:
parent
63f8d33a6f
commit
4007aaf3a7
2 changed files with 11 additions and 4 deletions
|
@ -1,11 +1,13 @@
|
||||||
# sidplay plugin works with libsidplay 1.36.x (not 2.x.x)
|
# sidplay plugin works with libsidplay 1.36.x (not 2.x.x)
|
||||||
have_sidplay = false
|
have_sidplay = false
|
||||||
if add_languages('cpp')
|
if add_languages('cpp')
|
||||||
|
extra_args = []
|
||||||
cxx = meson.get_compiler('cpp')
|
cxx = meson.get_compiler('cpp')
|
||||||
if cxx.has_argument('-fvisibility=hidden')
|
if cxx.has_argument('-fvisibility=hidden')
|
||||||
cxx_vis_args = ['-fvisibility=hidden']
|
extra_args += ['-fvisibility=hidden']
|
||||||
else
|
endif
|
||||||
cxx_vis_args = []
|
if cxx.has_argument('-fno-strict-aliasing')
|
||||||
|
extra_args += ['-fno-strict-aliasing']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cxx.has_header('sidplay/player.h')
|
if cxx.has_header('sidplay/player.h')
|
||||||
|
@ -22,7 +24,7 @@ endif
|
||||||
|
|
||||||
if have_sidplay
|
if have_sidplay
|
||||||
shared_module('gstsid', 'gstsiddec.cc',
|
shared_module('gstsid', 'gstsiddec.cc',
|
||||||
cpp_args : ugly_args + cxx_vis_args,
|
cpp_args : ugly_args + extra_args,
|
||||||
include_directories : [configinc],
|
include_directories : [configinc],
|
||||||
dependencies : [gstaudio_dep, sidplay_dep],
|
dependencies : [gstaudio_dep, sidplay_dep],
|
||||||
install : true,
|
install : true,
|
||||||
|
|
|
@ -47,6 +47,11 @@ if cc.has_argument('-fvisibility=hidden')
|
||||||
add_project_arguments('-fvisibility=hidden', language: 'c')
|
add_project_arguments('-fvisibility=hidden', language: 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Disable strict aliasing
|
||||||
|
if cc.has_argument('-fno-strict-aliasing')
|
||||||
|
add_project_arguments('-fno-strict-aliasing', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
check_headers = [
|
check_headers = [
|
||||||
['HAVE_DLFCN_H', 'dlfcn.h'],
|
['HAVE_DLFCN_H', 'dlfcn.h'],
|
||||||
|
|
Loading…
Reference in a new issue