-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
libdrake: Use alwayslink instead of legacy_whole_archive #12262
libdrake: Use alwayslink instead of legacy_whole_archive #12262
Conversation
7872689
to
eaa3c4c
Compare
@drake-jenkins-bot mac-mojave-clang-bazel-experimental-release please |
+@jamiesnape for feature review, please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1.
Reviewable status: LGTM missing from assignee sammy-tri(platform), labeled "do not merge" (waiting on @sammy-tri)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1.
Reviewable status: labeled "do not merge"
The macOS debug error is "failed due to unexpected I/O exception: writing file failed". I wonder if that's a flake, or if this change substantially affects the build footprint. |
Not one of our usual flakes. Flakes during building rather than testing are rare. I would try a Mojave debug build. |
Disk usage on the Linux debug builds looks much higher (potentially up to 50 GB). |
Looks like the disk was full on the Mac, so not a flake. |
Yup. Sounds like I can profile and debug on Ubunutu for now, though. |
Testing with jwnimmer@call-cps:~/tools/bloaty$ ./bloaty \
-d compileunits \
--domain=file \
~/jwnimmer-tri/drake.12262/bazel-bin/examples/pendulum/print_symbolic_dynamics \
-- \
~/jwnimmer-tri/drake.master/bazel-bin/examples/pendulum/print_symbolic_dynamics
FILE SIZE
--------------
[NEW] +32.8Mi math/discrete_algebraic_riccati_equation.cc
[NEW] +20.3Mi math/continuous_lyapunov_equation.cc
+3.5% +14.1Mi [176 Others]
[NEW] +11.5Mi math/continuous_algebraic_riccati_equation.cc
[NEW] +7.73Mi math/rigid_transform.cc
[NEW] +7.25Mi math/discrete_lyapunov_equation.cc
[NEW] +7.17Mi multibody/tree/space_xyz_mobilizer.cc
[NEW] +6.89Mi geometry/proximity/distance_to_point_with_gradient.cc
[NEW] +6.29Mi math/rotation_matrix.cc
[NEW] +5.50Mi geometry/query_results/contact_surface.cc
[NEW] +5.01Mi math/roll_pitch_yaw.cc
[NEW] +4.07Mi multibody/tree/linear_spring_damper.cc
[NEW] +2.35Mi math/quadratic_form.cc
+22% +1.71Mi [section .debug_aranges]
[NEW] +1.62Mi multibody/tree/revolute_spring.cc
[NEW] +1.59Mi systems/framework/single_output_vector_source.cc
[NEW] +1.57Mi systems/framework/vector_system.cc
[NEW] +1.51Mi multibody/tree/body_node_impl.cc
-2.4% -914Ki multibody/plant/tamsi_solver.cc
-34.7% -1.09Mi multibody/tree/weld_joint.cc
-70.8% -7.98Mi common/polynomial.cc
+23% +129Mi TOTAL In my initial draft of the PR, I tried to apply I'll have to investigate more. |
eaa3c4c
to
fc3b02f
Compare
This is pretty close, but is still failing some installed-image acceptance tests due to losing some DT_NEEDED on the shared library. |
6928cba
to
aef8982
Compare
@drake-jenkins-bot mac-mojave-clang-bazel-experimental-release please |
Ugh. The macOS debug build filled up its disk again: |
aef8982
to
f8a3a02
Compare
It looks like bazelbuild/rules_cc@c2b692b might be on the way to fixing this upstream. |
f8a3a02
to
c4e4673
Compare
c4e4673
to
92fda5c
Compare
I finally found a solution that I am not unhappy with. It should be exactly the same as before for libdrake build time and disk footprint, and retain the improvement for link size and times for standalone binary programs. |
@drake-jenkins-bot mac-mojave-clang-bazel-experimental-release please |
Guess what +@sammy-tri and +@jamiesnape? This is ready for review again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses less than 100 MB extra space on Mac CI in debug as far as I can tell.
Reviewed 4 of 7 files at r2.
Reviewable status: labeled "do not merge"
-@sammy-tri +@ggould-tri for today's on-call platform review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is pretty painful. Seems correct, though.
Reviewed 4 of 7 files at r2.
Reviewable status: labeled "do not merge"
92fda5c
to
4bab291
Compare
I did a retest on Anzu; everything worked fine. (I also fixed some nits I noticed while reading over this again with fresh eyes.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3.
Reviewable status: complete! all discussions resolved, LGTM from assignees ggould-tri(platform),jamiesnape
As a side-effect, duplicate definitions (e.g., of
main
) are now an error.Closes #12137.
Relates bazelbuild/bazel#7362.
This change is