-
Notifications
You must be signed in to change notification settings - Fork 566
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
build: move from c++11 to c++17 #4983
Conversation
Main question to answer: will we break something that cannot be fixed? (DXC is moving forward with cpp17 by ex) |
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.
See also line 34, and #5020
Is this specific to clang and GCC? I suppose we have to leave the C++11 flow for MSVC?
The idea was to align this repo to LLVM (and now DXC) 3 years "rule": allow compiler/toolchains/standard bump after ~3 years. Vulkan-validation-layers already builds with cpp17, shaderc can build in cpp17, Dawn still builds when changing spirv-tools to cpp17, and DXC dropped support for pre-2022 VS, so won't break either. |
eb997d7
to
d7c478d
Compare
We have agreed to move forward with this. We just want to hear if there are any objections from the spir working group. We believe this should be acceptable because:
There are a few other changes that will be needed before we can merge this. Some kokoro file checkout a specific version of googletest instead of the latest for the kokoro builds. I think we should be able to remove that:
We will also have to update the README to say that we use C++17 (https://github.com/KhronosGroup/SPIRV-Tools#usage). |
In the 2022-01-18 SPIR WG meeting, the group agreed to move to C++17 minimum. |
Thanks! Updated the README to say we use c++17, and support VS2019 (added a note saying we won't drop support for VS2017 until it breaks due to incomplete support). |
cc1095b
to
2c1885d
Compare
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.
As a follow up or part of this change, we should start building with the latest googletest again. This would mean updating the DEPS file and the roll_deps.sh.
Moving from cpp 11 to cpp 17 will allow us to use modern features like filesystem support, optional, any, execution policies and improved templates. Signed-off-by: Nathan Gauër <brioche@google.com>
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
* add spirv-tools/1.3.243.0 * remove maintenance of old versions * spirv-tools requires C++17 since 1.3.243.0 see KhronosGroup/SPIRV-Tools#4983 * raise if compiler version not supported
Moving from cpp 11 to cpp 17 will allow us to use modern features like filesystem support, optional, any, execution policies and improved templates.