mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Add absl_deps to webrtc_fuzzer_test.
Bug: chromium:1046390 Change-Id: I531511dce156a10174c9ed80ccb2d5cd75ec33b0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177900 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31553}
This commit is contained in:
parent
09f635e587
commit
96115cfcdd
3 changed files with 30 additions and 12 deletions
|
@ -352,7 +352,8 @@ def CheckAbseilDependencies(input_api, gn_files, output_api):
|
|||
target_types_to_check = [
|
||||
'rtc_library',
|
||||
'rtc_source_set',
|
||||
'rtc_static_library'
|
||||
'rtc_static_library',
|
||||
'webrtc_fuzzer_test',
|
||||
]
|
||||
error_msg = ('Abseil dependencies in target "%s" (file: %s) '
|
||||
'should be moved to the "absl_deps" parameter.')
|
||||
|
|
|
@ -40,6 +40,10 @@ rtc_library("fuzz_data_helper") {
|
|||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
}
|
||||
|
||||
set_defaults("webrtc_fuzzer_test") {
|
||||
absl_deps = []
|
||||
}
|
||||
|
||||
template("webrtc_fuzzer_test") {
|
||||
fuzzer_test(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
|
@ -47,6 +51,21 @@ template("webrtc_fuzzer_test") {
|
|||
":fuzz_data_helper",
|
||||
":webrtc_fuzzer_main",
|
||||
]
|
||||
|
||||
# If absl_deps is [], no action is needed. If not [], then it needs to be
|
||||
# converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
||||
# otherwise it just needs to be added to deps.
|
||||
if (absl_deps != []) {
|
||||
if (!defined(deps)) {
|
||||
deps = []
|
||||
}
|
||||
if (build_with_chromium) {
|
||||
deps += [ "//third_party/abseil-cpp:absl" ]
|
||||
} else {
|
||||
deps += absl_deps
|
||||
}
|
||||
}
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
suppressed_configs = [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
|
@ -194,10 +213,8 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") {
|
|||
|
||||
webrtc_fuzzer_test("rtp_packet_fuzzer") {
|
||||
sources = [ "rtp_packet_fuzzer.cc" ]
|
||||
deps = [
|
||||
"../../modules/rtp_rtcp:rtp_rtcp_format",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
deps = [ "../../modules/rtp_rtcp:rtp_rtcp_format" ]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
seed_corpus = "corpora/rtp-corpus"
|
||||
}
|
||||
|
||||
|
@ -461,8 +478,8 @@ webrtc_fuzzer_test("audio_processing_fuzzer") {
|
|||
"../../rtc_base:rtc_task_queue",
|
||||
"../../rtc_base:safe_minmax",
|
||||
"../../system_wrappers:field_trial",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
|
||||
seed_corpus = "corpora/audio_processing-corpus"
|
||||
}
|
||||
|
||||
|
|
12
webrtc.gni
12
webrtc.gni
|
@ -532,8 +532,8 @@ template("rtc_source_set") {
|
|||
public_configs += invoker.public_configs
|
||||
}
|
||||
|
||||
# If absl_deps if [], no action is needed. If not [], then if needs to be
|
||||
# converted to //third_party/abseil-cpp:absl if is_component_build=true
|
||||
# If absl_deps is [], no action is needed. If not [], then it needs to be
|
||||
# converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
||||
# otherwise it just needs to be added to deps.
|
||||
if (absl_deps != []) {
|
||||
if (!defined(deps)) {
|
||||
|
@ -621,8 +621,8 @@ template("rtc_static_library") {
|
|||
public_configs += invoker.public_configs
|
||||
}
|
||||
|
||||
# If absl_deps if [], no action is needed. If not [], then if needs to be
|
||||
# converted to //third_party/abseil-cpp:absl if is_component_build=true
|
||||
# If absl_deps is [], no action is needed. If not [], then it needs to be
|
||||
# converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
||||
# otherwise it just needs to be added to deps.
|
||||
if (absl_deps != []) {
|
||||
if (!defined(deps)) {
|
||||
|
@ -747,8 +747,8 @@ template("rtc_library") {
|
|||
public_configs += invoker.public_configs
|
||||
}
|
||||
|
||||
# If absl_deps if [], no action is needed. If not [], then if needs to be
|
||||
# converted to //third_party/abseil-cpp:absl if is_component_build=true
|
||||
# If absl_deps is [], no action is needed. If not [], then it needs to be
|
||||
# converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
||||
# otherwise it just needs to be added to deps.
|
||||
if (absl_deps != []) {
|
||||
if (!defined(deps)) {
|
||||
|
|
Loading…
Reference in a new issue