[all-commits] [llvm/llvm-project] f6d74a: [clang][X86] Only define __CET__ macro for X86 tar...
Ming-Yi Lai via All-commits
all-commits at lists.llvm.org
Tue Feb 18 18:13:15 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f6d74af4d9cabb9a940656887c82aaba3ad1f922
https://github.com/llvm/llvm-project/commit/f6d74af4d9cabb9a940656887c82aaba3ad1f922
Author: Ming-Yi Lai <ming-yi.lai at mediatek.com>
Date: 2025-02-19 (Wed, 19 Feb 2025)
Changed paths:
M clang/lib/Basic/Targets/X86.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
M clang/test/Preprocessor/riscv-cf-protection-return.c
Log Message:
-----------
[clang][X86] Only define __CET__ macro for X86 targets (#127616)
The `-fcf-protection` flag is now also used to enable CFI features for
the RISC-V target, so it's not suitable to define `__CET__` solely based
on the flag anymore. This patch moves the definition of the `__CET__`
macro into X86 target hook, so only X86 targets with the
`-fcf-protection` flag would enable the `__CET__` macro.
See https://github.com/llvm/llvm-project/pull/109784 and
https://github.com/llvm/llvm-project/pull/112477 for the adoption
of `-fcf-protection` flag for RISC-V targets.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list