-
Notifications
You must be signed in to change notification settings - Fork 769
[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
base: sycl
Are you sure you want to change the base?
Conversation
…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]>
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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
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.