Skip to content

Add strict C++20 build rules#3

Merged
Yuki-cpp merged 2 commits into
mainfrom
strict-build-rules-6576417994083137427
Jan 21, 2026
Merged

Add strict C++20 build rules#3
Yuki-cpp merged 2 commits into
mainfrom
strict-build-rules-6576417994083137427

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

@google-labs-jules google-labs-jules Bot commented Jan 21, 2026

Introduced build_utils package with strict_cc_* macros.
Updated MODULE.bazel to include platforms

Added `build_utils` package containing `strict_cc_library`, `strict_cc_binary`, and `strict_cc_test`.
These macros wrap the native cc rules and enforce C++20 standard and warnings as errors.
Platform-specific flags are applied:
- Linux: -std=c++20, -Wall, -Wextra, -Wpedantic, -Werror
- Windows: /std:c++20, /WX, /W4

Added `platforms` dependency to `MODULE.bazel`.
Verified with a test case in `tests/strict_check`.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Comment thread tests/strict_check/test.cpp Outdated
return 42;
}

int main() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wrongly formatted file.
Use bazel run //... --config=clang-format-fix to format the code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ran bazel run //... --config=clang-format-fix to fix formatting.

Comment thread tests/strict_check/test.cpp Outdated
Added `build_utils` package containing `strict_cc_library`, `strict_cc_binary`, and `strict_cc_test`.
These macros wrap the native cc rules and enforce C++20 standard and warnings as errors.
Platform-specific flags are applied:
- Linux: -std=c++20, -Wall, -Wextra, -Wpedantic, -Werror
- Windows: /std:c++20, /WX, /W4

Updated `src/BUILD.bazel` to use these new strict rules.
Updated `MODULE.bazel` to include `platforms` dependency.
Ran clang-format-fix to ensure code compliance.
@Yuki-cpp Yuki-cpp marked this pull request as ready for review January 21, 2026 14:20
@Yuki-cpp Yuki-cpp merged commit 9262eb6 into main Jan 21, 2026
2 checks passed
@Yuki-cpp Yuki-cpp deleted the strict-build-rules-6576417994083137427 branch January 21, 2026 14:22
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.

1 participant