From 6e88c408b7d8e3fd2ff657b0da3bcdf677b83890 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Thu, 7 Dec 2023 17:41:33 +0100 Subject: [PATCH] Moved some flags that were actually pure C++ flags to the correct array. --- SConscript | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SConscript b/SConscript index 47e24fb..7322aa0 100644 --- a/SConscript +++ b/SConscript @@ -242,6 +242,8 @@ if variant: env.Append(CPPDEFINES = [f'{config["PREPROCESSOR_PREFIX"]}_VARIANT={variant}']) else: env['VARIANT_DIR'] = None + env['COMPILATIONDB_USE_ABSPATH'] = True + env['COMPILATIONDB_PATH_FILTER'] = f"{Dir('#').abspath}/*" comp_db = env.CompilationDatabase(target = '#compile_commands.json') Default(comp_db) env['BIN_DIR'] = Dir('#bin').abspath @@ -298,7 +300,8 @@ if env['COMPILER_FAMILY'] == 'gcc' or env['COMPILER_FAMILY'] == 'clang': # also GCC complains about some (compiler generated) fields in coroutines not having any linkage # also -Wdangling-reference seems to produce a lot of false positives # also -Wmaybe-uninitialized seems to produce false positives (or a bug in the standard library?) - env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-subobject-linkage', '-Wno-dangling-reference', '-Wno-maybe-uninitialized']) + env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-maybe-uninitialized']) + env.Append(CXXFLAGS = ['-Wno-subobject-linkage', '-Wno-dangling-reference']) else: # no-gnu-anonymous-struct - we don't care env.Append(CCFLAGS = ['-Wno-gnu-anonymous-struct']) @@ -332,7 +335,7 @@ elif env['COMPILER_FAMILY'] == 'cl': env.Append(CCFLAGS = ['/O2']) if env['COMPILER_FAMILY'] == 'gcc': - env.Append(CCFLAGS = ['-Wno-volatile']) + env.Append(CXXFLAGS = ['-Wno-volatile']) elif env['COMPILER_FAMILY'] == 'clang': env.Append(CCFLAGS = ['-Wno-deprecated-volatile', '-Wno-nested-anon-types', '-Wno-unknown-warning-option'])