Summary
Target features generally control which instructions codegen may use during the final step of generating assembly, but some of them also affect how arguments and return values are passed across function call boundaries.
This means that in general, code compiled with different target features is not ABI-compatible and cannot be linked with each other.
In particular, since the standard library is shipped in binary form pre-built for the default set of target features, enabling/disabling particular features means that calling standard library methods suddenly causes Undefined Behavior.
That's a soundness bug that we clearly should tackle.
Background reading
Design meeting document: https://hackmd.io/e4bYAMh2RWG2yKZHivmF9Q
About this issue
This issue corresponds to a lang-team design meeting proposal. It corresponds to a possible topic of discussion that may be scheduled for deeper discussion during one of our design meetings.
Summary
Target features generally control which instructions codegen may use during the final step of generating assembly, but some of them also affect how arguments and return values are passed across function call boundaries.
This means that in general, code compiled with different target features is not ABI-compatible and cannot be linked with each other.
In particular, since the standard library is shipped in binary form pre-built for the default set of target features, enabling/disabling particular features means that calling standard library methods suddenly causes Undefined Behavior.
That's a soundness bug that we clearly should tackle.
Background reading
Design meeting document: https://hackmd.io/e4bYAMh2RWG2yKZHivmF9Q
-Ctarget-featurerust#116344About this issue
This issue corresponds to a lang-team design meeting proposal. It corresponds to a possible topic of discussion that may be scheduled for deeper discussion during one of our design meetings.