[clang] [Clang][Basic] Enable `__has_feature(cfi)` (PR #151348)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 1 12:23:55 PDT 2025
moorabbit wrote:
There's also a problem that caused a driver test to fail. I fixed it in [b6a7ce7](https://github.com/llvm/llvm-project/pull/151348/commits/b6a7ce7e3f4f51ca71f813d931362a710abd7d87). The issue was that the driver was not expecting `-fsanitize=cfi` to also enable the `cfi-cast-strict` scheme.
After doing a little bit of digging, I found out that the [original commit](https://github.com/llvm/llvm-project/commit/d2926c91d5135a95912fdc142d133b647668e918#diff-a7ab5c13e765c93093f11fe7283020fcdbe13dfbc0e18e80cf29cfe90d8e9b4bR82) that added the CFI cast sanitizers didn't enable the `cfi-cast-strict` scheme by default (i.e. with `-fsanitize=cfi`). You need to explicitly specify `-fsanitize=cfi-cast-strict` in order to have it enabled. So I removed, in the last commit, `CFICastStrict` from the CFI sanitizer group.
Ran `check-clang` locally and didn't find any issues. CI should pass now.
https://github.com/llvm/llvm-project/pull/151348
More information about the cfe-commits
mailing list