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

SCU build - Change options to "yes / no" #77976

Merged
merged 1 commit into from
Jun 8, 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
10 changes: 2 additions & 8 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ opts.Add(
"",
)
opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise epsilon (debug option)", False))
opts.Add(EnumVariable("scu_build", "Use single compilation unit build", "none", ("none", "dev", "all")))
opts.Add(BoolVariable("scu_build", "Use single compilation unit build", False))

# Thirdparty libraries
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
Expand Down Expand Up @@ -430,20 +430,14 @@ if env_base.debug_features:
# to give *users* extra debugging information for their game development.
env_base.Append(CPPDEFINES=["DEBUG_ENABLED"])


if env_base.dev_build:
# DEV_ENABLED enables *engine developer* code which should only be compiled for those
# working on the engine itself.
env_base.Append(CPPDEFINES=["DEV_ENABLED"])
env_base["use_scu"] = env_base["scu_build"] in ("dev", "all")
else:
# Disable assert() for production targets (only used in thirdparty code).
env_base.Append(CPPDEFINES=["NDEBUG"])

# SCU builds currently use a lot of compiler memory
# in release builds, so disallow outside of DEV builds unless "all" is set.
env_base["use_scu"] = env_base["scu_build"] == "all"

# SCons speed optimization controlled by the `fast_unsafe` option, which provide
# more than 10 s speed up for incremental rebuilds.
# Unsafe as they reduce the certainty of rebuilding all changed files, so it's
Expand Down Expand Up @@ -559,7 +553,7 @@ if selected_platform in platform_list:
env["lto"] = ARGUMENTS.get("lto", "auto")

# Run SCU file generation script if in a SCU build.
if env["use_scu"]:
if env["scu_build"]:
methods.set_scu_folders(scu_builders.generate_scu_files(env["verbose"], env_base.dev_build == False))

# Must happen after the flags' definition, as configure is when most flags
Expand Down
2 changes: 1 addition & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _find_scu_section_name(subdir):


def add_source_files_scu(self, sources, files, allow_gen=False):
if self["use_scu"] and isinstance(files, str):
if self["scu_build"] and isinstance(files, str):
if "*." not in files:
return False

Expand Down