-
Notifications
You must be signed in to change notification settings - Fork 73
build: Compile with C++20 #411
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Warres <mpw@google.com>
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 <mpw@google.com>
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 <mpw@google.com>
Signed-off-by: Michael Warres <mpw@google.com>
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 <mpw@google.com>
Signed-off-by: Michael Warres <mpw@google.com>
…clang-asan Signed-off-by: Michael Warres <mpw@google.com>
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 <mpw@google.com>
Signed-off-by: Michael Warres <mpw@google.com>
…lang-tidy-12 Signed-off-by: Michael Warres <mpw@google.com>
@@ -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.
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.
I sent this in to the C++ SDK in proxy-wasm/proxy-wasm-cpp-sdk#181
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 <mpw@google.com>
Added in envoyproxy/envoy#32585. Required for proxy-wasm/proxy-wasm-cpp-host#411 Signed-off-by: Matt Leon <mattleon@google.com>
Added in envoyproxy/envoy#32585. Required for proxy-wasm/proxy-wasm-cpp-host#411 Signed-off-by: Matt Leon <mattleon@google.com>
Added in envoyproxy/envoy#32585. Required for proxy-wasm/proxy-wasm-cpp-host#411 Signed-off-by: Matt Leon <mattleon@google.com>
Added in envoyproxy/envoy#32585. Required for proxy-wasm/proxy-wasm-cpp-host#411 Signed-off-by: Matt Leon <mattleon@google.com>
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.