0009.patch (2770B)
1 From: Michael Froman <mfroman@mozilla.com> 2 Date: Tue, 7 Jan 2025 15:30:00 -0600 3 Subject: Bug 1935474 - BUILD.gn changes to allow building all of 4 absl_component_deps. r?ng! 5 6 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9cf7afd94407318bb1c39b801d3523db532232e1 7 --- 8 abseil-cpp/BUILD.gn | 31 ++++++++++-------------- 9 abseil-cpp/absl/random/internal/BUILD.gn | 5 ++++ 10 2 files changed, 18 insertions(+), 18 deletions(-) 11 12 diff --git a/abseil-cpp/BUILD.gn b/abseil-cpp/BUILD.gn 13 index 49b4cb7f92b..1949a635ca1 100644 14 --- a/abseil-cpp/BUILD.gn 15 +++ b/abseil-cpp/BUILD.gn 16 @@ -56,7 +56,6 @@ component("absl") { 17 } 18 19 group("absl_component_deps") { 20 - if (false) { 21 public_deps = [ 22 "//third_party/abseil-cpp/absl/algorithm", 23 "//third_party/abseil-cpp/absl/algorithm:container", 24 @@ -126,23 +125,6 @@ group("absl_component_deps") { 25 # absl internal utilities used by protobuf. 26 "//third_party/abseil-cpp/absl/container:layout", 27 ] 28 - } else { 29 - public_deps = [ 30 - "//abseil-cpp/absl/algorithm:container", 31 - "//abseil-cpp/absl/base:nullability", 32 - "//abseil-cpp/absl/cleanup", 33 - "//abseil-cpp/absl/container:inlined_vector", 34 - "//abseil-cpp/absl/functional:any_invocable", 35 - "//abseil-cpp/absl/functional:bind_front", 36 - "//abseil-cpp/absl/strings", 37 - "//abseil-cpp/absl/strings:str_format", 38 - "//abseil-cpp/absl/strings:string_view", 39 - "//abseil-cpp/absl/types:optional", 40 - "//abseil-cpp/absl/types:span", 41 - "//abseil-cpp/absl/types:variant", 42 - "//abseil-cpp/absl/utility", 43 - ] 44 - } 45 46 if (is_component_build) { 47 public_deps += [ ":absl_full_deps" ] 48 @@ -156,6 +138,19 @@ group("absl_component_deps") { 49 } 50 51 visibility = [ ":absl" ] 52 + 53 + if (moz_webrtc_build) { 54 + # rewrite deps for our new abseil-cpp location 55 + if (defined(public_deps)) { 56 + modified_deps = [] 57 + foreach (dep, public_deps) { 58 + newdep = string_replace(dep, "//third_party/abseil-cpp/", "//") 59 + modified_deps += [ newdep ] 60 + } 61 + public_deps = [] 62 + public_deps = modified_deps 63 + } 64 + } 65 } 66 67 # Some third-party libraries use additional parts of absl that are banned in 68 diff --git a/abseil-cpp/absl/random/internal/BUILD.gn b/abseil-cpp/absl/random/internal/BUILD.gn 69 index 2aef8a1aa9d..08caf30bf0b 100644 70 --- a/abseil-cpp/absl/random/internal/BUILD.gn 71 +++ b/abseil-cpp/absl/random/internal/BUILD.gn 72 @@ -186,6 +186,11 @@ absl_source_set("platform") { 73 "//third_party/abseil-cpp/absl/base:config", 74 ] 75 visibility = [ "//third_party/abseil-cpp/absl/random/*" ] 76 + 77 + if (moz_webrtc_build) { 78 + # We don't really want to run Google's scripting to generate build flags 79 + deps -= [ "//build:chromeos_buildflags" ] 80 + } 81 } 82 83 absl_source_set("randen") {