Skip to content

Commit be11406

Browse files
lszekerescopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 797498272
1 parent f6aa6f6 commit be11406

File tree

2 files changed

+36
-45
lines changed

2 files changed

+36
-45
lines changed

centipede/BUILD

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@
1818
load("@rules_proto//proto:defs.bzl", "proto_library")
1919
load(":instrument.bzl", "cc_uninstrumented_binary")
2020

21-
VISIBILITY = ["//visibility:public"]
21+
DEFAULT_VISIBILITY = ["//visibility:public"]
2222

23-
EXTENDED_API_VISIBILITY = VISIBILITY
24-
25-
PUBLIC_API_VISIBILITY = VISIBILITY
26-
27-
package(default_visibility = VISIBILITY)
23+
package(default_visibility = DEFAULT_VISIBILITY)
2824

2925
licenses(["notice"])
3026

@@ -49,7 +45,7 @@ cc_binary(
4945
cc_uninstrumented_binary(
5046
name = "centipede_uninstrumented",
5147
binary = ":centipede",
52-
visibility = PUBLIC_API_VISIBILITY,
48+
visibility = SILIFUZZ_VISIBLE,
5349
)
5450

5551
# A standalone seed corpus generator.
@@ -98,7 +94,7 @@ proto_library(
9894

9995
cc_proto_library(
10096
name = "seed_corpus_config_cc_proto",
101-
visibility = EXTENDED_API_VISIBILITY,
97+
visibility = SILIFUZZ_VISIBLE,
10298
deps = [":seed_corpus_config_proto"],
10399
)
104100

@@ -128,7 +124,7 @@ cc_library(
128124
name = "symbol_table",
129125
srcs = ["symbol_table.cc"],
130126
hdrs = ["symbol_table.h"],
131-
visibility = EXTENDED_API_VISIBILITY,
127+
visibility = SILIFUZZ_VISIBLE,
132128
deps = [
133129
":command",
134130
":control_flow",
@@ -159,7 +155,7 @@ cc_library(
159155
"hashed_ring_buffer.h", # TODO(kcc): consider moving to a separate cc_library.
160156
],
161157
copts = DISABLE_SANCOV_COPTS,
162-
visibility = PUBLIC_API_VISIBILITY,
158+
visibility = SILIFUZZ_VISIBLE,
163159
deps = [
164160
":rolling_hash",
165161
"@abseil-cpp//absl/base:core_headers", # exception, ok to depend on here.
@@ -170,7 +166,7 @@ cc_library(
170166
name = "pc_info",
171167
srcs = ["pc_info.cc"],
172168
hdrs = ["pc_info.h"],
173-
visibility = PUBLIC_API_VISIBILITY,
169+
visibility = SILIFUZZ_VISIBLE,
174170
deps = [
175171
"@abseil-cpp//absl/types:span",
176172
"@com_google_fuzztest//common:defs",
@@ -212,7 +208,7 @@ cc_library(
212208
name = "util",
213209
srcs = ["util.cc"],
214210
hdrs = ["util.h"],
215-
visibility = EXTENDED_API_VISIBILITY,
211+
visibility = SILIFUZZ_VISIBLE,
216212
deps = [
217213
":feature",
218214
"@abseil-cpp//absl/base:core_headers",
@@ -232,7 +228,7 @@ cc_library(
232228
name = "config_util",
233229
srcs = ["config_util.cc"],
234230
hdrs = ["config_util.h"],
235-
visibility = EXTENDED_API_VISIBILITY,
231+
visibility = SILIFUZZ_VISIBLE,
236232
deps = [
237233
"@abseil-cpp//absl/flags:reflection",
238234
"@abseil-cpp//absl/strings",
@@ -243,7 +239,7 @@ cc_library(
243239
name = "config_init",
244240
srcs = ["config_init.cc"],
245241
hdrs = ["config_init.h"],
246-
visibility = EXTENDED_API_VISIBILITY,
242+
visibility = SILIFUZZ_VISIBLE,
247243
deps = [
248244
":config_util",
249245
"@abseil-cpp//absl/base:core_headers",
@@ -260,7 +256,7 @@ cc_library(
260256
name = "config_file",
261257
srcs = ["config_file.cc"],
262258
hdrs = ["config_file.h"],
263-
visibility = EXTENDED_API_VISIBILITY,
259+
visibility = SILIFUZZ_VISIBLE,
264260
deps = [
265261
":config_init",
266262
":config_util",
@@ -396,7 +392,7 @@ cc_library(
396392
name = "analyze_corpora",
397393
srcs = ["analyze_corpora.cc"],
398394
hdrs = ["analyze_corpora.h"],
399-
visibility = EXTENDED_API_VISIBILITY,
395+
visibility = SILIFUZZ_VISIBLE,
400396
deps = [
401397
":binary_info",
402398
":control_flow",
@@ -425,7 +421,6 @@ cc_library(
425421
"-lrt", # for shm_open
426422
],
427423
}),
428-
visibility = PUBLIC_API_VISIBILITY,
429424
deps = ["@abseil-cpp//absl/base:nullability"],
430425
# don't add any dependencies.
431426
)
@@ -448,7 +443,7 @@ cc_library(
448443
srcs = ["runner_result.cc"],
449444
hdrs = ["runner_result.h"],
450445
copts = DISABLE_SANCOV_COPTS,
451-
visibility = PUBLIC_API_VISIBILITY,
446+
visibility = SILIFUZZ_VISIBLE,
452447
deps = [
453448
# This target must have a minimal set of dependencies since it is
454449
# used in centipede_runner.
@@ -478,7 +473,7 @@ cc_library(
478473
name = "mutation_input",
479474
hdrs = ["mutation_input.h"],
480475
copts = DISABLE_SANCOV_COPTS,
481-
visibility = EXTENDED_API_VISIBILITY,
476+
visibility = SILIFUZZ_VISIBLE,
482477
deps = [
483478
# This target must have a minimal set of dependencies since it is
484479
# used in centipede_runner.
@@ -492,7 +487,7 @@ cc_library(
492487
srcs = ["byte_array_mutator.cc"],
493488
hdrs = ["byte_array_mutator.h"],
494489
copts = DISABLE_SANCOV_COPTS,
495-
visibility = PUBLIC_API_VISIBILITY,
490+
visibility = SILIFUZZ_VISIBLE,
496491
# Avoid non-trivial dependencies here, as this library will be linked to target binaries.
497492
deps = [
498493
":execution_metadata",
@@ -513,7 +508,7 @@ cc_library(
513508
hdrs = [
514509
"coverage.h",
515510
],
516-
visibility = PUBLIC_API_VISIBILITY,
511+
visibility = SILIFUZZ_VISIBLE,
517512
deps = [
518513
":control_flow",
519514
":feature",
@@ -539,7 +534,7 @@ cc_library(
539534
hdrs = [
540535
"control_flow.h",
541536
],
542-
visibility = PUBLIC_API_VISIBILITY,
537+
visibility = SILIFUZZ_VISIBLE,
543538
deps = [
544539
":command",
545540
":pc_info",
@@ -563,7 +558,7 @@ cc_library(
563558
hdrs = [
564559
"call_graph.h",
565560
],
566-
visibility = PUBLIC_API_VISIBILITY,
561+
visibility = SILIFUZZ_VISIBLE,
567562
deps = [
568563
":control_flow",
569564
":pc_info",
@@ -611,7 +606,7 @@ cc_library(
611606
name = "command",
612607
srcs = ["command.cc"],
613608
hdrs = ["command.h"],
614-
visibility = EXTENDED_API_VISIBILITY,
609+
visibility = SILIFUZZ_VISIBLE,
615610
deps = [
616611
":stop",
617612
":util",
@@ -632,7 +627,7 @@ cc_library(
632627
hdrs = [
633628
"binary_info.h",
634629
],
635-
visibility = PUBLIC_API_VISIBILITY,
630+
visibility = SILIFUZZ_VISIBLE,
636631
deps = [
637632
":call_graph",
638633
":command",
@@ -654,7 +649,7 @@ cc_library(
654649
hdrs = [
655650
"centipede_callbacks.h",
656651
],
657-
visibility = PUBLIC_API_VISIBILITY,
652+
visibility = SILIFUZZ_VISIBLE,
658653
deps = [
659654
":binary_info",
660655
":byte_array_mutator",
@@ -710,7 +705,7 @@ cc_library(
710705
"-latomic", # for std::atomic::load()/store().
711706
],
712707
}),
713-
visibility = PUBLIC_API_VISIBILITY,
708+
visibility = SILIFUZZ_VISIBLE,
714709
deps = ["@abseil-cpp//absl/time"],
715710
)
716711

@@ -722,7 +717,7 @@ cc_library(
722717
"@com_google_fuzztest//fuzztest:disable_riegeli": ["CENTIPEDE_DISABLE_RIEGELI"],
723718
"//conditions:default": [],
724719
}),
725-
visibility = PUBLIC_API_VISIBILITY,
720+
visibility = SILIFUZZ_VISIBLE,
726721
deps = [
727722
":centipede_flags",
728723
":environment",
@@ -746,7 +741,7 @@ cc_library(
746741
hdrs = [
747742
"centipede.h",
748743
],
749-
visibility = EXTENDED_API_VISIBILITY,
744+
visibility = SILIFUZZ_VISIBLE,
750745
deps = [
751746
":binary_info",
752747
":centipede_callbacks",
@@ -789,7 +784,7 @@ cc_library(
789784
name = "centipede_interface",
790785
srcs = ["centipede_interface.cc"],
791786
hdrs = ["centipede_interface.h"],
792-
visibility = PUBLIC_API_VISIBILITY,
787+
visibility = SILIFUZZ_VISIBLE,
793788
deps = [
794789
":analyze_corpora",
795790
":binary_info",
@@ -844,7 +839,7 @@ cc_library(
844839
"@com_google_fuzztest//fuzztest:disable_riegeli": ["CENTIPEDE_DISABLE_RIEGELI"],
845840
"//conditions:default": [],
846841
}),
847-
visibility = PUBLIC_API_VISIBILITY,
842+
visibility = SILIFUZZ_VISIBLE,
848843
deps = [
849844
":centipede_flags",
850845
":feature",
@@ -897,7 +892,7 @@ cc_library(
897892
name = "centipede_default_callbacks",
898893
srcs = ["centipede_default_callbacks.cc"],
899894
hdrs = ["centipede_default_callbacks.h"],
900-
visibility = EXTENDED_API_VISIBILITY,
895+
visibility = SILIFUZZ_VISIBLE,
901896
deps = [
902897
":centipede_callbacks",
903898
":environment",
@@ -952,7 +947,7 @@ cc_library(
952947
name = "runner_fork_server",
953948
srcs = ["runner_fork_server.cc"],
954949
copts = DISABLE_SANCOV_COPTS,
955-
visibility = PUBLIC_API_VISIBILITY,
950+
visibility = SILIFUZZ_VISIBLE,
956951
deps = ["@abseil-cpp//absl/base:nullability"],
957952
alwayslink = 1, # Otherwise the linker drops the fork server.
958953
)
@@ -969,7 +964,7 @@ cc_library(
969964
name = "runner_flags",
970965
srcs = ["runner_flags.cc"],
971966
hdrs = ["runner_flags.h"],
972-
visibility = PUBLIC_API_VISIBILITY,
967+
visibility = SILIFUZZ_VISIBLE,
973968
# This has no dependency and only uses string, pair and vector.
974969
)
975970

@@ -1130,7 +1125,7 @@ cc_library(
11301125
name = "seed_corpus_maker_lib",
11311126
srcs = ["seed_corpus_maker_lib.cc"],
11321127
hdrs = ["seed_corpus_maker_lib.h"],
1133-
visibility = EXTENDED_API_VISIBILITY,
1128+
visibility = SILIFUZZ_VISIBLE,
11341129
deps = [
11351130
":corpus_io",
11361131
":feature",
@@ -1233,7 +1228,7 @@ cc_library(
12331228
name = "workdir",
12341229
srcs = ["workdir.cc"],
12351230
hdrs = ["workdir.h"],
1236-
visibility = PUBLIC_API_VISIBILITY,
1231+
visibility = SILIFUZZ_VISIBLE,
12371232
deps = [
12381233
":environment",
12391234
"@abseil-cpp//absl/strings",

common/BUILD

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@
1414

1515
# The package contains libraries that are common to both FuzzTest and Centipede.
1616

17-
VISIBILITY = ["//visibility:public"]
17+
DEFAULT_VISIBILITY = ["//visibility:public"]
1818

19-
EXTENDED_API_VISIBILITY = VISIBILITY
20-
21-
PUBLIC_API_VISIBILITY = VISIBILITY
22-
23-
package(default_visibility = VISIBILITY)
19+
package(default_visibility = DEFAULT_VISIBILITY)
2420

2521
licenses(["notice"])
2622

@@ -55,7 +51,7 @@ cc_library(
5551
"@com_google_fuzztest//fuzztest:disable_riegeli": ["CENTIPEDE_DISABLE_RIEGELI"],
5652
"//conditions:default": [],
5753
}),
58-
visibility = PUBLIC_API_VISIBILITY,
54+
visibility = SILIFUZZ_VISIBLE,
5955
deps = [
6056
":defs",
6157
":hash",
@@ -85,15 +81,15 @@ cc_library(
8581
cc_library(
8682
name = "defs",
8783
hdrs = ["defs.h"],
88-
visibility = PUBLIC_API_VISIBILITY,
84+
visibility = SILIFUZZ_VISIBLE,
8985
deps = ["@abseil-cpp//absl/types:span"],
9086
)
9187

9288
cc_library(
9389
name = "hash",
9490
srcs = ["hash.cc"],
9591
hdrs = ["hash.h"],
96-
visibility = EXTENDED_API_VISIBILITY,
92+
visibility = SILIFUZZ_VISIBLE,
9793
deps = [
9894
":defs",
9995
":sha1",

0 commit comments

Comments
 (0)