Commit 83d3448
[SYCL] Always warn when -fno-sycl-libspirv opt used. (#7378)
This PR addresses #7238
The -fno-sycl-libspirv flag only has an effect when using
nvptx64-nvidia-cuda or amdgcn-amd-amdhsa triples.
The effect is to not link the libspirv libraries built by libclc that
are only used by CUDA/HIP backends.
This flag is never recommended for normal DPC++ use because both CUDA
and HIP backends require linking with libspirv for lots of the basic
functionality.
However the option is there in case someone for whatever reason doesn't
want to link libspirv, so this PR adds (triple dependent) warnings
whenever the -fno-sycl-libspirv option is used.
If used with CUDA/HIP the warning is:
"warning: no-sycl-libspirv option is not meant for regular application
development and severely limits the correct behavior of DPC++ when using
the 'triple' triple"
For other triples the warning is:
"warning: no-sycl-libspirv option has no effect when compiled with the
'triple' triple"
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Co-authored-by: JackAKirk <chezjakirk@gmail.com>1 parent a3ae0dd commit 83d3448
File tree
4 files changed
+28
-0
lines changed- clang
- include/clang/Basic
- lib/Driver
- test/Driver
4 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1319 | 1323 | | |
1320 | 1324 | | |
1321 | 1325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1233 | 1246 | | |
1234 | 1247 | | |
1235 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments