-
-
Notifications
You must be signed in to change notification settings - Fork 632
Override for debug_features in SCons and CMake #1737
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
Conversation
a828ba3
to
ccf4e96
Compare
We do have Why is desirable to not have |
I cant find the conversation @Naros and I were having, it might be somewhere in https://github.com/CraterCrash/godot-orchestrator/ From what I grasped, they were building a single release binary with EDITOR_TOOLS enabled, but DEBUG_ENABLED and DEBUG_METHODS_ENABLED disabled that could be used by game developers to build and ship with. And gave a more performant user experience. Found the conversation, it was in their Discord under General, https://discord.com/channels/1049457206648655912/1150508215411413084 Quoting @Naros
|
0bb02b2
to
5749ef6
Compare
Hm. I still feel like disabling So, I'm still not totally convinced that we should expose this. But if it we do, I think it should be entirely internal. Like, the developer of a GDExtension that wants to do this non-standard thing can configure their extension to build this way, but it isn't an option we provide on the command-line. |
Add debug_features/GODOTCPP_DEBUG_FEATURES as an option to override the conditional use of DEBUG_ENABLED and DEBUG_METHODS_ENABLED
5749ef6
to
130379e
Compare
Perhaps something for the meeting? I was going to argue reasons why I think it might make sense, but realised that my thoughts were speculation at best. Like if someone wants t make an editor only plugin like PowerMode, do these flags effect performance in a detrimental way. We need @Naros to weigh in since he was the catalyst for this change. |
Hi @dsnopek, we aren't necessarily trying to do something non-standard; perhaps it's just a misunderstanding on my part. There have not been a lot of well-documented examples, particularly for those who create new scripting languages for Godot using GDExtension. So a lot of the work we've done has been primarily due to trial and error. In our code, we use things like So is it then expected for a GDExtension project that a plug-in that has editor UI integration and that is also used for runtime gameplay such as a scripting language subsystem that we should be shipping two binaries per platform, one for the I've done a lot of looking around at other script language projects online and that did not seem to be what they were doing, so perhaps that the root cause for this confusion and we are simply not doing what is expected. Can you confirm? |
Yes. There are the three targets, so you could make three builds (for If you had really a lot of editor-only code, and wanted for it not to be in
For an example, here's the https://github.com/Fumohouse/godot-luau-script/blob/master/bin/luau_script.gdextension Notice how it's using, for example, |
@Naros is this wanted anymore? if not i can close it. |
Let's close this one for now. We can re-open later if necessary |
Hi @enetheru I don't think so. With the |
@Naros raised that after the recent CMake changes his builds now have the
DEBUG_ENABLED
flag set.This is due to using the godot-cpp build target being
editor
ordebug_template
.The CMake scripts now match the SCons scripts, which was not previously the case.
In SCons there is an attribute
debug_features
which is dependent on the target being eithertemplate_debug
oreditor
this is then used to add
DEBUG_ENABLED
andDEBUG_METHODS_ENABLED
to theCPPDEFINES
.This PR adds a new option to both SCons and CMake,
debug_features
andGODOTCPP_DEBUG_FEATURES
respectively, which when unset uses the existing logic, and allows a user to explcitly enable or disable thedebug_features
.This works exactly the same way as the
use_hot_reload
option.