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

Bazel "linkstatic" should be de-boilerplated #5104

Closed
david-german-tri opened this issue Feb 8, 2017 · 1 comment
Closed

Bazel "linkstatic" should be de-boilerplated #5104

david-german-tri opened this issue Feb 8, 2017 · 1 comment

Comments

@david-german-tri
Copy link
Contributor

We should zap linkstatic = 1 throughout Drake, then add back the ones that are actually necessary, with explanatory comments.

@david-german-tri david-german-tri self-assigned this Feb 8, 2017
@david-german-tri david-german-tri changed the title Bazel "linkstatic" meme isn't helpful Bazel "linkstatic" should be de-boilerplated Feb 8, 2017
@david-german-tri
Copy link
Contributor Author

From f2f with @jwnimmer-tri: On cc_library rules, linkstatic = 1 spares us the cost of compiling twice. That's useful, so we should just move it inside the drake_cc_library macro, now that we have one.

Longer-term, we might consider generating PIC, at which point Bazel could produce a .so and a .a without compiling twice, and we might then want to turn linkstatic off again.

This entire discussion has no bearing on cc_binary rules, where linkstatic = 1 causes Bazel to prefer .a dependencies when available. That's good and we should continue doing it. Again, it could be deboilerplated into the drake_cc_binary macro.

david-german-tri added a commit to david-german-tri/drake that referenced this issue Feb 13, 2017
david-german-tri added a commit to david-german-tri/drake that referenced this issue Feb 13, 2017
david-german-tri added a commit to david-german-tri/drake that referenced this issue Feb 13, 2017
david-german-tri added a commit to david-german-tri/drake that referenced this issue Feb 13, 2017
david-german-tri added a commit to david-german-tri/drake that referenced this issue Feb 13, 2017
kunimatsu-tri pushed a commit to kunimatsu-tri/drake that referenced this issue Mar 1, 2017
kunimatsu-tri pushed a commit to kunimatsu-tri/drake that referenced this issue Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant