[SYCL][NFC] Use /clang:-std= instead of /std: to set C++ standard#18828
[SYCL][NFC] Use /clang:-std= instead of /std: to set C++ standard#18828AlexeySachkov merged 3 commits intointel:syclfrom
/clang:-std= instead of /std: to set C++ standard#18828Conversation
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
|
@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. |
uditagarwal97
left a comment
There was a problem hiding this comment.
Thanks for providing the additional context @0x12CC!
Change LGTM.
Co-authored-by: Michael Toguchi <michael.d.toguchi@intel.com>
/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.