tests: verify sanitizer cc_feature injection via compile-time assertion - #31
Open
RSingh1511 wants to merge 1 commit into
Open
tests: verify sanitizer cc_feature injection via compile-time assertion#31RSingh1511 wants to merge 1 commit into
RSingh1511 wants to merge 1 commit into
Conversation
RSingh1511
force-pushed
the
rs/sanitizer-test-coverage
branch
4 times, most recently
from
July 21, 2026 14:05
99c6076 to
e0215f5
Compare
nradakovic
reviewed
Jul 24, 2026
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_feature( |
Member
There was a problem hiding this comment.
So I had something else in mind. Option number 1:
cc_feature(
name = "ubsan_base",
args = [
"":ubsan_link_args_base",
],
visibility = ["//visibility:public"],
implies = ["debug_symbols"],
feature_name = "score_ubsan_base",
)
cc_feature(
name = "ubsan_gcc",
feature_name = "score_ubsan_gcc",
visibility = ["//visibility:public"],
implies = ["ubsan_base"],
)
cc_feature(
name = "ubsan_clang",
args = [
"":ubsan_link_args_clang_runtime",
],
feature_name = "score_ubsan_clang",
visibility = ["//visibility:public"],
implies = ["ubsan_base"],
)Option 2 (requires some changes on bazel_platforms side):
cc_feature(
name = "ubsan",
args = select({
"@score_bazel_platforms//config:clang": [
":ubsan_link_args_clang_runtime",
],
"//condition:default": [],
}) + [
":ubsan_compile_args",
":ubsan_link_args_base",
]
visibility = ["//visibility:public"],
implies = ["debug_symbols"],
feature_name = "score_ubsan",
)Flag @score_bazel_platforms//config:clang is global config set via platform (--platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix or --platforms=@score_bazel_platforms//:x86_64-linux-clang_16-posix.
With your change we still cannot use ubsan on gcc based toolchains. With my, we can.
Member
There was a problem hiding this comment.
For start, I would maybe go with 1 since this one doesn't require that we introduce new platform definitions (which is OK, just we need approval from infra group).
RSingh1511
force-pushed
the
rs/sanitizer-test-coverage
branch
from
July 27, 2026 07:38
e0215f5 to
ccd5827
Compare
RSingh1511
force-pushed
the
rs/sanitizer-test-coverage
branch
from
July 27, 2026 08:20
ccd5827 to
e6bbfce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes for Reviewer
Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #24