-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][NFC] Use /clang:-std=
instead of /std:
to set C++ standard
#18828
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
Conversation
Signed-off-by: Michael Aziz <[email protected]>
Signed-off-by: Michael Aziz <[email protected]>
@uditagarwal97, friendly ping. |
Hi,
|
Thanks for taking a look at this.
No, it doesn't seem to work. With C++ 23, the driver produces the following error:
According to the MSVC documentation, the correct flag would be
I understood that the differences in the DPC++ driver are only related to new versions of C++ like |
I see. I'm curious about why the test case needs C++23, when it's still in "preview"? |
@mdtoguchi FYI. I'm not sure if we should consider it as a bug in clang driver. Even if we were to workaround this problem by mapping |
The relevant PRs are here:
The KHR extension includes member functions that require features from C++ 23. These features are fully supported in both Clang and DPC++.
I think the relevant mapping in the driver is here: llvm/clang/lib/Driver/ToolChains/Clang.cpp Line 8216 in 7278476
I don't believe there's a bug and we shouldn't need to maintain any additional mapping. My change just uses the version of the flag that's not MSVC-compatible so that LIT tests can specify the same standard on both Windows and Linux. I'm open to using an alternative approach if you think there's a better way to do this. |
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 for providing the additional context @0x12CC!
Change LGTM.
Co-authored-by: Michael Toguchi <[email protected]>
/Qstd
instead of /std
to set C++ standard/Qstd
instead of /std
to set C++ standard
/Qstd
instead of /std
to set C++ standard/clang:-std=
instead of /std:
to set C++ standard
Windows CI failure should be unrelated. I've created a PR to fix it: #18939. Restarting Windows CI tests |
The two options are similar but
/clang:-std=
works for C++ 23 on Windows.