diff --git a/api/BUILD.gn b/api/BUILD.gn index 547d79d258..47a841d400 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -71,8 +71,8 @@ rtc_library("rtp_headers") { "..:webrtc_common", "units:timestamp", "video:video_rtp_headers", - "//third_party/abseil-cpp/absl/types:optional", ] + absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] } rtc_library("rtp_packet_info") { diff --git a/webrtc.gni b/webrtc.gni index 3708345685..d222bc7ec9 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -323,16 +323,19 @@ set_defaults("rtc_test") { set_defaults("rtc_library") { configs = rtc_add_configs suppressed_configs = [] + absl_deps = [] } set_defaults("rtc_source_set") { configs = rtc_add_configs suppressed_configs = [] + absl_deps = [] } set_defaults("rtc_static_library") { configs = rtc_add_configs suppressed_configs = [] + absl_deps = [] } set_defaults("rtc_executable") { @@ -525,6 +528,20 @@ template("rtc_source_set") { if (defined(invoker.public_configs)) { 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 + # otherwise it just needs to be added to deps. + if (absl_deps != []) { + if (is_component_build && build_with_chromium) { + # TODO(crbug.com/1046390): Enable when the Abseil component will be + # available. + # deps += [ "//third_party/abseil-cpp:absl" ] + deps += absl_deps # Remove when the line above is enabled. + } else { + deps += absl_deps + } + } } } @@ -600,6 +617,20 @@ template("rtc_static_library") { if (defined(invoker.public_configs)) { 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 + # otherwise it just needs to be added to deps. + if (absl_deps != []) { + if (is_component_build && build_with_chromium) { + # TODO(crbug.com/1046390): Enable when the Abseil component will be + # available. + # deps += [ "//third_party/abseil-cpp:absl" ] + deps += absl_deps # Remove when the line above is enabled. + } else { + deps += absl_deps + } + } } } @@ -712,6 +743,20 @@ template("rtc_library") { if (defined(invoker.public_configs)) { 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 + # otherwise it just needs to be added to deps. + if (absl_deps != []) { + if (is_component_build && build_with_chromium) { + # TODO(crbug.com/1046390): Enable when the Abseil component will be + # available. + # deps += [ "//third_party/abseil-cpp:absl" ] + deps += absl_deps # Remove when the line above is enabled. + } else { + deps += absl_deps + } + } } } @@ -1002,7 +1047,7 @@ if (is_android) { } no_build_hooks = true - not_needed(["android_manifest"]) + not_needed([ "android_manifest" ]) } }