Skip to content

Commit 923afb9

Browse files
[SYCL][E2E] Fix zstd support detection in LIT with icx on Windows (#16582)
Fixes CMPLRLLVM-64568 `-shared` is invalid with `icx` on Windows. This PR makes use of `/LD` instead when compiler accepts MSVC-style args.
1 parent 1b569b7 commit 923afb9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,22 @@ def open_check_file(file_name):
328328

329329
# Check if clang is built with ZSTD and compression support.
330330
fPIC_opt = "-fPIC" if platform.system() != "Windows" else ""
331+
# -shared is invalid for icx on Windows, use /LD instead.
332+
dll_opt = "/LD" if cl_options else "-shared"
333+
331334
ps = subprocess.Popen(
332-
[config.dpcpp_compiler, "-fsycl", "--offload-compress", "-shared", fPIC_opt, "-x", "c++", "-", "-o", "-"],
335+
[
336+
config.dpcpp_compiler,
337+
"-fsycl",
338+
"--offload-compress",
339+
dll_opt,
340+
fPIC_opt,
341+
"-x",
342+
"c++",
343+
"-",
344+
"-o",
345+
"-",
346+
],
333347
stdin=subprocess.PIPE,
334348
stdout=subprocess.DEVNULL,
335349
stderr=subprocess.PIPE,

0 commit comments

Comments
 (0)