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

[3.x] SCons: Add explicit dependencies on thirdparty code in cloned env #48301

Merged

Conversation

akien-mga
Copy link
Member

Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c0)

@akien-mga akien-mga added this to the 3.4 milestone Apr 29, 2021
@akien-mga akien-mga requested review from a team as code owners April 29, 2021 14:49
@akien-mga akien-mga changed the title SCons: Add explicit dependencies on thirdparty code in cloned env [3.x] SCons: Add explicit dependencies on thirdparty code in cloned env Apr 29, 2021
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c0)
@akien-mga akien-mga force-pushed the 3.x-scons-thirdparty-lib-depends branch from f3198e8 to e94161d Compare April 29, 2021 14:57
@akien-mga akien-mga removed request for a team April 29, 2021 14:57
@akien-mga akien-mga removed the request for review from a team April 29, 2021 14:57
@akien-mga akien-mga merged commit 780188a into godotengine:3.x Apr 29, 2021
@akien-mga akien-mga deleted the 3.x-scons-thirdparty-lib-depends branch April 29, 2021 15:20
@akien-mga
Copy link
Member Author

Cherry-picked for 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant