Commit 404d281
authored
[SYCL][Windows] Improve windows sycl.lib linking (#6699)
This patch does two things, first it makes `-fsycl` ignore `-nostdlib`
when linking the SYCL library. This is necessary because for Clang on
Windows CMake will generate link commands using `-nostdlib` and
explicitly list the system libraries, but of course it doesn't do it for
SYCL, so we currently end up never linking the SYCL library when this is
used.
Ignoring `-nostdlib` for `-fsycl` on Windows seems like a reasonnable
solution for this as this is also what is done for the OpenMP runtime
libraries.
See the CMake module:
*
https://github.com/Kitware/CMake/blob/aa2de7cd2a04699744a224ab84e0ca483559c5d3/Modules/Platform/Windows-Clang.cmake#L79
In addition this patch also adds a linker parameter to help clang find
the `sycl.lib` file without requiring users to tweak their environments
to link against it.1 parent 436f0d8 commit 404d281
File tree
2 files changed
+18
-4
lines changed- clang
- lib/Driver/ToolChains
- test/Driver
2 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
| 137 | + | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
637 | 642 | | |
638 | 643 | | |
639 | 644 | | |
| |||
643 | 648 | | |
644 | 649 | | |
645 | 650 | | |
646 | | - | |
647 | | - | |
| 651 | + | |
| 652 | + | |
648 | 653 | | |
649 | 654 | | |
650 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
651 | 664 | | |
652 | 665 | | |
653 | 666 | | |
| |||
0 commit comments