[meson] Pass cpp_eh=none and cpp_rtti=false as default options
If we want to support a build with exception handling and RTTI
We should reflect that on library(..., link_language: 'c') also so for
now it is ok to just set it here to get MSVC support also and we
can remove hard coded flags later upon request.
One other concern over just relying on it is on when harfbuzz is used
as a subproject and the parent project hasn't provided the same options,
that should be resolved first I think.
Closes #2584
diff --git a/meson.build b/meson.build
index 534ac16..04b50d2 100644
--- a/meson.build
+++ b/meson.build
@@ -2,6 +2,8 @@
meson_version: '>= 0.53.0',
version: '2.7.0',
default_options: [
+ 'cpp_eh=none', # Just to support msvc, we are passing -fno-rtti also anyway
+ 'cpp_rtti=false', # Just to support msvc, we are passing -fno-exceptions also anyway
'cpp_std=c++11',
'wrap_mode=nofallback', # https://github.com/harfbuzz/harfbuzz/pull/2548
],
@@ -42,8 +44,8 @@
]), language: 'c')
add_project_arguments(cpp.get_supported_arguments([
- '-fno-rtti',
'-fno-exceptions',
+ '-fno-rtti',
'-fno-threadsafe-statics',
'-fvisibility-inlines-hidden',
]), language: 'cpp')