Skip to content

Commit 1f604c4

Browse files
mpwarresleonm1
authored andcommitted
build using c++20
std=c++20 is used by both v8 and Envoy. Switching to use it is necessary to build with more recent versions of v8, and will also reduce overall build surprises when importing proxy-wasm-cpp-host into Envoy. Signed-off-by: Michael Warres <[email protected]>
1 parent ad8303f commit 1f604c4

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.bazelrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ build:zig-cc-linux-aarch64 --test_env=QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/
8080

8181
build --enable_platform_specific_config
8282

83-
# Use C++17.
84-
build:linux --cxxopt=-std=c++17
85-
build:macos --cxxopt=-std=c++17
86-
build:windows --cxxopt="/std:c++17"
83+
# Use C++20.
84+
build:linux --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
85+
build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
86+
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"
8787

8888
# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
8989
startup --windows_enable_symlinks

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ Checks: clang-*,
1919
-readability-magic-numbers,
2020
-readability-make-member-function-const,
2121
-readability-simplify-boolean-expr,
22+
-clang-diagnostic-builtin-macro-redefined,
2223

2324
WarningsAsErrors: '*'

bazel/repositories.bzl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def proxy_wasm_cpp_host_repositories():
130130
maybe(
131131
http_archive,
132132
name = "proxy_wasm_cpp_sdk",
133-
sha256 = "89792fc1abca331f29f99870476a04146de5e82ff903bdffca90e6729c1f2470",
134-
strip_prefix = "proxy-wasm-cpp-sdk-95bb82ce45c41d9100fd1ec15d2ffc67f7f3ceee",
135-
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/95bb82ce45c41d9100fd1ec15d2ffc67f7f3ceee.tar.gz"],
133+
sha256 = "26c4c0f9f645de7e789dc92f113d7352ee54ac43bb93ae3a8a22945f1ce71590",
134+
strip_prefix = "proxy-wasm-cpp-sdk-7465dee8b2953beebff99f6dc3720ad0c79bab99",
135+
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/7465dee8b2953beebff99f6dc3720ad0c79bab99.tar.gz"],
136136
)
137137

138138
# Compile DB dependencies.
@@ -149,11 +149,9 @@ def proxy_wasm_cpp_host_repositories():
149149
maybe(
150150
http_archive,
151151
name = "com_google_googletest",
152-
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
153-
strip_prefix = "googletest-release-1.10.0",
154-
urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz"],
155-
patches = ["@proxy_wasm_cpp_host//bazel/external:googletest.patch"],
156-
patch_args = ["-p1"],
152+
sha256 = "65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c",
153+
strip_prefix = "googletest-1.17.0",
154+
urls = ["https://github.com/google/googletest/releases/download/v1.17.0/googletest-1.17.0.tar.gz"],
157155
)
158156

159157
# NullVM dependencies.

test/utility.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,7 @@ class TestVm : public testing::TestWithParam<std::string> {
192192
std::string engine_;
193193
};
194194

195+
// TODO: remove when #412 is fixed.
196+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm);
197+
195198
} // namespace proxy_wasm

0 commit comments

Comments
 (0)