Skip to content
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

Subject: Porting Envoy to C++17 #11570

Closed
wants to merge 23 commits into from
Closed

Conversation

stedsome
Copy link
Contributor

Signed-off-by: Yifan Yang needyyang@google.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Commit Message: This is to continue the process of porting Envoy to C++17. It aims to set the foundation for the improved readability when Envoy codebase can start to utilize a various of features of C++17.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

@junr03
Copy link
Member

junr03 commented Jun 16, 2020

@stedsome I see you have this as draft. Let me know when you are ready for a review

/wait

@stedsome
Copy link
Contributor Author

@stedsome I see you have this as draft. Let me know when you are ready for a review

/wait

Thanks. It is currently blocked on fixing windows CI.

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy[\w/]*/(v1alpha\d?|v1|v2alpha\d?|v2))|(api/envoy/type/(matcher/)?\w+.proto).
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #11570 was synchronize by stedsome.

see: more, trace.

Yifan Yang added 7 commits June 26, 2020 15:24
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Yifan Yang added 4 commits June 26, 2020 17:30
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
@wrowe
Copy link
Contributor

wrowe commented Jun 26, 2020

Without a chance to review the specific submission, appreciate your efforts! Are you familiar with PR #9654? This subject interests @sunjayBhatia and I, and @lizan as well, so it would be great to make progress and perhaps coordinate some resources to accomplishing this rev 17 bump.

@stedsome
Copy link
Contributor Author

stedsome commented Jun 26, 2020 via email

Signed-off-by: Yifan Yang <needyyang@google.com>
.bazelrc Outdated
@@ -19,6 +19,7 @@ build --action_env=BAZEL_LINKOPTS=-lm
build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
build --javabase=@bazel_tools//tools/jdk:remote_jdk11
build --enable_platform_specific_config
build --cxxopt=-std=c++17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build:linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@@ -14,7 +14,7 @@ def envoy_copts(repository, test = False):
"-Wformat",
"-Wformat-security",
"-Wvla",
"-std=c++14",
"-std=c++17",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove this line if .bazelrc specify it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.bazelrc is specifying cxxopt's and not copt's?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is got rid of. But -std=c++17 is something not applicable to C, so it is in cxxopt rather than copt

@@ -25,7 +25,7 @@ def envoy_copts(repository, test = False):
msvc_options = [
"-WX",
"-Zc:__cplusplus",
"-std:c++14",
"-std:c++17",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

"statusor.h",
"statusor_internals.h",
],
- copts = ["-std=c++14"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to verify that .bazelrc cxxopts propagate to cell-cpp dependency. But eliminating the duplicates would be fantastic.

We expect to also pick up c++17, the msvc / clang-cl syntax is just slightly different, as illustrated in bazel/envoy_internal.bzl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the flag doesn't propagate to cel-cpp dependency.

Yifan Yang added 2 commits June 30, 2020 14:29
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Yifan Yang added 3 commits July 1, 2020 16:00
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
@stedsome stedsome marked this pull request as ready for review July 1, 2020 17:48
Yifan Yang added 6 commits July 1, 2020 18:53
Signed-off-by: Yifan Yang <needyyang@google.com>
…the windows and macOS build

Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
…_iter

Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
This reverts commit 711507a.

Signed-off-by: Yifan Yang <needyyang@google.com>
@stedsome stedsome closed this Jul 7, 2020
yanavlasov pushed a commit that referenced this pull request Jul 7, 2020
This is the PR that does the setup work needed to fix some
incompatiblity issue with the current codebase and C++17.

This is a part of the draft PR #11570 that intends to
port Envoy to C++17, sans all the changes to build configurations.

Signed-off-by: Yifan Yang needyyang@google.com
mattklein123 pushed a commit that referenced this pull request Jul 15, 2020
Signed-off-by: Yifan Yang <needyyang@google.com>
KBaichoo pushed a commit to KBaichoo/envoy that referenced this pull request Jul 30, 2020
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
scheler pushed a commit to scheler/envoy that referenced this pull request Aug 4, 2020
This is the PR that does the setup work needed to fix some
incompatiblity issue with the current codebase and C++17.

This is a part of the draft PR envoyproxy#11570 that intends to
port Envoy to C++17, sans all the changes to build configurations.

Signed-off-by: Yifan Yang needyyang@google.com
Signed-off-by: scheler <santosh.cheler@appdynamics.com>
scheler pushed a commit to scheler/envoy that referenced this pull request Aug 4, 2020
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: scheler <santosh.cheler@appdynamics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants