Skip to content

Consider making cfg(feature = "crt-static") available *only* for link-time configuration #72510

Open
@petrochenkov

Description

@petrochenkov

cfg predicates used for link-time configuration (#[link(cfg(predicate))] #37406 #72059) may want to use data that is available only long after the regular cfg expansion happens.

For example,

We can come up with some predicate value during regular cfg expansion, but it may be different from the predicate value that we really want at link time.

Is cfg(feature = "crt-static") ever used for regular cfg expansion?
It was created mostly with link-time configuration in mind.
We probably need to check it with crater.

Metadata

Metadata

Assignees

Labels

A-linkageArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions