[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
This commit is contained in:
Ebrahim Byagowi 2020-08-02 12:34:21 +04:30 committed by GitHub
parent 749e2754c8
commit 97079a7c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ project('harfbuzz', 'c', 'cpp',
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 @@ add_project_link_arguments(cpp.get_supported_link_arguments([
]), language: 'c')
add_project_arguments(cpp.get_supported_arguments([
'-fno-rtti',
'-fno-exceptions',
'-fno-rtti',
'-fno-threadsafe-statics',
'-fvisibility-inlines-hidden',
]), language: 'cpp')