-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: 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.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Description
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,
- whether we are linking an executable or library (that's the case for
crt-static
) - whether we use dynamic linking (in some sense) (that's the case for windows-gnu target compatibility with toolchains providing LLVM tools only #72241 (comment))
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 binariesArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: 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.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team