Godot version
4.6.2.stable.official.71f334935
godot-cpp version
Most recent (I think it's irrelevant)
System information
Pop!_OS 24.04, Intel i7-13700H (also irrelevant)
Issue description
Hello! This isn't a bug per-se, but I was mislead that target=template_debug meant that it was a debugging template, using -O0 and other debugging flags, not
-fPIC -Wwrite-strings -m64 -march=x86-64 -fvisibility=hidden -O2
I get why these should be the default, because no one wants their compiled programs to run slow by default, but please rename it to template_default and make a separate template_debug.
For context, I had a UB in my code, and it stemmed from a gcc optimization from -O1 onwards. Thinking that by default I was compiling with -O0, this baffled me for a bit.
Thank you very much!
Steps to reproduce
In godot-cpp/tools/godotcpp.py you have
env.debug_features = env["target"] in ["editor", "template_debug"]
if env.dev_build:
opt_level = "none"
elif env.debug_features:
opt_level = "speed_trace"
And
elif env["optimize"] == "speed_trace":
env.Append(CCFLAGS=["-O2"])
Minimal reproduction project
.
Godot version
4.6.2.stable.official.71f334935
godot-cpp version
Most recent (I think it's irrelevant)
System information
Pop!_OS 24.04, Intel i7-13700H (also irrelevant)
Issue description
Hello! This isn't a bug per-se, but I was mislead that
target=template_debugmeant that it was a debugging template, using-O0and other debugging flags, notI get why these should be the default, because no one wants their compiled programs to run slow by default, but please rename it to
template_defaultand make a separatetemplate_debug.For context, I had a UB in my code, and it stemmed from a gcc optimization from
-O1onwards. Thinking that by default I was compiling with-O0, this baffled me for a bit.Thank you very much!
Steps to reproduce
In
godot-cpp/tools/godotcpp.pyyou haveAnd
Minimal reproduction project
.