Commit 3cf73a66 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

meson: use -fno-strict-aliasing where supported

https://bugzilla.gnome.org/show_bug.cgi?id=769183
parent 75241cfa
...@@ -7,17 +7,19 @@ taglib_sources = [ ...@@ -7,17 +7,19 @@ taglib_sources = [
taglib_dep = dependency('taglib', version : '>= 1.5', required : false) taglib_dep = dependency('taglib', version : '>= 1.5', required : false)
if taglib_dep.found() and add_languages('cpp', required : false) if taglib_dep.found() and add_languages('cpp', required : false)
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
gsttaglib = library('gsttaglib', gsttaglib = library('gsttaglib',
taglib_sources, taglib_sources,
c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'], c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'],
cpp_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'] + cxx_vis_args, cpp_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'] + extra_args,
include_directories : [configinc, libsinc], include_directories : [configinc, libsinc],
dependencies : [gsttag_dep, taglib_dep], dependencies : [gsttag_dep, taglib_dep],
install : true, install : true,
......
...@@ -47,6 +47,11 @@ if cc.has_argument('-fvisibility=hidden') ...@@ -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 = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment