Commit f6d74af
authored
[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 #109784 and
#112477 for the adoption
of `-fcf-protection` flag for RISC-V targets.1 parent b100c50 commit f6d74af
File tree
3 files changed
+6
-11
lines changed- clang
- lib
- Basic/Targets
- Frontend
- test/Preprocessor
3 files changed
+6
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1112 | 1116 | | |
1113 | 1117 | | |
1114 | 1118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4776 | 4776 | | |
4777 | 4777 | | |
4778 | 4778 | | |
4779 | | - | |
4780 | | - | |
4781 | | - | |
4782 | | - | |
4783 | | - | |
4784 | | - | |
4785 | | - | |
4786 | | - | |
4787 | | - | |
4788 | | - | |
4789 | | - | |
4790 | 4779 | | |
4791 | 4780 | | |
4792 | 4781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
0 commit comments