Commit b6f61f6
authored
[Driver][SYCL] Allow for -fcf-protection to run on host only (#7251)
The -fcf-protection option is not supported for spir64 targets. This
causes an error during device compilation when compiled with -fsycl.
Allow the option to be accepted and work on the host compilation side
only, emitting a diagnostic that the option is being ignored for the
target compiles.
before: clang++ -fsycl -fcf-protection -c a.cpp
error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target
2 errors generated.
after: clang++ -fsycl -fcf-protection -c a.cpp
clang-16: warning: ignoring '-fcf-protection' option as it is not
currently supported for target 'spir64-unknown-unknown'
[-Woption-ignored]1 parent 77b6f34 commit b6f61f6
File tree
2 files changed
+18
-6
lines changed- clang
- lib/Driver/ToolChains
- test/Driver
2 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
| 703 | + | |
| 704 | + | |
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
| |||
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| 729 | + | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments