Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCons] Fixed crashes in several scripts #1237

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import platform
import sys
import subprocess
from binding_generator import scons_generate_bindings, scons_emit_files
from SCons.Errors import UserError


EnsureSConsVersion(4, 0)
Expand Down
2 changes: 1 addition & 1 deletion tools/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def generate(env):

if env["arch"] not in ("arm64", "x86_64", "arm32", "x86_32"):
print("Only arm64, x86_64, arm32, and x86_32 are supported on Android. Exiting.")
Exit()
env.Exit(1)

if sys.platform == "win32" or sys.platform == "msys":
my_spawn.configure(env)
Expand Down
7 changes: 4 additions & 3 deletions tools/godotcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from SCons.Variables import EnumVariable, PathVariable, BoolVariable
from SCons.Tool import Tool
from SCons.Builder import Builder
from SCons.Errors import UserError

from binding_generator import scons_generate_bindings, scons_emit_files

Expand Down Expand Up @@ -226,7 +227,7 @@ def generate(env):
env["arch"] = "x86_32"
else:
print("Unsupported CPU architecture: " + host_machine)
Exit()
env.Exit(1)

print("Building for architecture " + env["arch"] + " on platform " + env["platform"])

Expand Down Expand Up @@ -284,8 +285,8 @@ def _godot_cpp(env):
)
# Forces bindings regeneration.
if env["generate_bindings"]:
AlwaysBuild(bindings)
NoCache(bindings)
env.AlwaysBuild(bindings)
env.NoCache(bindings)

# Sources to compile
sources = []
Expand Down
2 changes: 1 addition & 1 deletion tools/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def exists(env):
def generate(env):
if env["arch"] not in ("wasm32"):
print("Only wasm32 supported on web. Exiting.")
Exit()
env.Exit(1)

if "EM_CONFIG" in os.environ:
env["ENV"] = os.environ
Expand Down
2 changes: 1 addition & 1 deletion tools/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def exists(env):
def generate(env):
if env["arch"] not in ("universal", "arm64", "x86_64"):
print("Only universal, arm64, and x86_64 are supported on macOS. Exiting.")
Exit()
env.Exit(1)

if sys.platform == "darwin":
# Use clang on macOS by default
Expand Down