From 97079a7c8f7d52ff381b2b3d6e0c430358d1b340 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Sun, 2 Aug 2020 12:34:21 +0430 Subject: [PATCH] [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 --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 534ac1683..04b50d2d3 100644 --- a/meson.build +++ b/meson.build @@ -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')