Skip to content

Commit 594ed3d

Browse files
authored
[SYCL][XPTI] Fix build with clang++ on windows (intel#738)
Use GNU-style command line options to provide XPTI library on windows if clang++ is used.
1 parent fdab09c commit 594ed3d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

SYCL/lit.cfg.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,10 @@
353353
if os.path.exists(xptifw_lib_dir) and os.path.exists(os.path.join(xptifw_includes, 'xpti', 'xpti_trace_framework.h')):
354354
config.available_features.add('xptifw')
355355
config.substitutions.append(('%xptifw_dispatcher', xptifw_dispatcher))
356-
if platform.system() == "Linux":
356+
if cl_options:
357+
config.substitutions.append(('%xptifw_lib', " {}/xptifw.lib /I{} ".format(xptifw_lib_dir, xptifw_includes)))
358+
else:
357359
config.substitutions.append(('%xptifw_lib', " -L{} -lxptifw -I{} ".format(xptifw_lib_dir, xptifw_includes)))
358-
elif platform.system() == "Windows":
359-
if cl_options:
360-
config.substitutions.append(('%xptifw_lib', " {}/xptifw.lib /I{} ".format(xptifw_lib_dir, xptifw_includes)))
361-
else:
362-
config.substitutions.append(('%xptifw_lib', " {}/xptifw.lib -I{} ".format(xptifw_lib_dir, xptifw_includes)))
363360

364361

365362
llvm_tools = ["llvm-spirv", "llvm-link"]

0 commit comments

Comments
 (0)