Commit 8b90010a authored by Johannes Kauffmann's avatar Johannes Kauffmann Committed by Steve Lhomme
Browse files

meson: force -fno-strict-aliasing for C++ modules

Following 7a776a79.

Mirroring, this check is only done for MinGW, because it
doesn't make sense on MSVC.
parent 7bd62e08
......@@ -280,6 +280,7 @@ have_mingw = false
have_win_desktop = false
have_win_store = false
mingw_libs = []
libcom_cppflags = []
if host_system == 'windows'
......@@ -362,6 +363,14 @@ windows_version_test = '''
# TODO: enable when meson 0.63 is required
# add_project_dependencies(mingw_libs, language: ['c', 'cpp'])
# fno-strict-aliasing is necessary for WRL and IID_PPV_ARGS to work safely
# MSVC doesn't have this option but doesn't do pointer aliasing, so it
# should work too
libcom_cppflags += '-fno-strict-aliasing'
if not cpp.has_argument(libcom_cppflags)
error('-fno-strict-aliasing is necessary for Windows C++ modules')
# Check for fnative-struct or mms-bitfields support for MinGW
if cc.has_argument('-mms-bitfields')
Supports Markdown
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