Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sycl headers to bazel toolchain config for DPCPP through icx #2905

Merged
Merged
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
9 changes: 8 additions & 1 deletion dev/bazel/toolchains/cc_toolchain_lnx.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def _preapre_builtin_include_directory_paths(repo_ctx, tools):
tools.dpcc,
"-xc++",
get_no_canonical_prefixes_opt(repo_ctx, tools.dpcc) +
_add_gcc_toolchain_if_needed(repo_ctx, tools.dpcc),
_add_gcc_toolchain_if_needed(repo_ctx, tools.dpcc) +
_add_sycl_linkage(repo_ctx, tools.dpcc) if tools.is_dpc_found else [],
) +
required_tmp_includes,
)
Expand All @@ -154,6 +155,12 @@ def _add_gcc_toolchain_if_needed(repo_ctx, cc):
else:
return []

def _add_sycl_linkage(repo_ctx, cc):
if ("icx" in cc) or ("icpx" in cc):
napetrov marked this conversation as resolved.
Show resolved Hide resolved
return ["-fsycl"]
Alexandr-Solovev marked this conversation as resolved.
Show resolved Hide resolved
else:
return []

def configure_cc_toolchain_lnx(repo_ctx, reqs):
if reqs.os_id != "lnx":
auto_configure_fail("Cannot configure Linux toolchain for '{}'".format(reqs.os_id))
Expand Down
Loading