SCons: Load optional ninja tool before setting its options

SCons 4.8.0 made this stricter, as we were advised in #94805.

Fixes #94805.
This commit is contained in:
Rémi Verschelde 2024-07-31 23:03:59 +02:00
parent b6dee96f68
commit d2064fea52
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 2 deletions

View File

@ -1025,14 +1025,13 @@ if env["ninja"]:
Exit(255) Exit(255)
SetOption("experimental", "ninja") SetOption("experimental", "ninja")
env.Tool("ninja")
# By setting this we allow the user to run ninja by themselves with all # By setting this we allow the user to run ninja by themselves with all
# the flags they need, as apparently automatically running from scons # the flags they need, as apparently automatically running from scons
# is way slower. # is way slower.
SetOption("disable_execute_ninja", True) SetOption("disable_execute_ninja", True)
env.Tool("ninja")
# Threads # Threads
if env["threads"]: if env["threads"]:
env.Append(CPPDEFINES=["THREADS_ENABLED"]) env.Append(CPPDEFINES=["THREADS_ENABLED"])