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

Improve linking time #297

Merged
merged 4 commits into from Aug 22, 2023
Merged

Improve linking time #297

merged 4 commits into from Aug 22, 2023

Conversation

mxgrey
Copy link
Contributor

@mxgrey mxgrey commented Aug 21, 2023

We've discovered that directly linking against ROS2 message packages will bring hundreds of duplicate library dependencies into the command line arguments for the linker, which causes linking times for ld to become explosive.

Up until now we've side-stepped this issue by building with lld instead of ld, but this PR will allow linking times to be reasonable no matter what your choice of linker is.

This PR solves the problem by simply using ament_target_dependencies which de-duplicates transitive dependencies that are being pulled in by the direct dependencies.

luca-della-vedova and others added 4 commits August 11, 2023 17:33
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
@mxgrey mxgrey merged commit 5332812 into main Aug 22, 2023
4 checks passed
@mxgrey mxgrey deleted the improve_linking branch August 22, 2023 02:48
Yadunund pushed a commit that referenced this pull request Sep 11, 2023
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Co-authored-by: Luca Della Vedova <lucadv@intrinsic.ai>
Yadunund added a commit that referenced this pull request Sep 11, 2023
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Co-authored-by: Grey <grey@openrobotics.org>
Co-authored-by: Luca Della Vedova <lucadv@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants