mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
refactoring: simplify compiler version check
(cherry picked from commit 8d94d26caf)
This commit is contained in:
parent
f1fdada6dc
commit
daf6fdf0b7
1 changed files with 5 additions and 5 deletions
|
|
@ -186,12 +186,12 @@ def configure(env):
|
|||
env.Append(CPPDEFINES=["NO_THREADS"])
|
||||
|
||||
if env["gdnative_enabled"]:
|
||||
major, minor, patch = get_compiler_version(env)
|
||||
if major < 2 or (major == 2 and minor == 0 and patch < 10):
|
||||
print("GDNative support requires emscripten >= 2.0.10, detected: %s.%s.%s" % (major, minor, patch))
|
||||
cc_semver = tuple(get_compiler_version(env))
|
||||
if cc_semver < (2, 0, 10):
|
||||
print("GDNative support requires emscripten >= 2.0.10, detected: %s.%s.%s" % cc_semver)
|
||||
sys.exit(255)
|
||||
if env["threads_enabled"] and major < 3 or (major == 3 and minor < 1) or (major == 3 and minor == 1 and patch < 14):
|
||||
print("Threads and GDNative requires emscripten => 3.1.14, detected: %s.%s.%s" % (major, minor, patch))
|
||||
if env["threads_enabled"] and cc_semver < (3, 1, 14):
|
||||
print("Threads and GDNative requires emscripten => 3.1.14, detected: %s.%s.%s" % cc_semver)
|
||||
sys.exit(255)
|
||||
env.Append(CCFLAGS=["-s", "RELOCATABLE=1"])
|
||||
env.Append(LINKFLAGS=["-s", "RELOCATABLE=1"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue