Web: Fix version check for missing scalbnf LTO workaround
The check needs to happen after we set `env["CXX"]`.
Follow-up to #81340.
(cherry picked from commit 50161808c2
)
This commit is contained in:
parent
a7c5e3134a
commit
0a81659d9b
1 changed files with 8 additions and 5 deletions
|
@ -111,10 +111,6 @@ def configure(env):
|
|||
else:
|
||||
env.Append(CCFLAGS=["-flto"])
|
||||
env.Append(LINKFLAGS=["-flto"])
|
||||
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.
|
||||
cc_semver = tuple(get_compiler_version(env))
|
||||
if cc_semver >= (3, 1, 42):
|
||||
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"])
|
||||
|
||||
# Sanitizers
|
||||
if env["use_ubsan"]:
|
||||
|
@ -193,8 +189,15 @@ def configure(env):
|
|||
else:
|
||||
env.Append(CPPDEFINES=["NO_THREADS"])
|
||||
|
||||
if env["gdnative_enabled"]:
|
||||
# Get version info for checks below.
|
||||
cc_semver = tuple(get_compiler_version(env))
|
||||
|
||||
if env["lto"] != "none":
|
||||
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.
|
||||
if cc_semver >= (3, 1, 42) and cc_semver < (3, 1, 46):
|
||||
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"])
|
||||
|
||||
if env["gdnative_enabled"]:
|
||||
if cc_semver < (2, 0, 10):
|
||||
print("GDNative support requires emscripten >= 2.0.10, detected: %s.%s.%s" % cc_semver)
|
||||
sys.exit(255)
|
||||
|
|
Loading…
Reference in a new issue