Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ def check_igc_tag_and_add_feature():
with open(config.igc_tag_file, "r") as tag_file:
contents = tag_file.read()

def is_windows_unc_network_path(path):
if not path or platform.system() != "Windows":
return false
return path.startswith("//") or path.startswith(r"\\")

def normalize_windows_network_path(path):
if is_windows_unc_network_path(path):
path = path.replace("/", r"\\")
return path

def quote_path(path):
if not path:
Expand Down Expand Up @@ -557,11 +566,14 @@ def open_check_file(file_name):

# Check for OpenCL ICD
if config.opencl_libs_dir:
opencl_lib = config.opencl_libs_dir + "/OpenCL.lib"
config.opencl_libs_dir = quote_path(config.opencl_libs_dir)
config.opencl_include_dir = quote_path(config.opencl_include_dir)
if cl_options:
if is_windows_unc_network_path(opencl_lib):
opencl_lib = normalize_windows_network_path(opencl_lib)
config.substitutions.append(
("%opencl_lib", " " + config.opencl_libs_dir + "/OpenCL.lib")
("%opencl_lib", " " + quote_path(opencl_lib))
)
else:
config.substitutions.append(
Expand Down