Skip to content

Commit

Permalink
On Windows, use c++20 mode as correctly needed for designated initial…
Browse files Browse the repository at this point in the history
…izers.

Designated initializers is technically only supported starting with c++20,
and the compiler on Windows points that out with an error.
  • Loading branch information
hzeller committed Dec 14, 2023
1 parent cfcbb82 commit 7f76be9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ common:macos --features=-supports_dynamic_linker --linkopt=-framework --linkopt=
# Force the use clang-cl on Windows instead of MSVC. MSVC has some issues with
# the codebase, so we focus the effort for now is to have a Windows Verible
# compiled with clang-cl before fixing the issues unique to MSVC.
common:windows --compiler=clang-cl --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 --client_env=BAZEL_CXXOPTS=/std:c++17
# Since we use designated initializers (C99 ... but >= c++20), compiler really wants the c++20 mode
common:windows --compiler=clang-cl --cxxopt=/std:c++20 --host_cxxopt=/std:c++20 --client_env=BAZEL_CXXOPTS=/std:c++20

# Address sanitizer settings.
build:asan --strip=never
Expand Down

0 comments on commit 7f76be9

Please sign in to comment.