Skip to content
Merged
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
8 changes: 8 additions & 0 deletions tools/godotcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ def options(opts, env):
)
)
opts.Add(BoolVariable("debug_symbols", "Build with debugging symbols", True))
opts.Add(BoolVariable("production", "Set defaults to build godot-cpp for use in production", False))
opts.Add(BoolVariable("deprecated", "Enable compatibility code for deprecated and removed features", True))
opts.Add(BoolVariable("dev_build", "Developer build with dev-only debugging code (DEV_ENABLED)", False))
opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", False))
Expand Down Expand Up @@ -467,6 +468,13 @@ def generate(env):
env["optimize"] = ARGUMENTS.get("optimize", opt_level)
env["debug_symbols"] = get_cmdline_bool("debug_symbols", env.dev_build)

if env["production"]:
if "use_static_cpp" in env:
env["use_static_cpp"] = get_cmdline_bool("use_static_cpp", True)
env["debug_symbols"] = get_cmdline_bool("debug_symbols", False)
# LTO "auto" means we handle the preferred option in each platform tool.
env["lto"] = ARGUMENTS.get("lto", "auto")

tool = Tool(env["platform"], toolpath=get_platform_tools_paths(env))

if tool is None or not tool.exists(env):
Expand Down
Loading