diff --git a/centipede/BUILD b/centipede/BUILD index acc839027..1385de310 100644 --- a/centipede/BUILD +++ b/centipede/BUILD @@ -101,6 +101,7 @@ proto_library( cc_proto_library( name = "seed_corpus_config_cc_proto", + visibility = EXTENDED_API_VISIBILITY, deps = [":seed_corpus_config_proto"], ) @@ -1075,6 +1076,7 @@ cc_library( name = "seed_corpus_maker_lib", srcs = ["seed_corpus_maker_lib.cc"], hdrs = ["seed_corpus_maker_lib.h"], + visibility = EXTENDED_API_VISIBILITY, deps = [ ":corpus_io", ":feature", diff --git a/centipede/seed_corpus_maker_lib.cc b/centipede/seed_corpus_maker_lib.cc index b43d7e94c..9648b87f5 100644 --- a/centipede/seed_corpus_maker_lib.cc +++ b/centipede/seed_corpus_maker_lib.cc @@ -487,7 +487,15 @@ void GenerateSeedCorpusFromConfig( // LOG(WARNING) << "Config is empty: skipping seed corpus generation"; return; } + GenerateSeedCorpusFromConfig( // + config, coverage_binary_name, coverage_binary_hash, override_out_dir); +} +void GenerateSeedCorpusFromConfig( // + const SeedCorpusConfig& config, // + std::string_view coverage_binary_name, // + std::string_view coverage_binary_hash, // + std::string_view override_out_dir) { // Pre-create the destination dir early to catch possible misspellings etc. if (!RemotePathExists(config.destination().dir_path())) { RemoteMkdir(config.destination().dir_path()); diff --git a/centipede/seed_corpus_maker_lib.h b/centipede/seed_corpus_maker_lib.h index d238bc30b..e5ae87b5a 100644 --- a/centipede/seed_corpus_maker_lib.h +++ b/centipede/seed_corpus_maker_lib.h @@ -93,6 +93,13 @@ void GenerateSeedCorpusFromConfig( // std::string_view coverage_binary_hash, // std::string_view override_out_dir = ""); +// Same as above but accepts a `SeedCorpusConfig` directly. +void GenerateSeedCorpusFromConfig( // + const SeedCorpusConfig& config, // + std::string_view coverage_binary_name, // + std::string_view coverage_binary_hash, // + std::string_view override_out_dir = ""); + } // namespace centipede #endif // THIRD_PARTY_CENTIPEDE_SEED_CORPUS_MAKER_LIB_H_