-
-
Notifications
You must be signed in to change notification settings - Fork 586
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] Add "optimize" and "debug_symbols" options. #835
Conversation
a0898e0
to
6f3a781
Compare
44ea5ef
to
4a069da
Compare
When I first started using godot, I was completely confused by how the godot build system uses 'debug' and 'release'. It's confusing to native & c++ developers because 'debug' and 'release' build profiles in other build systems usually translate directly to compiler switches of the compiler optimization levels & debug flags. In godot, 'debug' and 'release' build targets are completely decoupled from the native build profiles in (compiler opt level, and debug flags), which is I think where the confusion comes from. So you can do a 'release' build, with -O0 and -g. And you can do a 'debug' build, with -O3 and no debug symbols. So the question for me has always been, what does 'debug' and 'release' even mean as a godot build target? And that question I don't think is succinctly answered in the godot development docs, which is for me where the confusion comes from. To me, the 'debug' and 'release' build target's for godot build system really just end up translating to the ability to debug scripts, which adds a lot of additional internal engine overhead, but it's completely orthogonal to the native compilation step. |
@jordo , well, that's probably another misunderstanding I guess, you might want to quote those comments to this proposal which concerns godot targets: godotengine/godot-proposals#3371 . |
optimize = auto|none|debug|speed|size|0|1|2|3 debug_symbol = True|False optimize == "auto" will produce: - "debug" for "debug" builds - "speed" for "release" builds
Wait... am I still misunderstanding that or is that correct? |
4a069da
to
2bf983e
Compare
Well, it's not just for "debugging scripts", but (some) engine internals too, and it is not |
OK good, that's what my current understanding is. I should have said orthogonal to the native compiler optimization level & debug level. i.e. you can do |
No, you can't The description states: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This goes a bit beyond what we do in upstream Godot where the optimize
and debug_symbols
options are tied to target
, but I think we should refactor Godot's scripts to do what is done here.
Thanks! |
optimize = auto|none|debug|speed|size|0|1|2|3
debug_symbol = True|False
optimize == "auto" will produce:
target="debug"
buildstarget="release"
buildsAdd a release_debug target.Dropped, should be moved to a separate PR after discussion on: Unifytools
/target
build type configuration to disambiguate "debug" (used for both game debugging and engine dev tools) godot-proposals#3371Depends on: #836Merged