Skip to content

Allow CFI with crt-static #155269

Description

@ahomescu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sanitizersArea: Sanitizers for correctness and code qualityneeds-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions