-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
use_mingw="yes" not Honored in custom.py #60719
Comments
I ran into this same issue with the current version (#79851) helping someone try to compile for mingw. This might be part of a larger issue for any discrepancies between the command line arguments and what appears in custom.py Specifically in the case of this flag, I don't think the build should fail. If anything, the To ignore the custom.py value we could do the same thing that is being done with
...
Note that Another option would be to add the evaluated argument to ARGUMENTS
However, the user should be informed that their setting in
This is only an example of how it could be handled. It would be better to write something more general for any flags assumed to be command line only. |
… user overrides of use_mingw Let the platforms optionally override the default scons environment tools via a `custom_tools` flag, so the default SConstruct only needs to set the defaults and not worry about each individual platform requirements. Users can also override the tools via `custom_tools`. Fix the order of initialization, so we can pick up the use_mingw option from all the different places where it can be set, and use it during environment initialization. This also fixes a related issue where, if a platform sets a default target in `get_flags`, if the platform doesn't support the `editor` target, and the user doesn't pass in the target in the command line, the `editor` target would be briefly selected during a portion of SConstruct execution, just long enough for some wrong variables to be set, and cause the build to fail, or include bad defines. Fixes godotengine#60719
…bey overrides of use_mingw Let the platforms optionally override the default scons environment tools via a `custom_tools` flag, so the default SConstruct only needs to set the defaults and not worry about each individual platform requirements. Users can also override the tools via `custom_tools`. Add a temporary SCons environment to only process `use_mingw`, `platform`, `target` and `custom_tools` options from all the different places where they can be set, and then use those values to initialize the actual environment that we use to build, as well as determine which builder scripts to load based on the target. This fixes a related issue where, if a platform sets a default target in `get_flags` different from editor, and the user doesn't pass in the target in the command line, the `editor` target would be briefly selected during a portion of SConstruct execution, long enough to set the env.editor_build to true, causing editor files and defines to be set for non-editor builds. Fixes godotengine#60719
#81700 should fix this issue (along with others), so for people running into this, if you could give that PR a try, that would be great! |
…bey overrides of use_mingw Let the platforms optionally override the default scons environment tools via a `custom_tools` flag, so the default SConstruct only needs to set the defaults and not worry about each individual platform requirements. Users can also override the tools via `custom_tools`. Add a temporary SCons environment to only process `use_mingw`, `platform`, `target` and `custom_tools` options from all the different places where they can be set, and then use those values to initialize the actual environment that we use to build, as well as determine which builder scripts to load based on the target. This fixes a related issue where, if a platform sets a default target in `get_flags` different from editor, and the user doesn't pass in the target in the command line, the `editor` target would be briefly selected during a portion of SConstruct execution, long enough to set the env.editor_build to true, causing editor files and defines to be set for non-editor builds. Fixes godotengine#60719 Co-authored-by: Adam Scott <[email protected]>
Godot version
4.0.dev (0275d60)
System information
Windows 10, MinGW, LLVM Build
Issue description
If I run
scons
in the shell withoutuse_mingw=yes
even when it's in mycustom.py
file, the build crashes. This seems to be due to the fact that theif
statement in theSConstruct
file (line 106 in the referenced hash) that is supposed to assigncustom_tools
to["mingw"]
is reading from the command line only. The assignment ofcustom_tools
actually happens beforecustom.py
is even read.It also doesn't seem to be honoring the
platform
variable fromcustom.py
for this oneif
statement either (becausecustom.py
hasn't been loaded), but that's not causing an issue because the detection is working as intended (i.e. I'm not building for Android or JavaScript).custom.py:
Relevant lines in
SConstruct
:This is fairly simple to correct, but I wanted to get some feedback first in the case that there's a reason it is done this way.
Steps to reproduce
custom.py
with the following textmingw32
/llvm
environment is accessible to SConsscons
without arguments and attempt a buildscons use_mingw=yes
to run a successful buildMinimal reproduction project
No response
The text was updated successfully, but these errors were encountered: