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] Split targets.py, apply flags from tools #1392

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

Faless
Copy link
Contributor

@Faless Faless commented Feb 14, 2024

Split targets tool logic, moving all the compiler-specific flags to a new common_compiler_flags.py file, and everything else (CPPDEFINES, optimize option logic, dev build logic, etc) to the godotcpp tool.

The default tools now apply the common compiler flags by importing the file and explicitly calling configure.

See also: #1380

And from #1391 (comment)

We might want to move (some or all) the "targets.py" back into the platform tools (maybe as an import?)
The main reason is that "targets" right now ends up making assumptions on build/link flags based on the default platforms which may be wrong when using custom tools.

@Faless Faless added enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup labels Feb 14, 2024
@Faless Faless added this to the 4.x milestone Feb 14, 2024
@Faless Faless force-pushed the build/targets_no_more branch 2 times, most recently from 40d1355 to 3bcf019 Compare February 16, 2024 22:06
@Faless Faless changed the title Refactor targets.py, only apply flags for default platforms [SCons] Split targets.py, apply flags from tools Feb 16, 2024
Split `targets` tool logic, moving all the compiler-specific flags to a
new `common_compiler_flags.py` file, and everything else (CPPDEFINES,
optimize option logic, dev build logic, etc) to the `godotcpp` tool.

The default tools now apply the common compiler flags by importing the
file and explicitly calling `configure`.
@Faless Faless marked this pull request as ready for review February 16, 2024 22:09
@Faless Faless requested a review from a team as a code owner February 16, 2024 22:09
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great to me!

I did some testing: basically, just trying out a number of different command-line options for some of the things that were moved around, and everything seemed to work as expected :-)

@dsnopek dsnopek merged commit a6d9393 into godotengine:master Feb 16, 2024
12 checks passed
@Faless Faless deleted the build/targets_no_more branch February 17, 2024 09:23
@dsnopek
Copy link
Collaborator

dsnopek commented Mar 11, 2024

Cherry-picked for 4.2 in PR #1410

@dsnopek
Copy link
Collaborator

dsnopek commented Mar 11, 2024

Cherry-picked for 4.1 in PR #1411

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants