Commit 084f34c
authored
[SYCL][Windows] Fix debug build in non cl mode (#6721)
This fixes building SYCL programs in Debug mode with
`Windows-Clang.cmake`.
The issue is that the code was using `OPT__SLASH_MDd` to select
`sycld.lib` but under the `!C.getDriver.IsCLMode()` condition this flag
will never be set, `OPT_g_Flag` should be used instead (`-g` rather than
`/MDd`).
Note that using the regular `clang` command line to manually build with
`-g` still doesn't work as it will link against `msvcrt` rather than
`msvcrtd` and will miss required defines for debug builds on Windows
(`_DEBUG`). This is correctly done by the CMake module or simply when
using `clang-cl`.1 parent f0c17d4 commit 084f34c
File tree
2 files changed
+8
-5
lines changed- clang
- lib/Driver/ToolChains
- test/Driver
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| |||
0 commit comments