|
@@ -409,14 +409,27 @@ if selected_platform in platform_list:
|
|
env.Prepend(CCFLAGS=["/std:c++17"])
|
|
env.Prepend(CCFLAGS=["/std:c++17"])
|
|
|
|
|
|
# Enforce our minimal compiler version requirements
|
|
# Enforce our minimal compiler version requirements
|
|
- cc_version = methods.get_compiler_version(env) or [-1, -1]
|
|
|
|
- cc_version_major = cc_version[0]
|
|
|
|
- cc_version_minor = cc_version[1]
|
|
|
|
|
|
+ cc_version = methods.get_compiler_version(env) or {
|
|
|
|
+ "major": None,
|
|
|
|
+ "minor": None,
|
|
|
|
+ "patch": None,
|
|
|
|
+ "metadata1": None,
|
|
|
|
+ "metadata2": None,
|
|
|
|
+ "date": None,
|
|
|
|
+ }
|
|
|
|
+ cc_version_major = int(cc_version["major"] or -1)
|
|
|
|
+ cc_version_minor = int(cc_version["minor"] or -1)
|
|
|
|
+ cc_version_metadata1 = cc_version["metadata1"] or ""
|
|
|
|
|
|
if methods.using_gcc(env):
|
|
if methods.using_gcc(env):
|
|
|
|
+ if cc_version_major == -1:
|
|
|
|
+ print(
|
|
|
|
+ "Couldn't detect compiler version, skipping version checks. "
|
|
|
|
+ "Build may fail if the compiler doesn't support C++17 fully."
|
|
|
|
+ )
|
|
# GCC 8 before 8.4 has a regression in the support of guaranteed copy elision
|
|
# GCC 8 before 8.4 has a regression in the support of guaranteed copy elision
|
|
# which causes a build failure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
|
|
# which causes a build failure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
|
|
- if cc_version_major == 8 and cc_version_minor < 4:
|
|
|
|
|
|
+ elif cc_version_major == 8 and cc_version_minor < 4:
|
|
print(
|
|
print(
|
|
"Detected GCC 8 version < 8.4, which is not supported due to a "
|
|
"Detected GCC 8 version < 8.4, which is not supported due to a "
|
|
"regression in its C++17 guaranteed copy elision support. Use a "
|
|
"regression in its C++17 guaranteed copy elision support. Use a "
|
|
@@ -432,10 +445,23 @@ if selected_platform in platform_list:
|
|
"SCons command line."
|
|
"SCons command line."
|
|
)
|
|
)
|
|
Exit(255)
|
|
Exit(255)
|
|
|
|
+ elif cc_version_metadata1 == "win32":
|
|
|
|
+ print(
|
|
|
|
+ "Detected mingw version is not using posix threads. Only posix "
|
|
|
|
+ "version of mingw is supported. "
|
|
|
|
+ 'Use "update-alternatives --config <platform>-w64-mingw32-[gcc|g++]" '
|
|
|
|
+ "to switch to posix threads."
|
|
|
|
+ )
|
|
|
|
+ Exit(255)
|
|
elif methods.using_clang(env):
|
|
elif methods.using_clang(env):
|
|
|
|
+ if cc_version_major == -1:
|
|
|
|
+ print(
|
|
|
|
+ "Couldn't detect compiler version, skipping version checks. "
|
|
|
|
+ "Build may fail if the compiler doesn't support C++17 fully."
|
|
|
|
+ )
|
|
# Apple LLVM versions differ from upstream LLVM version \o/, compare
|
|
# Apple LLVM versions differ from upstream LLVM version \o/, compare
|
|
# in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
|
# in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
|
- if env["platform"] == "osx" or env["platform"] == "iphone":
|
|
|
|
|
|
+ elif env["platform"] == "osx" or env["platform"] == "iphone":
|
|
vanilla = methods.is_vanilla_clang(env)
|
|
vanilla = methods.is_vanilla_clang(env)
|
|
if vanilla and cc_version_major < 6:
|
|
if vanilla and cc_version_major < 6:
|
|
print(
|
|
print(
|