Skip to content
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: Process platform-specific flags earlier #91791

Merged

Conversation

akien-mga
Copy link
Member

Some of the logic in SCons depends on flags that get overridden in the platform-specific detect.py, so it needs to be processed first.

For example the Android/iOS/Web platforms override the default target to template_debug, but this was processed too late so e.g. the logic that sets env.editor_build would set it to true due to the default target value in the environment being editor.

@akien-mga akien-mga added bug topic:buildsystem needs testing cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels May 10, 2024
@akien-mga akien-mga added this to the 4.3 milestone May 10, 2024
@akien-mga akien-mga requested a review from a team as a code owner May 10, 2024 10:09
@akien-mga akien-mga force-pushed the scons-process-platform-flags-early branch from 3702109 to b439234 Compare May 10, 2024 10:11
@akien-mga
Copy link
Member Author

Seems to break some stuff:

$ scons p=web production=yes
/home/akien/.local/bin/scons p=web production=yes 2>&1
scons: Reading SConscript files ...
Auto-detected 16 CPU cores available for build parallelism. Using 15 cores by default. You can override it with the -j argument.
ERROR: Unsupported CPU architecture "auto" for Web. Supported architectures are: wasm32.

@akien-mga akien-mga marked this pull request as draft May 10, 2024 10:12
@AThousandShips
Copy link
Member

AThousandShips commented May 10, 2024

Related (probably supersedes it):

@akien-mga
Copy link
Member Author

Related (probably supersedes it):

Doesn't supersede it yet, but #91794 should.

Some of the logic in SCons depends on flags that get overridden in the
platform-specific `detect.py`, so it needs to be processed first.

For example the Android/iOS/Web platforms override the default `target`
to `template_debug`, but this was processed too late so e.g. the logic
that sets `env.editor_build` would set it to true due to the default
`target` value in the environment being `editor`.
@akien-mga akien-mga force-pushed the scons-process-platform-flags-early branch from aa73836 to 37cf266 Compare May 30, 2024 14:02
@akien-mga
Copy link
Member Author

Rebased after #92124.

@akien-mga akien-mga requested a review from Repiteo May 30, 2024 14:05
@akien-mga akien-mga merged commit 43d9f48 into godotengine:master May 31, 2024
16 checks passed
@akien-mga akien-mga deleted the scons-process-platform-flags-early branch May 31, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release needs testing topic:buildsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants