Skip to content

Commit 798b370

Browse files
xinhaoyuancopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 846297412
1 parent 41c8a0f commit 798b370

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

centipede/testing/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
1616
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1717
load("@rules_cc//cc:cc_shared_library.bzl", "cc_shared_library")
18+
load("//tools/build_defs/testing:bzl_library.bzl", "bzl_library")
1819
load(":build_defs.bzl", "centipede_fuzz_target")
1920

2021
package(default_visibility = [
@@ -471,3 +472,11 @@ sh_test(
471472
"@com_google_fuzztest//centipede:test_util_sh",
472473
],
473474
)
475+
476+
bzl_library(
477+
name = "build_defs_bzl",
478+
srcs = ["build_defs.bzl"],
479+
parse_tests = False,
480+
visibility = ["//visibility:private"],
481+
deps = ["//security/fuzzing/blaze:cc_fuzz_target_bzl"],
482+
)

centipede/testing/build_defs.bzl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def _sancov_transition_impl(settings, attr):
2929
for x in settings["//command_line_option:features"]
3030
if x not in features_to_strip
3131
]
32+
compiler = settings["//command_line_option:compiler"]
33+
compilers_to_disable = ["tsan", "msan"]
34+
if compiler in compilers_to_disable:
35+
compiler = None
3236

3337
# some of the valid sancov flag combinations:
3438
# trace-pc-guard,pc-table
@@ -51,7 +55,7 @@ def _sancov_transition_impl(settings, attr):
5155
"//command_line_option:compilation_mode": "opt",
5256
"//command_line_option:strip": "never", # preserve debug info.
5357
"//command_line_option:features": filtered_features,
54-
"//command_line_option:compiler": None,
58+
"//command_line_option:compiler": compiler,
5559
"//command_line_option:dynamic_mode": "off",
5660
}
5761

@@ -60,6 +64,7 @@ sancov_transition = transition(
6064
inputs = [
6165
"//command_line_option:copt",
6266
"//command_line_option:features",
67+
"//command_line_option:compiler",
6368
],
6469
outputs = [
6570
"//command_line_option:collect_code_coverage",

0 commit comments

Comments
 (0)