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

Consider compilation mode when choosing pic/nopic object files to link #1624

Merged
merged 13 commits into from
Nov 6, 2022

Conversation

scentini
Copy link
Collaborator

@scentini scentini commented Nov 3, 2022

This PR changes the logic for selection of pic vs nopic outputs to be in line with what C++ rules do:

  • For shared libraries - use pic. This covers dylib, cdylib and proc-macro crate types
  • In fastbuild and dbg mode use pic by default.
  • In opt mode use nopic outputs to build binaries.

@scentini scentini requested a review from hlopko November 3, 2022 14:29
@scentini scentini marked this pull request as ready for review November 3, 2022 14:36
@hlopko hlopko merged commit 849f106 into bazelbuild:main Nov 6, 2022
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