I am working on enabling CFI on the Trusty OS. After adding "supported-sanitizers": ["cfi"], to a custom copy of aarch64-unknown-trusty I also needed to set "crt-static-default": false. Otherwise I would get an error about sanitizers being incompatible with static linking.
With the two target changes, CFI is working as intended on Trusty.
The check and error were introduced to fix #85459, and the issue specifically mentions Linux. Could the check be relaxed to allow CFI (and maybe other sanitizers) together with crt-static outside of Linux?
I am working on enabling CFI on the Trusty OS. After adding
"supported-sanitizers": ["cfi"],to a custom copy ofaarch64-unknown-trustyI also needed to set"crt-static-default": false. Otherwise I would get an error about sanitizers being incompatible with static linking.With the two target changes, CFI is working as intended on Trusty.
The check and error were introduced to fix #85459, and the issue specifically mentions Linux. Could the check be relaxed to allow CFI (and maybe other sanitizers) together with
crt-staticoutside of Linux?