mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
SCons: add methods.using_clang to check used compiler
Also rename `use_gcc` to `using_gcc` to make it clear that it returns a config but does not alter it.
This commit is contained in:
@@ -342,7 +342,7 @@ if selected_platform in platform_list:
|
||||
shadow_local_warning = []
|
||||
all_plus_warnings = ['-Wwrite-strings']
|
||||
|
||||
if methods.use_gcc(env):
|
||||
if methods.using_gcc(env):
|
||||
version = methods.get_compiler_version(env)
|
||||
if version != None and version[0] >= '7':
|
||||
shadow_local_warning = ['-Wshadow-local']
|
||||
@@ -350,7 +350,7 @@ if selected_platform in platform_list:
|
||||
# FIXME: enable -Wimplicit-fallthrough once #26135 is fixed
|
||||
# FIXME: enable -Wclobbered once #26351 is fixed
|
||||
env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-implicit-fallthrough', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning)
|
||||
if methods.use_gcc(env):
|
||||
if methods.using_gcc(env):
|
||||
env['CCFLAGS'] += ['-Wno-clobbered']
|
||||
|
||||
elif (env["warnings"] == 'all'):
|
||||
|
||||
Reference in New Issue
Block a user