-
Notifications
You must be signed in to change notification settings - Fork 69
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
-Z default-visibility option #782
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed. Concerns or objections to the proposal should be discussed on Zulip and formally registered here by adding a comment with the following syntax:
Concerns can be lifted with:
See documentation at https://forge.rust-lang.org cc @rust-lang/compiler @rust-lang/compiler-contributors |
@rustbot second |
@rustbot label -final-comment-period +major-change-accepted |
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Use protected visibility when LLD feature is enabled and enable it when building rustc rust-lang/compiler-team#782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd
Use protected visibility when building rustc rust-lang/compiler-team#782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd
Use protected visibility when building rustc with LLD rust-lang/compiler-team#782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd
Use protected visibility when building rustc with LLD rust-lang/compiler-team#782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd
Use protected visibility when building rustc with LLD rust-lang/compiler-team#782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd
Proposal
-Z default-hidden-visibility
with-Z default-visibility
, which takes one of several different visibility levels as an argument.protected
visibility rather thandefault
visibility.protected
visibility means that those symbols cannot be interposed by the executable or by other shared objects earlier in the load order. This allows the compiler to emit direct references to those symbols when used within the same shared object that defines them. This is more efficient.-Z default-visibility
option, however I'm a little uncomfortable with naming one of the options "default" if it may eventually not be the default. i.e. if we change the default toprotected
.Tracking issue for
default-hidden-visibility
: #656PR that makes this change, but as a separate flag: rust-lang/rust#130005
Original issue that proposed changing to
protected
, but without a flag: rust-lang/rust#105518Mentors or Reviewers
None
Process
The main points of the Major Change Process are as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
The text was updated successfully, but these errors were encountered: