Open
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.