-
Notifications
You must be signed in to change notification settings - Fork 69
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: Compile with C++20 #411
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Warres <[email protected]>
Windows and MacOS presubmits fail with:
This should be fixable by upgrading to a more recent version of googletest: google/googletest#2914 |
Signed-off-by: Michael Warres <[email protected]>
Repro of g++-specific compile error with variadic templates, which compiles successfully with -std=c++17 but not with -std=c++20: https://godbolt.org/z/TT9a9YPf7 |
Changing this constructor declaration from:
to:
appears to appease gcc-12, and works with clang as well. Hooray for godbolt. |
Signed-off-by: Michael Warres <[email protected]>
Signed-off-by: Michael Warres <[email protected]>
clang-tidy failure may be llvm/llvm-project#56709 |
Looks like the issue was this. I'll put it in a PR for proxy-wasm-cpp-sdk tomorrow. |
Signed-off-by: Michael Warres <[email protected]>
Signed-off-by: Michael Warres <[email protected]>
…clang-asan Signed-off-by: Michael Warres <[email protected]>
I distinctly remember we had to appeal this way in envoy - there might be a patch there already. |
|
The only remaining CI failure is due to clang-tidy itself crashing, which I hope is transient. So I think this is ready for review, @martijneken and/or @PiotrSikora. Thanks! |
This isn't strictly necessary in this PR for CI to pass, however I encountered a need for it in child PR proxy-wasm#409, and seemed more appropriate to add here. Signed-off-by: Michael Warres <[email protected]>
Signed-off-by: Michael Warres <[email protected]>
…lang-tidy-12 Signed-off-by: Michael Warres <[email protected]>
@@ -0,0 +1,33 @@ | |||
# Address g++ -std=c++20 variadic template compilation issue: |
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.
This should be fixed directly in the C++ SDK (which we also control) and bumped here instead.
This is to appease stricter checks with g++ -std=c++20, details in [this](proxy-wasm/proxy-wasm-cpp-host#411 (comment)) and subsequent comments. Signed-off-by: Michael Warres <[email protected]>
std=c++20
is used by both v8 and Envoy. Switching to use it overall will reduce build surprises when importing proxy-wasm-cpp-host into Envoy.