From 34bf17482c637ef017e85dd5bcdb57991d7edd4e Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Tue, 4 Jun 2024 13:42:53 +0200 Subject: [PATCH] Auth/meson: Don't fail if compiler doesn't support trivial-auto-var-init --- meson/auto-var-init/meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meson/auto-var-init/meson.build b/meson/auto-var-init/meson.build index 1d528437ea..56c3ade41f 100644 --- a/meson/auto-var-init/meson.build +++ b/meson/auto-var-init/meson.build @@ -2,12 +2,12 @@ auto_var_init = get_option('auto-var-init') if auto_var_init != 'disabled' arg = '-ftrivial-auto-var-init=' + auto_var_init - if not cxx.has_argument(arg) - error('Compiler does not support ' + arg + ', which is needed for automatic variable initialization') - subdir_done() + if cxx.has_argument(arg) + add_project_arguments(arg, language: ['c', 'cpp']) + else + warning('Compiler does not support ' + arg + ', which is needed for automatic variable initialization') + auto_var_init = 'unsupported by compiler' endif - - add_project_arguments(arg, language: ['c', 'cpp']) endif summary('Auto Var Init', auto_var_init, section: 'Configuration') -- 2.47.2