Skip to content

[Driver][SYCL] Pass as system headers for external SYCL host compilation #18449

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

Merged
merged 2 commits into from
May 15, 2025

Conversation

mdtoguchi
Copy link
Contributor

The use of -fsycl-host-compiler=arg allows a user to specify a 3rd party compiler to perform host compilation when using -fsycl. The compilation will also include the SYCL specific headers. Pass in these headers as system headers with -isystem so they are treated as system headers as opposed to user headers.

…lation

The use of `-fsycl-host-compiler=arg` allows a user to specify a 3rd
party compiler to perform host compilation when using `-fsycl`.  The
compilation will also include the SYCL specific headers.  Pass in these
headers as system headers with `-isystem` so they are treated as system
headers as opposed to user headers.

Signed-off-by: Michael D Toguchi <[email protected]>
@mdtoguchi mdtoguchi requested a review from a team as a code owner May 13, 2025 18:03
Comment on lines 5297 to 5301
HostCompileArgs.push_back(IsMSVCHostCompiler ? "-I" : "-isystem");
HostCompileArgs.push_back(TCArgs.MakeArgString(SYCLDir));
HostCompileArgs.push_back("-I");
HostCompileArgs.push_back(IsMSVCHostCompiler ? "-I" : "-isystem");
HostCompileArgs.push_back(TCArgs.MakeArgString(STLWrappersDir));
HostCompileArgs.push_back("-I");
HostCompileArgs.push_back(IsMSVCHostCompiler ? "-I" : "-isystem");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use /external:I for MSVC?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we can. I double checked our release support matrix, and the releases we support doesn't require the additional /external:experimental flag.

Copy link
Contributor

@tahonermann tahonermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mdtoguchi, looks good to me!

@mdtoguchi
Copy link
Contributor Author

Failure known with issue here: #18463
@intel/llvm-gatekeepers, can this be merged?

@aelovikov-intel aelovikov-intel merged commit 53ae4bf into intel:sycl May 15, 2025
23 of 24 checks passed
@mdtoguchi mdtoguchi deleted the sycl-host-sys-header branch May 15, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants