rustc_target: Update some old naming around self contained linking by petrochenkov · Pull Request #100126 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

petrochenkov

The "fallback" naming pre-dates introduction of -Clink-self-contained.
Noticed when reviewing #99500.

This PR doesn't break any json target spec, but supporting per-linker-flavor startup objects needed by #99500 will break them, so maybe next time I'll remove the compatibility names.

@rustbot rustbot added the T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

label

Aug 3, 2022

@rust-highfive

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive

luqmana

"mingw" => CrtObjectsFallback::Mingw,
"wasm" => CrtObjectsFallback::Wasm,
"false" => LinkSelfContainedDefault::False,
"true" | "wasm" => LinkSelfContainedDefault::True,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the wasm case here for back-compat for any out-of-tree target specs?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that it's used anywhere, but I just kept full backward compatibility for all options for now.

@luqmana

+1 This naming makes the option a lot less confusing. LGTM

@lcnr

petrochenkov

/// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
pub pre_link_objects_self_contained: CrtObjects,
pub post_link_objects_self_contained: CrtObjects,
pub link_self_contained_default: LinkSelfContainedDefault,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub link_self_contained_default: LinkSelfContainedDefault,
pub link_self_contained: LinkSelfContainedDefault,

Large number of target options target.foo provide defaults for something that can also be user-specified -Cfoo=override, and almost none of them uses the _default suffix.

@fee1-dead

davidtwco

@davidtwco

@bors

📌 Commit e74299b has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Aug 9, 2022

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request

Aug 10, 2022

@Dylan-DPC

rustc_target: Update some old naming around self contained linking

The "fallback" naming pre-dates introduction of -Clink-self-contained. Noticed when reviewing rust-lang#99500.

This PR doesn't break any json target spec, but supporting per-linker-flavor startup objects needed by rust-lang#99500 will break them, so maybe next time I'll remove the compatibility names.

@bors

This comment was marked as resolved.

@bors bors added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Aug 12, 2022

@petrochenkov

The "fallback" naming pre-dates introduction of -Clink-self-contained

@petrochenkov

@bors

📌 Commit 8fa707a has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Aug 12, 2022

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request

Aug 13, 2022

@Dylan-DPC

rustc_target: Update some old naming around self contained linking

The "fallback" naming pre-dates introduction of -Clink-self-contained. Noticed when reviewing rust-lang#99500.

This PR doesn't break any json target spec, but supporting per-linker-flavor startup objects needed by rust-lang#99500 will break them, so maybe next time I'll remove the compatibility names.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 14, 2022

@bors

Rollup of 6 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

@lqd lqd mentioned this pull request

Apr 30, 2025

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.