Skip to content

build: compile with C++20 #439

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ build:zig-cc-linux-aarch64 --test_env=QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/

build --enable_platform_specific_config

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

# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
startup --windows_enable_symlinks
Expand Down
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ Checks: clang-*,
-readability-magic-numbers,
-readability-make-member-function-const,
-readability-simplify-boolean-expr,
-clang-diagnostic-builtin-macro-redefined,

WarningsAsErrors: '*'
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
os: ubuntu-22.04
arch: x86_64
action: test
flags: --config=clang-asan-strict --define=crypto=system
flags: --config=clang-asan --define=crypto=system
- name: 'NullVM on Linux/x86_64 with TSan'
engine: 'null'
os: ubuntu-22.04
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
os: ubuntu-22.04
arch: x86_64
action: test
flags: --config=clang-asan-strict --define=crypto=system
flags: --config=clang-asan --define=crypto=system
- name: 'Wasmtime on Linux/aarch64'
engine: 'wasmtime'
repo: 'com_github_bytecodealliance_wasmtime'
Expand Down
14 changes: 6 additions & 8 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def proxy_wasm_cpp_host_repositories():
maybe(
http_archive,
name = "proxy_wasm_cpp_sdk",
sha256 = "89792fc1abca331f29f99870476a04146de5e82ff903bdffca90e6729c1f2470",
strip_prefix = "proxy-wasm-cpp-sdk-95bb82ce45c41d9100fd1ec15d2ffc67f7f3ceee",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/95bb82ce45c41d9100fd1ec15d2ffc67f7f3ceee.tar.gz"],
sha256 = "26c4c0f9f645de7e789dc92f113d7352ee54ac43bb93ae3a8a22945f1ce71590",
strip_prefix = "proxy-wasm-cpp-sdk-7465dee8b2953beebff99f6dc3720ad0c79bab99",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/7465dee8b2953beebff99f6dc3720ad0c79bab99.tar.gz"],
)

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

# NullVM dependencies.
Expand Down
3 changes: 3 additions & 0 deletions test/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,7 @@ class TestVm : public testing::TestWithParam<std::string> {
std::string engine_;
};

// TODO: remove when #412 is fixed.
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TestVm);

} // namespace proxy_wasm
Loading