mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
SCons: Bump C standard: C11
→C17
This commit is contained in:
parent
72cff2ed59
commit
705f51f97e
@ -799,8 +799,8 @@ if env["lto"] != "none":
|
|||||||
# This needs to come after `configure`, otherwise we don't have env.msvc.
|
# This needs to come after `configure`, otherwise we don't have env.msvc.
|
||||||
if not env.msvc:
|
if not env.msvc:
|
||||||
# Specifying GNU extensions support explicitly, which are supported by
|
# Specifying GNU extensions support explicitly, which are supported by
|
||||||
# both GCC and Clang. Both currently default to gnu11 and gnu++17.
|
# both GCC and Clang. Both currently default to gnu17 and gnu++17.
|
||||||
env.Prepend(CFLAGS=["-std=gnu11"])
|
env.Prepend(CFLAGS=["-std=gnu17"])
|
||||||
env.Prepend(CXXFLAGS=["-std=gnu++17"])
|
env.Prepend(CXXFLAGS=["-std=gnu++17"])
|
||||||
else:
|
else:
|
||||||
# MSVC started offering C standard support with Visual Studio 2019 16.8, which covers all
|
# MSVC started offering C standard support with Visual Studio 2019 16.8, which covers all
|
||||||
@ -809,7 +809,7 @@ else:
|
|||||||
if cc_version_major < 16:
|
if cc_version_major < 16:
|
||||||
print_warning("Visual Studio 2017 cannot specify a C-Standard.")
|
print_warning("Visual Studio 2017 cannot specify a C-Standard.")
|
||||||
else:
|
else:
|
||||||
env.Prepend(CFLAGS=["/std:c11"])
|
env.Prepend(CFLAGS=["/std:c17"])
|
||||||
# MSVC is non-conforming with the C++ standard by default, so we enable more conformance.
|
# MSVC is non-conforming with the C++ standard by default, so we enable more conformance.
|
||||||
# Note that this is still not complete conformance, as certain Windows-related headers
|
# Note that this is still not complete conformance, as certain Windows-related headers
|
||||||
# don't compile under complete conformance.
|
# don't compile under complete conformance.
|
||||||
|
Loading…
Reference in New Issue
Block a user