[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: > Can you update the description to mention which PR makes RISCV targets > inspect -fcf-protection=? Added PR links. Thanks! https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you update the description to mention which PR makes RISCV targets inspect -fcf-protection=? https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: See https://github.com/llvm/llvm-project/pull/109784 and https://github.com/llvm/llvm-project/pull/112477 for the adoption of `-fcf-protection` for RISC-V targets https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits maili

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Ming-Yi Lai (mylai-mtk) Changes 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

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Ming-Yi Lai via cfe-commits
https://github.com/mylai-mtk created https://github.com/llvm/llvm-project/pull/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 `__C