Merge "Moved Cronet code under Connectivity"
diff --git a/Tethering/Android.bp b/Tethering/Android.bp
index 3ab1ec2..f203191 100644
--- a/Tethering/Android.bp
+++ b/Tethering/Android.bp
@@ -21,11 +21,15 @@
java_defaults {
name: "TetheringApiLevel",
sdk_version: "module_current",
- target_sdk_version: "33",
min_sdk_version: "30",
}
java_defaults {
+ name: "TetheringReleaseTargetSdk",
+ target_sdk_version: "33",
+}
+
+java_defaults {
name: "TetheringExternalLibs",
// Libraries not including Tethering's own framework-tethering (different flavors of that one
// are needed depending on the build rule)
@@ -81,7 +85,8 @@
defaults: [
"ConnectivityNextEnableDefaults",
"TetheringAndroidLibraryDefaults",
- "TetheringApiLevel"
+ "TetheringApiLevel",
+ "TetheringReleaseTargetSdk"
],
static_libs: [
"NetworkStackApiCurrentShims",
@@ -94,7 +99,8 @@
name: "TetheringApiStableLib",
defaults: [
"TetheringAndroidLibraryDefaults",
- "TetheringApiLevel"
+ "TetheringApiLevel",
+ "TetheringReleaseTargetSdk"
],
static_libs: [
"NetworkStackApiStableShims",
@@ -180,7 +186,12 @@
// Non-updatable tethering running in the system server process for devices not using the module
android_app {
name: "InProcessTethering",
- defaults: ["TetheringAppDefaults", "TetheringApiLevel", "ConnectivityNextEnableDefaults"],
+ defaults: [
+ "TetheringAppDefaults",
+ "TetheringApiLevel",
+ "ConnectivityNextEnableDefaults",
+ "TetheringReleaseTargetSdk"
+ ],
static_libs: ["TetheringApiCurrentLib"],
certificate: "platform",
manifest: "AndroidManifest_InProcess.xml",
diff --git a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
index ebc9d26..6a5089d 100644
--- a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
+++ b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
@@ -403,6 +403,18 @@
return null;
}
}
+
+ /** Get error BPF map. */
+ @Nullable public IBpfMap<S32, S32> getBpfErrorMap() {
+ if (!isAtLeastS()) return null;
+ try {
+ return new BpfMap<>(TETHER_ERROR_MAP_PATH,
+ BpfMap.BPF_F_RDONLY, S32.class, S32.class);
+ } catch (ErrnoException e) {
+ Log.e(TAG, "Cannot create error map: " + e);
+ return null;
+ }
+ }
}
@VisibleForTesting
@@ -1287,13 +1299,15 @@
}
private void dumpCounters(@NonNull IndentingPrintWriter pw) {
- if (!mDeps.isAtLeastS()) {
- pw.println("No counter support");
- return;
- }
- try (IBpfMap<S32, S32> map = new BpfMap<>(TETHER_ERROR_MAP_PATH, BpfMap.BPF_F_RDONLY,
- S32.class, S32.class)) {
-
+ try (IBpfMap<S32, S32> map = mDeps.getBpfErrorMap()) {
+ if (map == null) {
+ pw.println("No error counter support");
+ return;
+ }
+ if (map.isEmpty()) {
+ pw.println("<empty>");
+ return;
+ }
map.forEach((k, v) -> {
String counterName;
try {
@@ -1307,7 +1321,7 @@
if (v.val > 0) pw.println(String.format("%s: %d", counterName, v.val));
});
} catch (ErrnoException | IOException e) {
- pw.println("Error dumping counter map: " + e);
+ pw.println("Error dumping error counter map: " + e);
}
}
diff --git a/Tethering/tests/unit/src/android/net/ip/IpServerTest.java b/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
index 5f4454b..f0d9057 100644
--- a/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
+++ b/Tethering/tests/unit/src/android/net/ip/IpServerTest.java
@@ -53,6 +53,7 @@
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
@@ -99,6 +100,7 @@
import com.android.net.module.util.InterfaceParams;
import com.android.net.module.util.NetworkStackConstants;
import com.android.net.module.util.SharedLog;
+import com.android.net.module.util.Struct.S32;
import com.android.net.module.util.bpf.Tether4Key;
import com.android.net.module.util.bpf.Tether4Value;
import com.android.net.module.util.bpf.TetherStatsKey;
@@ -108,6 +110,7 @@
import com.android.net.module.util.ip.IpNeighborMonitor.NeighborEvent;
import com.android.net.module.util.ip.IpNeighborMonitor.NeighborEventConsumer;
import com.android.networkstack.tethering.BpfCoordinator;
+import com.android.networkstack.tethering.BpfCoordinator.ClientInfo;
import com.android.networkstack.tethering.BpfCoordinator.Ipv6ForwardingRule;
import com.android.networkstack.tethering.PrivateAddressCoordinator;
import com.android.networkstack.tethering.Tether6Value;
@@ -197,6 +200,7 @@
@Mock private BpfMap<TetherStatsKey, TetherStatsValue> mBpfStatsMap;
@Mock private BpfMap<TetherLimitKey, TetherLimitValue> mBpfLimitMap;
@Mock private BpfMap<TetherDevKey, TetherDevValue> mBpfDevMap;
+ @Mock private BpfMap<S32, S32> mBpfErrorMap;
@Captor private ArgumentCaptor<DhcpServingParamsParcel> mDhcpParamsCaptor;
@@ -360,6 +364,11 @@
public BpfMap<TetherDevKey, TetherDevValue> getBpfDevMap() {
return mBpfDevMap;
}
+
+ @Nullable
+ public BpfMap<S32, S32> getBpfErrorMap() {
+ return mBpfErrorMap;
+ }
};
mBpfCoordinator = spy(new BpfCoordinator(mBpfDeps));
@@ -1520,4 +1529,56 @@
verify(mBpfCoordinator, never()).tetherOffloadRuleAdd(
mIpServer, makeForwardingRule(IPSEC_IFINDEX, neigh, mac));
}
+
+ // TODO: move to BpfCoordinatorTest once IpNeighborMonitor is migrated to BpfCoordinator.
+ @Test
+ public void addRemoveTetherClient() throws Exception {
+ initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE, false /* usingLegacyDhcp */,
+ DEFAULT_USING_BPF_OFFLOAD);
+
+ final int myIfindex = TEST_IFACE_PARAMS.index;
+ final int notMyIfindex = myIfindex - 1;
+
+ final InetAddress neighA = InetAddresses.parseNumericAddress("192.168.80.1");
+ final InetAddress neighB = InetAddresses.parseNumericAddress("192.168.80.2");
+ final InetAddress neighLL = InetAddresses.parseNumericAddress("169.254.0.1");
+ final InetAddress neighMC = InetAddresses.parseNumericAddress("224.0.0.1");
+ final MacAddress macNull = MacAddress.fromString("00:00:00:00:00:00");
+ final MacAddress macA = MacAddress.fromString("00:00:00:00:00:0a");
+ final MacAddress macB = MacAddress.fromString("11:22:33:00:00:0b");
+
+ // Events on other interfaces are ignored.
+ recvNewNeigh(notMyIfindex, neighA, NUD_REACHABLE, macA);
+ verifyNoMoreInteractions(mBpfCoordinator);
+
+ // Events on this interface are received and sent to BpfCoordinator.
+ recvNewNeigh(myIfindex, neighA, NUD_REACHABLE, macA);
+ verify(mBpfCoordinator).tetherOffloadClientAdd(mIpServer, new ClientInfo(myIfindex,
+ TEST_IFACE_PARAMS.macAddr, (Inet4Address) neighA, macA));
+ clearInvocations(mBpfCoordinator);
+
+ recvNewNeigh(myIfindex, neighB, NUD_REACHABLE, macB);
+ verify(mBpfCoordinator).tetherOffloadClientAdd(mIpServer, new ClientInfo(myIfindex,
+ TEST_IFACE_PARAMS.macAddr, (Inet4Address) neighB, macB));
+ clearInvocations(mBpfCoordinator);
+
+ // Link-local and multicast neighbors are ignored.
+ recvNewNeigh(myIfindex, neighLL, NUD_REACHABLE, macA);
+ verifyNoMoreInteractions(mBpfCoordinator);
+ recvNewNeigh(myIfindex, neighMC, NUD_REACHABLE, macA);
+ verifyNoMoreInteractions(mBpfCoordinator);
+ clearInvocations(mBpfCoordinator);
+
+ // A neighbor that is no longer valid causes the client to be removed.
+ // NUD_FAILED events do not have a MAC address.
+ recvNewNeigh(myIfindex, neighA, NUD_FAILED, null);
+ verify(mBpfCoordinator).tetherOffloadClientRemove(mIpServer, new ClientInfo(myIfindex,
+ TEST_IFACE_PARAMS.macAddr, (Inet4Address) neighA, macNull));
+ clearInvocations(mBpfCoordinator);
+
+ // A neighbor that is deleted causes the client to be removed.
+ recvDelNeigh(myIfindex, neighB, NUD_STALE, macB);
+ verify(mBpfCoordinator).tetherOffloadClientRemove(mIpServer, new ClientInfo(myIfindex,
+ TEST_IFACE_PARAMS.macAddr, (Inet4Address) neighB, macNull));
+ }
}
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
index bbca565..0bd6380 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
@@ -94,11 +94,13 @@
import androidx.test.runner.AndroidJUnit4;
import com.android.dx.mockito.inline.extended.ExtendedMockito;
+import com.android.internal.util.IndentingPrintWriter;
import com.android.net.module.util.CollectionUtils;
import com.android.net.module.util.IBpfMap;
import com.android.net.module.util.InterfaceParams;
import com.android.net.module.util.NetworkStackConstants;
import com.android.net.module.util.SharedLog;
+import com.android.net.module.util.Struct.S32;
import com.android.net.module.util.bpf.Tether4Key;
import com.android.net.module.util.bpf.Tether4Value;
import com.android.net.module.util.bpf.TetherStatsKey;
@@ -128,6 +130,7 @@
import org.mockito.MockitoAnnotations;
import org.mockito.MockitoSession;
+import java.io.StringWriter;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
@@ -362,9 +365,6 @@
@Mock private IpServer mIpServer2;
@Mock private TetheringConfiguration mTetherConfig;
@Mock private ConntrackMonitor mConntrackMonitor;
- @Mock private IBpfMap<TetherDownstream6Key, Tether6Value> mBpfDownstream6Map;
- @Mock private IBpfMap<TetherUpstream6Key, Tether6Value> mBpfUpstream6Map;
- @Mock private IBpfMap<TetherDevKey, TetherDevValue> mBpfDevMap;
// Late init since methods must be called by the thread that created this object.
private TestableNetworkStatsProviderCbBinder mTetherStatsProviderCb;
@@ -383,10 +383,18 @@
spy(new TestBpfMap<>(Tether4Key.class, Tether4Value.class));
private final IBpfMap<Tether4Key, Tether4Value> mBpfUpstream4Map =
spy(new TestBpfMap<>(Tether4Key.class, Tether4Value.class));
+ private final IBpfMap<TetherDownstream6Key, Tether6Value> mBpfDownstream6Map =
+ spy(new TestBpfMap<>(TetherDownstream6Key.class, Tether6Value.class));
+ private final IBpfMap<TetherUpstream6Key, Tether6Value> mBpfUpstream6Map =
+ spy(new TestBpfMap<>(TetherUpstream6Key.class, Tether6Value.class));
private final IBpfMap<TetherStatsKey, TetherStatsValue> mBpfStatsMap =
spy(new TestBpfMap<>(TetherStatsKey.class, TetherStatsValue.class));
private final IBpfMap<TetherLimitKey, TetherLimitValue> mBpfLimitMap =
spy(new TestBpfMap<>(TetherLimitKey.class, TetherLimitValue.class));
+ private final IBpfMap<TetherDevKey, TetherDevValue> mBpfDevMap =
+ spy(new TestBpfMap<>(TetherDevKey.class, TetherDevValue.class));
+ private final IBpfMap<S32, S32> mBpfErrorMap =
+ spy(new TestBpfMap<>(S32.class, S32.class));
private BpfCoordinator.Dependencies mDeps =
spy(new BpfCoordinator.Dependencies() {
@NonNull
@@ -457,6 +465,11 @@
public IBpfMap<TetherDevKey, TetherDevValue> getBpfDevMap() {
return mBpfDevMap;
}
+
+ @Nullable
+ public IBpfMap<S32, S32> getBpfErrorMap() {
+ return mBpfErrorMap;
+ }
});
@Before public void setUp() {
@@ -2099,4 +2112,88 @@
assertEquals("upstreamIfindex: 1001, downstreamIfindex: 1003, address: 2001:db8::1, "
+ "srcMac: 12:34:56:78:90:ab, dstMac: 00:00:00:00:00:0a", rule.toString());
}
+
+ private void verifyDump(@NonNull final BpfCoordinator coordinator) {
+ final StringWriter stringWriter = new StringWriter();
+ final IndentingPrintWriter ipw = new IndentingPrintWriter(stringWriter, " ");
+ coordinator.dump(ipw);
+ assertFalse(stringWriter.toString().isEmpty());
+ }
+
+ @Test
+ public void testDumpDoesNotCrash() throws Exception {
+ // This dump test only used to for improving mainline module test coverage and doesn't
+ // really do any meaningful tests.
+ // TODO: consider verifying the dump content and separate tests into testDumpXXX().
+ final BpfCoordinator coordinator = makeBpfCoordinator();
+
+ // [1] Dump mostly empty content.
+ verifyDump(coordinator);
+
+ // [2] Dump mostly non-empty content.
+ // Test the following dump function and fill the corresponding content to execute
+ // code as more as possible for test coverage.
+ // - dumpBpfForwardingRulesIpv4
+ // * mBpfDownstream4Map
+ // * mBpfUpstream4Map
+ // - dumpBpfForwardingRulesIpv6
+ // * mBpfDownstream6Map
+ // * mBpfUpstream6Map
+ // - dumpStats
+ // * mBpfStatsMap
+ // - dumpDevmap
+ // * mBpfDevMap
+ // - dumpCounters
+ // * mBpfErrorMap
+ // - dumpIpv6ForwardingRulesByDownstream
+ // * mIpv6ForwardingRules
+
+ // dumpBpfForwardingRulesIpv4
+ mBpfDownstream4Map.insertEntry(
+ new TestDownstream4Key.Builder().build(),
+ new TestDownstream4Value.Builder().build());
+ mBpfUpstream4Map.insertEntry(
+ new TestUpstream4Key.Builder().build(),
+ new TestUpstream4Value.Builder().build());
+
+ // dumpBpfForwardingRulesIpv6
+ final Ipv6ForwardingRule rule = buildTestForwardingRule(UPSTREAM_IFINDEX, NEIGH_A, MAC_A);
+ mBpfDownstream6Map.insertEntry(rule.makeTetherDownstream6Key(), rule.makeTether6Value());
+
+ final TetherUpstream6Key upstream6Key = new TetherUpstream6Key(DOWNSTREAM_IFINDEX,
+ DOWNSTREAM_MAC);
+ final Tether6Value upstream6Value = new Tether6Value(UPSTREAM_IFINDEX,
+ MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS,
+ ETH_P_IPV6, NetworkStackConstants.ETHER_MTU);
+ mBpfUpstream6Map.insertEntry(upstream6Key, upstream6Value);
+
+ // dumpStats
+ mBpfStatsMap.insertEntry(
+ new TetherStatsKey(UPSTREAM_IFINDEX),
+ new TetherStatsValue(
+ 0L /* rxPackets */, 0L /* rxBytes */, 0L /* rxErrors */,
+ 0L /* txPackets */, 0L /* txBytes */, 0L /* txErrors */));
+
+ // dumpDevmap
+ coordinator.addUpstreamNameToLookupTable(UPSTREAM_IFINDEX, UPSTREAM_IFACE);
+ mBpfDevMap.insertEntry(
+ new TetherDevKey(UPSTREAM_IFINDEX),
+ new TetherDevValue(UPSTREAM_IFINDEX));
+
+ // dumpCounters
+ // The error code is defined in packages/modules/Connectivity/bpf_progs/bpf_tethering.h.
+ mBpfErrorMap.insertEntry(
+ new S32(0 /* INVALID_IPV4_VERSION */),
+ new S32(1000 /* count */));
+
+ // dumpIpv6ForwardingRulesByDownstream
+ final HashMap<IpServer, LinkedHashMap<Inet6Address, Ipv6ForwardingRule>>
+ ipv6ForwardingRules = coordinator.getForwardingRulesForTesting();
+ final LinkedHashMap<Inet6Address, Ipv6ForwardingRule> addressRuleMap =
+ new LinkedHashMap<>();
+ addressRuleMap.put(rule.address, rule);
+ ipv6ForwardingRules.put(mIpServer, addressRuleMap);
+
+ verifyDump(coordinator);
+ }
}
diff --git a/bpf_progs/bpf_net_helpers.h b/bpf_progs/bpf_net_helpers.h
index e382713..c39269e 100644
--- a/bpf_progs/bpf_net_helpers.h
+++ b/bpf_progs/bpf_net_helpers.h
@@ -28,9 +28,12 @@
static int (*bpf_skb_pull_data)(struct __sk_buff* skb, __u32 len) = (void*)BPF_FUNC_skb_pull_data;
-static int (*bpf_skb_load_bytes)(struct __sk_buff* skb, int off, void* to,
+static int (*bpf_skb_load_bytes)(const struct __sk_buff* skb, int off, void* to,
int len) = (void*)BPF_FUNC_skb_load_bytes;
+static int (*bpf_skb_load_bytes_relative)(const struct __sk_buff* skb, int off, void* to, int len,
+ int start_hdr) = (void*)BPF_FUNC_skb_load_bytes_relative;
+
static int (*bpf_skb_store_bytes)(struct __sk_buff* skb, __u32 offset, const void* from, __u32 len,
__u64 flags) = (void*)BPF_FUNC_skb_store_bytes;
diff --git a/bpf_progs/netd.c b/bpf_progs/netd.c
index 10559dd..f9484fc 100644
--- a/bpf_progs/netd.c
+++ b/bpf_progs/netd.c
@@ -47,9 +47,16 @@
#define IP_PROTO_OFF offsetof(struct iphdr, protocol)
#define IPV6_PROTO_OFF offsetof(struct ipv6hdr, nexthdr)
+
+// offsetof(struct iphdr, ihl) -- but that's a bitfield
#define IPPROTO_IHL_OFF 0
-#define TCP_FLAG_OFF 13
-#define RST_OFFSET 2
+
+// This is offsetof(struct tcphdr, "32 bit tcp flag field")
+// The tcp flags are after be16 source, dest & be32 seq, ack_seq, hence 12 bytes in.
+//
+// Note that TCP_FLAG_{ACK,PSH,RST,SYN,FIN} are htonl(0x00{10,08,04,02,01}0000)
+// see include/uapi/linux/tcp.h
+#define TCP_FLAG32_OFF 12
// For maps netd does not need to access
#define DEFINE_BPF_MAP_NO_NETD(the_map, TYPE, TypeOfKey, TypeOfValue, num_entries) \
@@ -97,9 +104,15 @@
// programs that need to be usable by netd, but not by netutils_wrappers
// (this is because these are currently attached by the mainline provided libnetd_updatable .so
// which is loaded into netd and thus runs as netd uid/gid/selinux context)
-#define DEFINE_NETD_BPF_PROG(SECTION_NAME, prog_uid, prog_gid, the_prog) \
+#define DEFINE_NETD_BPF_PROG_KVER_RANGE(SECTION_NAME, prog_uid, prog_gid, the_prog, minKV, maxKV) \
DEFINE_BPF_PROG_EXT(SECTION_NAME, prog_uid, prog_gid, the_prog, \
- KVER_NONE, KVER_INF, false, "fs_bpf_netd_readonly", "")
+ minKV, maxKV, false, "fs_bpf_netd_readonly", "")
+
+#define DEFINE_NETD_BPF_PROG_KVER(SECTION_NAME, prog_uid, prog_gid, the_prog, min_kv) \
+ DEFINE_NETD_BPF_PROG_KVER_RANGE(SECTION_NAME, prog_uid, prog_gid, the_prog, min_kv, KVER_INF)
+
+#define DEFINE_NETD_BPF_PROG(SECTION_NAME, prog_uid, prog_gid, the_prog) \
+ DEFINE_NETD_BPF_PROG_KVER(SECTION_NAME, prog_uid, prog_gid, the_prog, KVER_NONE)
// programs that only need to be usable by the system server
#define DEFINE_SYS_BPF_PROG(SECTION_NAME, prog_uid, prog_gid, the_prog) \
@@ -176,46 +189,49 @@
DEFINE_UPDATE_STATS(stats_map_A, StatsKey)
DEFINE_UPDATE_STATS(stats_map_B, StatsKey)
-static inline bool skip_owner_match(struct __sk_buff* skb) {
- int offset = -1;
- int ret = 0;
+// both of these return 0 on success or -EFAULT on failure (and zero out the buffer)
+static __always_inline inline int bpf_skb_load_bytes_net(const struct __sk_buff* skb, int off,
+ void* to, int len, bool is_4_19) {
+ return is_4_19
+ ? bpf_skb_load_bytes_relative(skb, off, to, len, BPF_HDR_START_NET)
+ : bpf_skb_load_bytes(skb, off, to, len);
+}
+
+static __always_inline inline bool skip_owner_match(struct __sk_buff* skb, bool is_4_19) {
if (skb->protocol == htons(ETH_P_IP)) {
- offset = IP_PROTO_OFF;
- uint8_t proto, ihl;
- uint8_t flag;
- ret = bpf_skb_load_bytes(skb, offset, &proto, 1);
- if (!ret) {
- if (proto == IPPROTO_ESP) {
- return true;
- } else if (proto == IPPROTO_TCP) {
- ret = bpf_skb_load_bytes(skb, IPPROTO_IHL_OFF, &ihl, 1);
- ihl = ihl & 0x0F;
- ret = bpf_skb_load_bytes(skb, ihl * 4 + TCP_FLAG_OFF, &flag, 1);
- if (ret == 0 && (flag >> RST_OFFSET & 1)) {
- return true;
- }
- }
- }
- } else if (skb->protocol == htons(ETH_P_IPV6)) {
- offset = IPV6_PROTO_OFF;
uint8_t proto;
- ret = bpf_skb_load_bytes(skb, offset, &proto, 1);
- if (!ret) {
- if (proto == IPPROTO_ESP) {
- return true;
- } else if (proto == IPPROTO_TCP) {
- uint8_t flag;
- ret = bpf_skb_load_bytes(skb, sizeof(struct ipv6hdr) + TCP_FLAG_OFF, &flag, 1);
- if (ret == 0 && (flag >> RST_OFFSET & 1)) {
- return true;
- }
- }
- }
+ // no need to check for success, proto will be zeroed if bpf_skb_load_bytes_net() fails
+ (void)bpf_skb_load_bytes_net(skb, IP_PROTO_OFF, &proto, sizeof(proto), is_4_19);
+ if (proto == IPPROTO_ESP) return true;
+ if (proto != IPPROTO_TCP) return false; // handles read failure above
+ uint8_t ihl;
+ // we don't check for success, as this cannot fail, as it is earlier in the packet than
+ // proto, the reading of which must have succeeded, additionally the next read
+ // (a little bit deeper in the packet in spite of ihl being zeroed) of the tcp flags
+ // field will also fail, and that failure we already handle correctly
+ // (we also don't check that ihl in [0x45,0x4F] nor that ipv4 header checksum is correct)
+ (void)bpf_skb_load_bytes_net(skb, IPPROTO_IHL_OFF, &ihl, sizeof(ihl), is_4_19);
+ uint32_t flag;
+ // if the read below fails, we'll just assume no TCP flags are set, which is fine.
+ (void)bpf_skb_load_bytes_net(skb, (ihl & 0xF) * 4 + TCP_FLAG32_OFF,
+ &flag, sizeof(flag), is_4_19);
+ return flag & TCP_FLAG_RST; // false on read failure
+ } else if (skb->protocol == htons(ETH_P_IPV6)) {
+ uint8_t proto;
+ // no need to check for success, proto will be zeroed if bpf_skb_load_bytes_net() fails
+ (void)bpf_skb_load_bytes_net(skb, IPV6_PROTO_OFF, &proto, sizeof(proto), is_4_19);
+ if (proto == IPPROTO_ESP) return true;
+ if (proto != IPPROTO_TCP) return false; // handles read failure above
+ uint32_t flag;
+ // if the read below fails, we'll just assume no TCP flags are set, which is fine.
+ (void)bpf_skb_load_bytes_net(skb, sizeof(struct ipv6hdr) + TCP_FLAG32_OFF,
+ &flag, sizeof(flag), is_4_19);
+ return flag & TCP_FLAG_RST; // false on read failure
}
return false;
}
-static __always_inline BpfConfig getConfig(uint32_t configKey) {
+static __always_inline inline BpfConfig getConfig(uint32_t configKey) {
uint32_t mapSettingKey = configKey;
BpfConfig* config = bpf_configuration_map_lookup_elem(&mapSettingKey);
if (!config) {
@@ -230,8 +246,9 @@
// DROP_IF_UNSET is set of rules that should DROP if globally enabled, and per-uid bit is NOT set
#define DROP_IF_UNSET (DOZABLE_MATCH | POWERSAVE_MATCH | RESTRICTED_MATCH | LOW_POWER_STANDBY_MATCH)
-static inline int bpf_owner_match(struct __sk_buff* skb, uint32_t uid, int direction) {
- if (skip_owner_match(skb)) return BPF_PASS;
+static __always_inline inline int bpf_owner_match(struct __sk_buff* skb, uint32_t uid,
+ int direction, bool is_4_19) {
+ if (skip_owner_match(skb, is_4_19)) return BPF_PASS;
if (is_system_uid(uid)) return BPF_PASS;
@@ -273,7 +290,8 @@
}
}
-static __always_inline inline int bpf_traffic_account(struct __sk_buff* skb, int direction) {
+static __always_inline inline int bpf_traffic_account(struct __sk_buff* skb, int direction,
+ bool is_4_19) {
uint32_t sock_uid = bpf_get_socket_uid(skb);
uint64_t cookie = bpf_get_socket_cookie(skb);
UidTagValue* utag = bpf_cookie_tag_map_lookup_elem(&cookie);
@@ -293,7 +311,7 @@
return BPF_PASS;
}
- int match = bpf_owner_match(skb, sock_uid, direction);
+ int match = bpf_owner_match(skb, sock_uid, direction, is_4_19);
if ((direction == BPF_EGRESS) && (match == BPF_DROP)) {
// If an outbound packet is going to be dropped, we do not count that
// traffic.
@@ -338,14 +356,28 @@
return match;
}
-DEFINE_NETD_BPF_PROG("cgroupskb/ingress/stats", AID_ROOT, AID_SYSTEM, bpf_cgroup_ingress)
+DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/ingress/stats$4_19", AID_ROOT, AID_SYSTEM,
+ bpf_cgroup_ingress_4_19, KVER(4, 19, 0), KVER_INF)
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, BPF_INGRESS);
+ return bpf_traffic_account(skb, BPF_INGRESS, /* is_4_19 */ true);
}
-DEFINE_NETD_BPF_PROG("cgroupskb/egress/stats", AID_ROOT, AID_SYSTEM, bpf_cgroup_egress)
+DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/ingress/stats$4_14", AID_ROOT, AID_SYSTEM,
+ bpf_cgroup_ingress_4_14, KVER_NONE, KVER(4, 19, 0))
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, BPF_EGRESS);
+ return bpf_traffic_account(skb, BPF_INGRESS, /* is_4_19 */ false);
+}
+
+DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/egress/stats$4_19", AID_ROOT, AID_SYSTEM,
+ bpf_cgroup_egress_4_19, KVER(4, 19, 0), KVER_INF)
+(struct __sk_buff* skb) {
+ return bpf_traffic_account(skb, BPF_EGRESS, /* is_4_19 */ true);
+}
+
+DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/egress/stats$4_14", AID_ROOT, AID_SYSTEM,
+ bpf_cgroup_egress_4_14, KVER_NONE, KVER(4, 19, 0))
+(struct __sk_buff* skb) {
+ return bpf_traffic_account(skb, BPF_EGRESS, /* is_4_19 */ false);
}
// WARNING: Android T's non-updatable netd depends on the name of this program.
@@ -419,7 +451,8 @@
return BPF_NOMATCH;
}
-DEFINE_NETD_BPF_PROG("cgroupsock/inet/create", AID_ROOT, AID_ROOT, inet_socket_create)
+DEFINE_NETD_BPF_PROG_KVER("cgroupsock/inet/create", AID_ROOT, AID_ROOT, inet_socket_create,
+ KVER(4, 14, 0))
(struct bpf_sock* sk) {
uint64_t gid_uid = bpf_get_current_uid_gid();
/*
diff --git a/nearby/halfsheet/Android.bp b/nearby/halfsheet/Android.bp
index 486a3ff..c84caa6 100644
--- a/nearby/halfsheet/Android.bp
+++ b/nearby/halfsheet/Android.bp
@@ -23,7 +23,6 @@
sdk_version: "module_current",
// This is included in tethering apex, which uses min SDK 30
min_sdk_version: "30",
- target_sdk_version: "current",
updatable: true,
certificate: ":com.android.nearby.halfsheetcertificate",
libs: [
diff --git a/netd/BpfHandler.cpp b/netd/BpfHandler.cpp
index 3f7ed2a..7950ff7 100644
--- a/netd/BpfHandler.cpp
+++ b/netd/BpfHandler.cpp
@@ -87,7 +87,16 @@
RETURN_IF_NOT_OK(checkProgramAccessible(XT_BPF_INGRESS_PROG_PATH));
RETURN_IF_NOT_OK(attachProgramToCgroup(BPF_EGRESS_PROG_PATH, cg_fd, BPF_CGROUP_INET_EGRESS));
RETURN_IF_NOT_OK(attachProgramToCgroup(BPF_INGRESS_PROG_PATH, cg_fd, BPF_CGROUP_INET_INGRESS));
- RETURN_IF_NOT_OK(attachProgramToCgroup(CGROUP_SOCKET_PROG_PATH, cg_fd, BPF_CGROUP_INET_SOCK_CREATE));
+
+ // For the devices that support cgroup socket filter, the socket filter
+ // should be loaded successfully by bpfloader. So we attach the filter to
+ // cgroup if the program is pinned properly.
+ // TODO: delete the if statement once all devices should support cgroup
+ // socket filter (ie. the minimum kernel version required is 4.14).
+ if (!access(CGROUP_SOCKET_PROG_PATH, F_OK)) {
+ RETURN_IF_NOT_OK(
+ attachProgramToCgroup(CGROUP_SOCKET_PROG_PATH, cg_fd, BPF_CGROUP_INET_SOCK_CREATE));
+ }
return netdutils::status::ok;
}
diff --git a/service/ServiceConnectivityResources/Android.bp b/service/ServiceConnectivityResources/Android.bp
index 02b2875..2260596 100644
--- a/service/ServiceConnectivityResources/Android.bp
+++ b/service/ServiceConnectivityResources/Android.bp
@@ -21,9 +21,8 @@
android_app {
name: "ServiceConnectivityResources",
- sdk_version: "module_30",
+ sdk_version: "module_current",
min_sdk_version: "30",
- target_sdk_version: "33",
resource_dirs: [
"res",
],
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index 195f046..9b1fa45 100755
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -3092,7 +3092,7 @@
* Reads the network specific MTU size from resources.
* and set it on it's iface.
*/
- private void updateMtu(LinkProperties newLp, LinkProperties oldLp) {
+ private void updateMtu(@NonNull LinkProperties newLp, @Nullable LinkProperties oldLp) {
final String iface = newLp.getInterfaceName();
final int mtu = newLp.getMtu();
if (oldLp == null && mtu == 0) {
@@ -3125,7 +3125,7 @@
@VisibleForTesting
protected static final String DEFAULT_TCP_BUFFER_SIZES = "4096,87380,110208,4096,16384,110208";
- private void updateTcpBufferSizes(String tcpBufferSizes) {
+ private void updateTcpBufferSizes(@Nullable String tcpBufferSizes) {
String[] values = null;
if (tcpBufferSizes != null) {
values = tcpBufferSizes.split(",");
@@ -5762,7 +5762,7 @@
return mProxyTracker.getGlobalProxy();
}
- private void handleApplyDefaultProxy(ProxyInfo proxy) {
+ private void handleApplyDefaultProxy(@Nullable ProxyInfo proxy) {
if (proxy != null && TextUtils.isEmpty(proxy.getHost())
&& Uri.EMPTY.equals(proxy.getPacFileUrl())) {
proxy = null;
@@ -5774,8 +5774,8 @@
// when any network changes proxy.
// TODO: Remove usage of broadcast extras as they are deprecated and not applicable in a
// multi-network world where an app might be bound to a non-default network.
- private void updateProxy(LinkProperties newLp, LinkProperties oldLp) {
- ProxyInfo newProxyInfo = newLp == null ? null : newLp.getHttpProxy();
+ private void updateProxy(@NonNull LinkProperties newLp, @Nullable LinkProperties oldLp) {
+ ProxyInfo newProxyInfo = newLp.getHttpProxy();
ProxyInfo oldProxyInfo = oldLp == null ? null : oldLp.getHttpProxy();
if (!ProxyTracker.proxyInfoEqual(newProxyInfo, oldProxyInfo)) {
@@ -7500,7 +7500,7 @@
}
private void updateLinkProperties(NetworkAgentInfo networkAgent, @NonNull LinkProperties newLp,
- @NonNull LinkProperties oldLp) {
+ @Nullable LinkProperties oldLp) {
int netId = networkAgent.network.getNetId();
// The NetworkAgent does not know whether clatd is running on its network or not, or whether
@@ -7552,7 +7552,13 @@
}
// Start or stop DNS64 detection and 464xlat according to network state.
networkAgent.clatd.update();
- notifyIfacesChangedForNetworkStats();
+ // Notify NSS when relevant events happened. Currently, NSS only cares about
+ // interface changed to update clat interfaces accounting.
+ final boolean interfacesChanged = oldLp == null
+ || !Objects.equals(newLp.getAllInterfaceNames(), oldLp.getAllInterfaceNames());
+ if (interfacesChanged) {
+ notifyIfacesChangedForNetworkStats();
+ }
networkAgent.networkMonitor().notifyLinkPropertiesChanged(
new LinkProperties(newLp, true /* parcelSensitiveFields */));
notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_IP_CHANGED);
@@ -7639,12 +7645,11 @@
}
- private void updateInterfaces(final @Nullable LinkProperties newLp,
+ private void updateInterfaces(final @NonNull LinkProperties newLp,
final @Nullable LinkProperties oldLp, final int netId,
final @NonNull NetworkCapabilities caps) {
final CompareResult<String> interfaceDiff = new CompareResult<>(
- oldLp != null ? oldLp.getAllInterfaceNames() : null,
- newLp != null ? newLp.getAllInterfaceNames() : null);
+ oldLp != null ? oldLp.getAllInterfaceNames() : null, newLp.getAllInterfaceNames());
if (!interfaceDiff.added.isEmpty()) {
for (final String iface : interfaceDiff.added) {
try {
@@ -7705,12 +7710,13 @@
* Have netd update routes from oldLp to newLp.
* @return true if routes changed between oldLp and newLp
*/
- private boolean updateRoutes(LinkProperties newLp, LinkProperties oldLp, int netId) {
+ private boolean updateRoutes(@NonNull LinkProperties newLp, @Nullable LinkProperties oldLp,
+ int netId) {
// compare the route diff to determine which routes have been updated
final CompareOrUpdateResult<RouteInfo.RouteKey, RouteInfo> routeDiff =
new CompareOrUpdateResult<>(
oldLp != null ? oldLp.getAllRoutes() : null,
- newLp != null ? newLp.getAllRoutes() : null,
+ newLp.getAllRoutes(),
(r) -> r.getRouteKey());
// add routes before removing old in case it helps with continuous connectivity
@@ -7760,7 +7766,8 @@
|| !routeDiff.updated.isEmpty();
}
- private void updateDnses(LinkProperties newLp, LinkProperties oldLp, int netId) {
+ private void updateDnses(@NonNull LinkProperties newLp, @Nullable LinkProperties oldLp,
+ int netId) {
if (oldLp != null && newLp.isIdenticalDnses(oldLp)) {
return; // no updating necessary
}
@@ -7777,8 +7784,8 @@
}
}
- private void updateVpnFiltering(LinkProperties newLp, LinkProperties oldLp,
- NetworkAgentInfo nai) {
+ private void updateVpnFiltering(@NonNull LinkProperties newLp, @Nullable LinkProperties oldLp,
+ @NonNull NetworkAgentInfo nai) {
final String oldIface = getVpnIsolationInterface(nai, nai.networkCapabilities, oldLp);
final String newIface = getVpnIsolationInterface(nai, nai.networkCapabilities, newLp);
final boolean wasFiltering = requiresVpnAllowRule(nai, oldLp, oldIface);
@@ -8315,7 +8322,8 @@
}
}
- public void handleUpdateLinkProperties(NetworkAgentInfo nai, LinkProperties newLp) {
+ public void handleUpdateLinkProperties(@NonNull NetworkAgentInfo nai,
+ @NonNull LinkProperties newLp) {
ensureRunningOnConnectivityServiceThread();
if (!mNetworkAgentInfos.contains(nai)) {
diff --git a/service/src/com/android/server/connectivity/Nat464Xlat.java b/service/src/com/android/server/connectivity/Nat464Xlat.java
index 4e19781..2ac2ad3 100644
--- a/service/src/com/android/server/connectivity/Nat464Xlat.java
+++ b/service/src/com/android/server/connectivity/Nat464Xlat.java
@@ -22,6 +22,7 @@
import static com.android.net.module.util.CollectionUtils.contains;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.net.ConnectivityManager;
import android.net.IDnsResolver;
import android.net.INetd;
@@ -420,7 +421,7 @@
* This is necessary because the LinkProperties in mNetwork come from the transport layer, which
* has no idea that 464xlat is running on top of it.
*/
- public void fixupLinkProperties(@NonNull LinkProperties oldLp, @NonNull LinkProperties lp) {
+ public void fixupLinkProperties(@Nullable LinkProperties oldLp, @NonNull LinkProperties lp) {
// This must be done even if clatd is not running, because otherwise shouldStartClat would
// never return true.
lp.setNat64Prefix(selectNat64Prefix());
@@ -433,6 +434,8 @@
}
Log.d(TAG, "clatd running, updating NAI for " + mIface);
+ // oldLp can't be null here since shouldStartClat checks null LinkProperties to start clat.
+ // Thus, the status won't pass isRunning check if the oldLp is null.
for (LinkProperties stacked: oldLp.getStackedLinks()) {
if (Objects.equals(mIface, stacked.getInterfaceName())) {
lp.addStackedLink(stacked);
diff --git a/tests/mts/bpf_existence_test.cpp b/tests/mts/bpf_existence_test.cpp
index bb07a98..aa5654a 100644
--- a/tests/mts/bpf_existence_test.cpp
+++ b/tests/mts/bpf_existence_test.cpp
@@ -105,7 +105,6 @@
SHARED "prog_clatd_schedcls_ingress6_clat_rawip",
NETD "prog_netd_cgroupskb_egress_stats",
NETD "prog_netd_cgroupskb_ingress_stats",
- NETD "prog_netd_cgroupsock_inet_create",
NETD "prog_netd_schedact_ingress_account",
NETD "prog_netd_skfilter_allowlist_xtbpf",
NETD "prog_netd_skfilter_denylist_xtbpf",
@@ -113,6 +112,11 @@
NETD "prog_netd_skfilter_ingress_xtbpf",
};
+// Provided by *current* mainline module for T+ devices with 4.14+ kernels
+static const set<string> MAINLINE_FOR_T_4_14_PLUS = {
+ NETD "prog_netd_cgroupsock_inet_create",
+};
+
// Provided by *current* mainline module for T+ devices with 5.4+ kernels
static const set<string> MAINLINE_FOR_T_5_4_PLUS = {
SHARED "prog_block_bind4_block_port",
@@ -151,6 +155,7 @@
// Nothing added or removed in SCv2.
DO_EXPECT(IsAtLeastT(), MAINLINE_FOR_T_PLUS);
+ DO_EXPECT(IsAtLeastT() && isAtLeastKernelVersion(4, 14, 0), MAINLINE_FOR_T_4_14_PLUS);
DO_EXPECT(IsAtLeastT() && isAtLeastKernelVersion(5, 4, 0), MAINLINE_FOR_T_5_4_PLUS);
DO_EXPECT(IsAtLeastT() && isAtLeastKernelVersion(5, 15, 0), MAINLINE_FOR_T_5_15_PLUS);
}
diff --git a/tests/unit/java/com/android/server/ConnectivityServiceTest.java b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
index 2d8cf80..65e0b10 100755
--- a/tests/unit/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
@@ -7236,6 +7236,15 @@
expectNotifyNetworkStatus(onlyCell(), onlyCell(), MOBILE_IFNAME);
reset(mStatsManager);
+ // Verify change fields other than interfaces does not trigger a notification to NSS.
+ cellLp.addLinkAddress(new LinkAddress("192.0.2.4/24"));
+ cellLp.addRoute(new RouteInfo((IpPrefix) null, InetAddress.getByName("192.0.2.4"),
+ MOBILE_IFNAME));
+ cellLp.setDnsServers(List.of(InetAddress.getAllByName("8.8.8.8")));
+ mCellNetworkAgent.sendLinkProperties(cellLp);
+ verifyNoMoreInteractions(mStatsManager);
+ reset(mStatsManager);
+
// Default network switch should update ifaces.
mWiFiNetworkAgent.connect(false);
mWiFiNetworkAgent.sendLinkProperties(wifiLp);
diff --git a/tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java b/tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java
index 49e3514..b651c33 100644
--- a/tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java
+++ b/tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java
@@ -222,7 +222,7 @@
public String generateIpv6Address(@NonNull String iface, @NonNull String v4,
@NonNull String prefix64, int mark) throws IOException {
if (BASE_IFACE.equals(iface) && XLAT_LOCAL_IPV4ADDR_STRING.equals(v4)
- && NAT64_PREFIX_STRING.equals(prefix64)) {
+ && NAT64_PREFIX_STRING.equals(prefix64) && MARK == mark) {
return XLAT_LOCAL_IPV6ADDR_STRING;
}
fail("unsupported args: " + iface + ", " + v4 + ", " + prefix64 + ", " + mark);
diff --git a/tests/unit/java/com/android/server/connectivity/VpnTest.java b/tests/unit/java/com/android/server/connectivity/VpnTest.java
index 39fd780..ff771f6 100644
--- a/tests/unit/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/unit/java/com/android/server/connectivity/VpnTest.java
@@ -93,6 +93,7 @@
import android.net.LinkProperties;
import android.net.LocalSocket;
import android.net.Network;
+import android.net.NetworkAgent;
import android.net.NetworkAgentConfig;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo.DetailedState;
@@ -1744,7 +1745,7 @@
throws Exception {
doReturn(mMockNetworkAgent).when(mTestDeps)
.newNetworkAgent(
- any(), any(), anyString(), any(), any(), any(), any(), any());
+ any(), any(), anyString(), any(), any(), any(), any(), any(), any());
final Vpn vpn = createVpnAndSetupUidChecks(AppOpsManager.OPSTR_ACTIVATE_PLATFORM_VPN);
when(mVpnProfileStore.get(vpn.getProfileNameForPackage(TEST_VPN_PKG)))
@@ -1774,7 +1775,7 @@
ArgumentCaptor.forClass(NetworkAgentConfig.class);
verify(mTestDeps).newNetworkAgent(
any(), any(), anyString(), ncCaptor.capture(), lpCaptor.capture(),
- any(), nacCaptor.capture(), any());
+ any(), nacCaptor.capture(), any(), any());
// Check LinkProperties
final LinkProperties lp = lpCaptor.getValue();
@@ -1968,7 +1969,7 @@
}
@Test
- public void testDataStallInIkev2VpnMobikeEnabled() throws Exception {
+ public void testDataStallInIkev2VpnRecoveredByMobike() throws Exception {
final PlatformVpnSnapshot vpnSnapShot = verifySetupPlatformVpn(
createIkeConfig(createIkeConnectInfo(), true /* isMobikeEnabled */));
@@ -1980,6 +1981,64 @@
// Verify MOBIKE is triggered
verifyMobikeTriggered(vpnSnapShot.vpn.mNetworkCapabilities.getUnderlyingNetworks());
+
+ // Expect to skip other data stall event if MOBIKE was started.
+ reset(mIkeSessionWrapper);
+ connectivityDiagCallback.onDataStallSuspected(report);
+ verify(mIkeSessionWrapper, never()).setNetwork(any());
+
+ reset(mIkev2SessionCreator);
+
+ // Send validation status update.
+ // Recovered and get network validated. It should not trigger the ike session reset.
+ ((Vpn.IkeV2VpnRunner) vpnSnapShot.vpn.mVpnRunner).onValidationStatus(
+ NetworkAgent.VALIDATION_STATUS_VALID);
+ verify(mIkev2SessionCreator, never()).createIkeSession(
+ any(), any(), any(), any(), any(), any());
+
+ // Send invalid result to verify no ike session reset since the data stall suspected
+ // variables(timer counter and boolean) was reset.
+ ((Vpn.IkeV2VpnRunner) vpnSnapShot.vpn.mVpnRunner).onValidationStatus(
+ NetworkAgent.VALIDATION_STATUS_NOT_VALID);
+ final ArgumentCaptor<Runnable> runnableCaptor = ArgumentCaptor.forClass(Runnable.class);
+ verify(mExecutor).schedule(runnableCaptor.capture(), anyLong(), any());
+ runnableCaptor.getValue().run();
+ verify(mIkev2SessionCreator, never()).createIkeSession(
+ any(), any(), any(), any(), any(), any());
+ }
+
+ @Test
+ public void testDataStallInIkev2VpnNotRecoveredByMobike() throws Exception {
+ final PlatformVpnSnapshot vpnSnapShot = verifySetupPlatformVpn(
+ createIkeConfig(createIkeConnectInfo(), true /* isMobikeEnabled */));
+
+ final ConnectivityDiagnosticsCallback connectivityDiagCallback =
+ getConnectivityDiagCallback();
+
+ doReturn(TEST_NETWORK).when(mMockNetworkAgent).getNetwork();
+ final DataStallReport report = createDataStallReport();
+ connectivityDiagCallback.onDataStallSuspected(report);
+
+ verifyMobikeTriggered(vpnSnapShot.vpn.mNetworkCapabilities.getUnderlyingNetworks());
+
+ reset(mIkev2SessionCreator);
+
+ // Send validation status update should result in ike session reset.
+ ((Vpn.IkeV2VpnRunner) vpnSnapShot.vpn.mVpnRunner).onValidationStatus(
+ NetworkAgent.VALIDATION_STATUS_NOT_VALID);
+
+ // Verify reset is scheduled and run.
+ final ArgumentCaptor<Runnable> runnableCaptor = ArgumentCaptor.forClass(Runnable.class);
+ verify(mExecutor).schedule(runnableCaptor.capture(), anyLong(), any());
+
+ // Another invalid status reported should not trigger other scheduled recovery.
+ reset(mExecutor);
+ ((Vpn.IkeV2VpnRunner) vpnSnapShot.vpn.mVpnRunner).onValidationStatus(
+ NetworkAgent.VALIDATION_STATUS_NOT_VALID);
+ verify(mExecutor, never()).schedule(runnableCaptor.capture(), anyLong(), any());
+
+ runnableCaptor.getValue().run();
+ verify(mIkev2SessionCreator).createIkeSession(any(), any(), any(), any(), any(), any());
}
@Test
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
index f84ebfb..b4442a5 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
@@ -24,6 +24,7 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.never;
@@ -513,11 +514,8 @@
mdnsClient.setCallback(mockCallback);
mdnsClient.startDiscovery();
- ArgumentCaptor<MdnsResponse> mdnsResponseCaptor =
- ArgumentCaptor.forClass(MdnsResponse.class);
- verify(mockCallback, timeout(TIMEOUT).atLeast(1))
- .onResponseReceived(mdnsResponseCaptor.capture());
- assertEquals(21, mdnsResponseCaptor.getValue().getInterfaceIndex());
+ verify(mockCallback, timeout(TIMEOUT).atLeastOnce())
+ .onResponseReceived(argThat(response -> response.getInterfaceIndex() == 21));
}
@Test
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
new file mode 100644
index 0000000..c88c09f
--- /dev/null
+++ b/tools/gn2bp/Android.bp.swp
@@ -0,0 +1,3022 @@
+// Copyright (C) 2022 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// This file is automatically generated by gen_android_bp. Do not edit.
+
+// GN: //base/allocator:buildflags
+genrule {
+ name: "cronet_aml_base_allocator_buildflags",
+ cmd: "echo '--flags USE_PARTITION_ALLOC=\"false\" USE_ALLOCATOR_SHIM=\"true\" USE_PARTITION_ALLOC_AS_MALLOC=\"false\" USE_BACKUP_REF_PTR=\"false\" USE_ASAN_BACKUP_REF_PTR=\"false\" USE_PARTITION_ALLOC_AS_GWP_ASAN_STORE=\"false\" USE_MTE_CHECKED_PTR=\"false\" FORCE_ENABLE_RAW_PTR_EXCLUSION=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator:buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/allocator/partition_allocator:chromecast_buildflags
+genrule {
+ name: "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
+ cmd: "echo '--flags PA_IS_CAST_ANDROID=\"false\" PA_IS_CASTOS=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator/partition_allocator:chromecast_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/partition_allocator/chromecast_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/allocator/partition_allocator:chromeos_buildflags
+genrule {
+ name: "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
+ cmd: "echo '--flags PA_IS_CHROMEOS_ASH=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator/partition_allocator:chromeos_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/partition_allocator/chromeos_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/allocator/partition_allocator:debugging_buildflags
+genrule {
+ name: "cronet_aml_base_allocator_partition_allocator_debugging_buildflags",
+ cmd: "echo '--flags PA_DCHECK_IS_ON=\"true\" PA_EXPENSIVE_DCHECKS_ARE_ON=\"true\" PA_DCHECK_IS_CONFIGURABLE=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator/partition_allocator:debugging_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/partition_allocator/partition_alloc_base/debug/debugging_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/allocator/partition_allocator:logging_buildflags
+genrule {
+ name: "cronet_aml_base_allocator_partition_allocator_logging_buildflags",
+ cmd: "echo '--flags PA_ENABLE_LOG_ERROR_NOT_REACHED=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator/partition_allocator:logging_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/partition_allocator/logging_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/allocator/partition_allocator:partition_alloc
+cc_library_static {
+ name: "cronet_aml_base_allocator_partition_allocator_partition_alloc",
+ srcs: [
+ ":cronet_aml_third_party_android_ndk_cpu_features",
+ "base/allocator/partition_allocator/address_pool_manager.cc",
+ "base/allocator/partition_allocator/address_pool_manager_bitmap.cc",
+ "base/allocator/partition_allocator/address_space_randomization.cc",
+ "base/allocator/partition_allocator/allocation_guard.cc",
+ "base/allocator/partition_allocator/dangling_raw_ptr_checks.cc",
+ "base/allocator/partition_allocator/gwp_asan_support.cc",
+ "base/allocator/partition_allocator/memory_reclaimer.cc",
+ "base/allocator/partition_allocator/oom.cc",
+ "base/allocator/partition_allocator/oom_callback.cc",
+ "base/allocator/partition_allocator/page_allocator.cc",
+ "base/allocator/partition_allocator/page_allocator_internals_posix.cc",
+ "base/allocator/partition_allocator/partition_address_space.cc",
+ "base/allocator/partition_allocator/partition_alloc.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/check.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/cpu.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/debug/alias.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/files/file_util_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/logging.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/memory/ref_counted.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/pkey.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/posix/safe_strerror.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/rand_util.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/strings/stringprintf.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/time/time.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/time/time_conversion_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/time/time_now_posix.cc",
+ "base/allocator/partition_allocator/partition_alloc_base/time/time_override.cc",
+ "base/allocator/partition_allocator/partition_alloc_hooks.cc",
+ "base/allocator/partition_allocator/partition_bucket.cc",
+ "base/allocator/partition_allocator/partition_oom.cc",
+ "base/allocator/partition_allocator/partition_page.cc",
+ "base/allocator/partition_allocator/partition_root.cc",
+ "base/allocator/partition_allocator/partition_stats.cc",
+ "base/allocator/partition_allocator/random.cc",
+ "base/allocator/partition_allocator/reservation_offset_table.cc",
+ "base/allocator/partition_allocator/spinning_mutex.cc",
+ "base/allocator/partition_allocator/starscan/metadata_allocator.cc",
+ "base/allocator/partition_allocator/starscan/pcscan.cc",
+ "base/allocator/partition_allocator/starscan/pcscan_internal.cc",
+ "base/allocator/partition_allocator/starscan/pcscan_scheduling.cc",
+ "base/allocator/partition_allocator/starscan/snapshot.cc",
+ "base/allocator/partition_allocator/starscan/stack/asm/arm/push_registers_asm.cc",
+ "base/allocator/partition_allocator/starscan/stack/stack.cc",
+ "base/allocator/partition_allocator/starscan/stats_collector.cc",
+ "base/allocator/partition_allocator/starscan/write_protector.cc",
+ "base/allocator/partition_allocator/tagging.cc",
+ "base/allocator/partition_allocator/thread_cache.cc",
+ ],
+ generated_headers: [
+ "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_debugging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_logging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
+ ],
+ export_generated_headers: [
+ "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_debugging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_logging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-DIS_PARTITION_ALLOC_IMPL",
+ "-DPA_PCSCAN_STACK_SUPPORTED",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/android_ndk/sources/android/cpufeatures/",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //base/allocator/partition_allocator:partition_alloc_buildflags
+genrule {
+ name: "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
+ cmd: "echo '--flags ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SUPPORT=\"true\" ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=\"false\" ENABLE_DANGLING_RAW_PTR_CHECKS=\"false\" PUT_REF_COUNT_IN_PREVIOUS_SLOT=\"true\" ENABLE_GWP_ASAN_SUPPORT=\"true\" ENABLE_MTE_CHECKED_PTR_SUPPORT=\"false\" RECORD_ALLOC_INFO=\"false\" USE_FREESLOT_BITMAP=\"false\" GLUE_CORE_POOLS=\"false\" ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=\"false\" STARSCAN=\"true\" PA_USE_BASE_TRACING=\"true\" ENABLE_PKEYS=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base/allocator/partition_allocator:partition_alloc_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/allocator/partition_allocator/partition_alloc_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:anchor_functions_buildflags
+genrule {
+ name: "cronet_aml_base_anchor_functions_buildflags",
+ cmd: "echo '--flags USE_LLD=\"true\" SUPPORTS_CODE_ORDERING=\"true\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:anchor_functions_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/android/library_loader/anchor_functions_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:android_runtime_jni_headers
+genrule {
+ name: "cronet_aml_base_android_runtime_jni_headers",
+ cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
+ "long " +
+ " " +
+ " " +
+ "--output_dir " +
+ "$(genDir)/base/android_runtime_jni_headers " +
+ "--includes " +
+ "base/android/jni_generator/jni_generator_helper.h " +
+ "--jar_file " +
+ "$(location third_party/android_sdk/public/platforms/android-33/android.jar) " +
+ "--output_name " +
+ "Runnable_jni.h " +
+ "--output_name " +
+ "Runtime_jni.h " +
+ "--input_file " +
+ "java/lang/Runnable.class " +
+ "--input_file " +
+ "java/lang/Runtime.class " +
+ "--javap " +
+ "$$(find out/.path -name javap)",
+ out: [
+ "base/android_runtime_jni_headers/Runnable_jni.h",
+ "base/android_runtime_jni_headers/Runtime_jni.h",
+ ],
+ tool_files: [
+ "base/android/jni_generator/jni_generator.py",
+ "build/android/gyp/util/__init__.py",
+ "build/android/gyp/util/build_utils.py",
+ "build/gn_helpers.py",
+ "third_party/android_sdk/public/platforms/android-33/android.jar",
+ ],
+}
+
+// GN: //base:base
+cc_library_static {
+ name: "cronet_aml_base_base",
+ srcs: [
+ ":cronet_aml_base_numerics_base_numerics",
+ ":cronet_aml_third_party_abseil_cpp_absl",
+ ":cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
+ ":cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_base",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_config",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_endian",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
+ ":cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_btree",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_common",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_layout",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
+ ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ ":cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
+ ":cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
+ ":cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
+ ":cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ ":cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ ":cronet_aml_third_party_abseil_cpp_absl_memory_memory",
+ ":cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
+ ":cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
+ ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ ":cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
+ ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ ":cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_random",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ ":cronet_aml_third_party_abseil_cpp_absl_status_status",
+ ":cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
+ ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ ":cronet_aml_third_party_abseil_cpp_absl_time_time",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_compare",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_optional",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_span",
+ ":cronet_aml_third_party_abseil_cpp_absl_types_variant",
+ ":cronet_aml_third_party_abseil_cpp_absl_utility_utility",
+ ":cronet_aml_third_party_android_ndk_cpu_features",
+ ":cronet_aml_third_party_ashmem_ashmem",
+ "base/allocator/allocator_check.cc",
+ "base/allocator/allocator_extension.cc",
+ "base/allocator/dispatcher/dispatcher.cc",
+ "base/allocator/dispatcher/internal/dispatch_data.cc",
+ "base/allocator/dispatcher/reentry_guard.cc",
+ "base/allocator/partition_allocator/shim/allocator_shim.cc",
+ "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
+ "base/android/android_hardware_buffer_compat.cc",
+ "base/android/android_image_reader_compat.cc",
+ "base/android/apk_assets.cc",
+ "base/android/application_status_listener.cc",
+ "base/android/base_feature_list.cc",
+ "base/android/base_features.cc",
+ "base/android/base_jni_onload.cc",
+ "base/android/build_info.cc",
+ "base/android/bundle_utils.cc",
+ "base/android/callback_android.cc",
+ "base/android/child_process_service.cc",
+ "base/android/command_line_android.cc",
+ "base/android/content_uri_utils.cc",
+ "base/android/cpu_features.cc",
+ "base/android/early_trace_event_binding.cc",
+ "base/android/event_log.cc",
+ "base/android/feature_list_jni.cc",
+ "base/android/features_jni.cc",
+ "base/android/field_trial_list.cc",
+ "base/android/important_file_writer_android.cc",
+ "base/android/int_string_callback.cc",
+ "base/android/jank_metric_uma_recorder.cc",
+ "base/android/java_exception_reporter.cc",
+ "base/android/java_handler_thread.cc",
+ "base/android/java_heap_dump_generator.cc",
+ "base/android/java_runtime.cc",
+ "base/android/jni_android.cc",
+ "base/android/jni_array.cc",
+ "base/android/jni_registrar.cc",
+ "base/android/jni_string.cc",
+ "base/android/jni_utils.cc",
+ "base/android/jni_weak_ref.cc",
+ "base/android/library_loader/anchor_functions.cc",
+ "base/android/library_loader/library_loader_hooks.cc",
+ "base/android/library_loader/library_prefetcher.cc",
+ "base/android/library_loader/library_prefetcher_hooks.cc",
+ "base/android/locale_utils.cc",
+ "base/android/memory_pressure_listener_android.cc",
+ "base/android/native_uma_recorder.cc",
+ "base/android/path_service_android.cc",
+ "base/android/path_utils.cc",
+ "base/android/radio_utils.cc",
+ "base/android/reached_addresses_bitset.cc",
+ "base/android/reached_code_profiler.cc",
+ "base/android/remove_stale_data.cc",
+ "base/android/scoped_hardware_buffer_fence_sync.cc",
+ "base/android/scoped_hardware_buffer_handle.cc",
+ "base/android/scoped_java_ref.cc",
+ "base/android/statistics_recorder_android.cc",
+ "base/android/sys_utils.cc",
+ "base/android/task_scheduler/post_task_android.cc",
+ "base/android/task_scheduler/task_runner_android.cc",
+ "base/android/thread_instruction_count.cc",
+ "base/android/timezone_utils.cc",
+ "base/android/trace_event_binding.cc",
+ "base/android/unguessable_token_android.cc",
+ "base/at_exit.cc",
+ "base/barrier_closure.cc",
+ "base/base64.cc",
+ "base/base64url.cc",
+ "base/base_paths.cc",
+ "base/base_paths_android.cc",
+ "base/big_endian.cc",
+ "base/build_time.cc",
+ "base/callback_list.cc",
+ "base/check.cc",
+ "base/check_is_test.cc",
+ "base/check_op.cc",
+ "base/command_line.cc",
+ "base/containers/flat_tree.cc",
+ "base/containers/intrusive_heap.cc",
+ "base/containers/linked_list.cc",
+ "base/cpu.cc",
+ "base/cpu_reduction_experiment.cc",
+ "base/debug/activity_analyzer.cc",
+ "base/debug/activity_tracker.cc",
+ "base/debug/alias.cc",
+ "base/debug/asan_invalid_access.cc",
+ "base/debug/buffered_dwarf_reader.cc",
+ "base/debug/crash_logging.cc",
+ "base/debug/debugger.cc",
+ "base/debug/debugger_posix.cc",
+ "base/debug/dump_without_crashing.cc",
+ "base/debug/dwarf_line_no.cc",
+ "base/debug/elf_reader.cc",
+ "base/debug/proc_maps_linux.cc",
+ "base/debug/profiler.cc",
+ "base/debug/stack_trace.cc",
+ "base/debug/stack_trace_android.cc",
+ "base/debug/task_trace.cc",
+ "base/environment.cc",
+ "base/feature_list.cc",
+ "base/features.cc",
+ "base/file_descriptor_posix.cc",
+ "base/file_descriptor_store.cc",
+ "base/files/file.cc",
+ "base/files/file_descriptor_watcher_posix.cc",
+ "base/files/file_enumerator.cc",
+ "base/files/file_enumerator_posix.cc",
+ "base/files/file_path.cc",
+ "base/files/file_path_watcher.cc",
+ "base/files/file_path_watcher_inotify.cc",
+ "base/files/file_posix.cc",
+ "base/files/file_proxy.cc",
+ "base/files/file_tracing.cc",
+ "base/files/file_util.cc",
+ "base/files/file_util_android.cc",
+ "base/files/file_util_posix.cc",
+ "base/files/important_file_writer.cc",
+ "base/files/important_file_writer_cleaner.cc",
+ "base/files/memory_mapped_file.cc",
+ "base/files/memory_mapped_file_posix.cc",
+ "base/files/safe_base_name.cc",
+ "base/files/scoped_file.cc",
+ "base/files/scoped_file_android.cc",
+ "base/files/scoped_temp_dir.cc",
+ "base/functional/callback_helpers.cc",
+ "base/functional/callback_internal.cc",
+ "base/guid.cc",
+ "base/hash/hash.cc",
+ "base/hash/legacy_hash.cc",
+ "base/hash/md5_boringssl.cc",
+ "base/hash/sha1_boringssl.cc",
+ "base/json/json_file_value_serializer.cc",
+ "base/json/json_parser.cc",
+ "base/json/json_reader.cc",
+ "base/json/json_string_value_serializer.cc",
+ "base/json/json_value_converter.cc",
+ "base/json/json_writer.cc",
+ "base/json/string_escape.cc",
+ "base/json/values_util.cc",
+ "base/lazy_instance_helpers.cc",
+ "base/linux_util.cc",
+ "base/location.cc",
+ "base/logging.cc",
+ "base/memory/aligned_memory.cc",
+ "base/memory/discardable_memory.cc",
+ "base/memory/discardable_memory_allocator.cc",
+ "base/memory/discardable_shared_memory.cc",
+ "base/memory/madv_free_discardable_memory_allocator_posix.cc",
+ "base/memory/madv_free_discardable_memory_posix.cc",
+ "base/memory/memory_pressure_listener.cc",
+ "base/memory/memory_pressure_monitor.cc",
+ "base/memory/nonscannable_memory.cc",
+ "base/memory/page_size_posix.cc",
+ "base/memory/platform_shared_memory_handle.cc",
+ "base/memory/platform_shared_memory_mapper_android.cc",
+ "base/memory/platform_shared_memory_region.cc",
+ "base/memory/platform_shared_memory_region_android.cc",
+ "base/memory/raw_ptr.cc",
+ "base/memory/raw_ptr_asan_bound_arg_tracker.cc",
+ "base/memory/raw_ptr_asan_service.cc",
+ "base/memory/read_only_shared_memory_region.cc",
+ "base/memory/ref_counted.cc",
+ "base/memory/ref_counted_memory.cc",
+ "base/memory/shared_memory_mapper.cc",
+ "base/memory/shared_memory_mapping.cc",
+ "base/memory/shared_memory_security_policy.cc",
+ "base/memory/shared_memory_tracker.cc",
+ "base/memory/unsafe_shared_memory_pool.cc",
+ "base/memory/unsafe_shared_memory_region.cc",
+ "base/memory/weak_ptr.cc",
+ "base/memory/writable_shared_memory_region.cc",
+ "base/message_loop/message_pump.cc",
+ "base/message_loop/message_pump_android.cc",
+ "base/message_loop/message_pump_default.cc",
+ "base/message_loop/message_pump_epoll.cc",
+ "base/message_loop/message_pump_libevent.cc",
+ "base/message_loop/watchable_io_message_pump_posix.cc",
+ "base/message_loop/work_id_provider.cc",
+ "base/metrics/bucket_ranges.cc",
+ "base/metrics/crc32.cc",
+ "base/metrics/dummy_histogram.cc",
+ "base/metrics/field_trial.cc",
+ "base/metrics/field_trial_param_associator.cc",
+ "base/metrics/field_trial_params.cc",
+ "base/metrics/histogram.cc",
+ "base/metrics/histogram_base.cc",
+ "base/metrics/histogram_delta_serialization.cc",
+ "base/metrics/histogram_functions.cc",
+ "base/metrics/histogram_samples.cc",
+ "base/metrics/histogram_snapshot_manager.cc",
+ "base/metrics/metrics_hashes.cc",
+ "base/metrics/persistent_histogram_allocator.cc",
+ "base/metrics/persistent_histogram_storage.cc",
+ "base/metrics/persistent_memory_allocator.cc",
+ "base/metrics/persistent_sample_map.cc",
+ "base/metrics/ranges_manager.cc",
+ "base/metrics/sample_map.cc",
+ "base/metrics/sample_vector.cc",
+ "base/metrics/single_sample_metrics.cc",
+ "base/metrics/sparse_histogram.cc",
+ "base/metrics/statistics_recorder.cc",
+ "base/metrics/user_metrics.cc",
+ "base/native_library.cc",
+ "base/native_library_posix.cc",
+ "base/observer_list_internal.cc",
+ "base/observer_list_threadsafe.cc",
+ "base/observer_list_types.cc",
+ "base/one_shot_event.cc",
+ "base/os_compat_android.cc",
+ "base/path_service.cc",
+ "base/pending_task.cc",
+ "base/pickle.cc",
+ "base/posix/can_lower_nice_to.cc",
+ "base/posix/file_descriptor_shuffle.cc",
+ "base/posix/global_descriptors.cc",
+ "base/posix/safe_strerror.cc",
+ "base/posix/unix_domain_socket.cc",
+ "base/power_monitor/battery_level_provider.cc",
+ "base/power_monitor/battery_state_sampler.cc",
+ "base/power_monitor/moving_average.cc",
+ "base/power_monitor/power_monitor.cc",
+ "base/power_monitor/power_monitor_device_source.cc",
+ "base/power_monitor/power_monitor_device_source_android.cc",
+ "base/power_monitor/power_monitor_features.cc",
+ "base/power_monitor/power_monitor_source.cc",
+ "base/power_monitor/sampling_event_source.cc",
+ "base/power_monitor/timer_sampling_event_source.cc",
+ "base/process/environment_internal.cc",
+ "base/process/internal_linux.cc",
+ "base/process/kill.cc",
+ "base/process/kill_posix.cc",
+ "base/process/launch.cc",
+ "base/process/launch_posix.cc",
+ "base/process/memory.cc",
+ "base/process/memory_linux.cc",
+ "base/process/process_android.cc",
+ "base/process/process_handle.cc",
+ "base/process/process_handle_linux.cc",
+ "base/process/process_handle_posix.cc",
+ "base/process/process_iterator.cc",
+ "base/process/process_iterator_linux.cc",
+ "base/process/process_metrics.cc",
+ "base/process/process_metrics_linux.cc",
+ "base/process/process_metrics_posix.cc",
+ "base/process/process_posix.cc",
+ "base/profiler/arm_cfi_table.cc",
+ "base/profiler/chrome_unwind_info_android.cc",
+ "base/profiler/chrome_unwinder_android.cc",
+ "base/profiler/chrome_unwinder_android_v2.cc",
+ "base/profiler/frame.cc",
+ "base/profiler/metadata_recorder.cc",
+ "base/profiler/module_cache.cc",
+ "base/profiler/module_cache_posix.cc",
+ "base/profiler/sample_metadata.cc",
+ "base/profiler/sampling_profiler_thread_token.cc",
+ "base/profiler/stack_base_address_posix.cc",
+ "base/profiler/stack_buffer.cc",
+ "base/profiler/stack_copier.cc",
+ "base/profiler/stack_copier_signal.cc",
+ "base/profiler/stack_copier_suspend.cc",
+ "base/profiler/stack_sampler.cc",
+ "base/profiler/stack_sampler_android.cc",
+ "base/profiler/stack_sampler_impl.cc",
+ "base/profiler/stack_sampling_profiler.cc",
+ "base/profiler/thread_delegate_posix.cc",
+ "base/profiler/unwinder.cc",
+ "base/rand_util.cc",
+ "base/rand_util_posix.cc",
+ "base/run_loop.cc",
+ "base/sampling_heap_profiler/lock_free_address_hash_set.cc",
+ "base/sampling_heap_profiler/poisson_allocation_sampler.cc",
+ "base/sampling_heap_profiler/sampling_heap_profiler.cc",
+ "base/scoped_add_feature_flags.cc",
+ "base/scoped_environment_variable_override.cc",
+ "base/scoped_native_library.cc",
+ "base/sequence_checker.cc",
+ "base/sequence_checker_impl.cc",
+ "base/sequence_token.cc",
+ "base/strings/abseil_string_conversions.cc",
+ "base/strings/abseil_string_number_conversions.cc",
+ "base/strings/escape.cc",
+ "base/strings/latin1_string_conversions.cc",
+ "base/strings/pattern.cc",
+ "base/strings/safe_sprintf.cc",
+ "base/strings/strcat.cc",
+ "base/strings/string_number_conversions.cc",
+ "base/strings/string_piece.cc",
+ "base/strings/string_split.cc",
+ "base/strings/string_util.cc",
+ "base/strings/string_util_constants.cc",
+ "base/strings/stringprintf.cc",
+ "base/strings/sys_string_conversions_posix.cc",
+ "base/strings/utf_offset_string_conversions.cc",
+ "base/strings/utf_string_conversion_utils.cc",
+ "base/strings/utf_string_conversions.cc",
+ "base/substring_set_matcher/matcher_string_pattern.cc",
+ "base/substring_set_matcher/substring_set_matcher.cc",
+ "base/supports_user_data.cc",
+ "base/sync_socket.cc",
+ "base/sync_socket_posix.cc",
+ "base/synchronization/atomic_flag.cc",
+ "base/synchronization/condition_variable_posix.cc",
+ "base/synchronization/lock.cc",
+ "base/synchronization/lock_impl_posix.cc",
+ "base/synchronization/waitable_event_posix.cc",
+ "base/synchronization/waitable_event_watcher_posix.cc",
+ "base/syslog_logging.cc",
+ "base/system/sys_info.cc",
+ "base/system/sys_info_android.cc",
+ "base/system/sys_info_linux.cc",
+ "base/system/sys_info_posix.cc",
+ "base/system/system_monitor.cc",
+ "base/task/cancelable_task_tracker.cc",
+ "base/task/common/checked_lock_impl.cc",
+ "base/task/common/lazy_now.cc",
+ "base/task/common/operations_controller.cc",
+ "base/task/common/scoped_defer_task_posting.cc",
+ "base/task/common/task_annotator.cc",
+ "base/task/current_thread.cc",
+ "base/task/default_delayed_task_handle_delegate.cc",
+ "base/task/deferred_sequenced_task_runner.cc",
+ "base/task/delayed_task_handle.cc",
+ "base/task/lazy_thread_pool_task_runner.cc",
+ "base/task/post_job.cc",
+ "base/task/scoped_set_task_priority_for_current_thread.cc",
+ "base/task/sequence_manager/associated_thread_id.cc",
+ "base/task/sequence_manager/atomic_flag_set.cc",
+ "base/task/sequence_manager/delayed_task_handle_delegate.cc",
+ "base/task/sequence_manager/enqueue_order_generator.cc",
+ "base/task/sequence_manager/fence.cc",
+ "base/task/sequence_manager/hierarchical_timing_wheel.cc",
+ "base/task/sequence_manager/sequence_manager.cc",
+ "base/task/sequence_manager/sequence_manager_impl.cc",
+ "base/task/sequence_manager/sequenced_task_source.cc",
+ "base/task/sequence_manager/task_order.cc",
+ "base/task/sequence_manager/task_queue.cc",
+ "base/task/sequence_manager/task_queue_impl.cc",
+ "base/task/sequence_manager/task_queue_selector.cc",
+ "base/task/sequence_manager/tasks.cc",
+ "base/task/sequence_manager/thread_controller.cc",
+ "base/task/sequence_manager/thread_controller_impl.cc",
+ "base/task/sequence_manager/thread_controller_power_monitor.cc",
+ "base/task/sequence_manager/thread_controller_with_message_pump_impl.cc",
+ "base/task/sequence_manager/time_domain.cc",
+ "base/task/sequence_manager/timing_wheel.cc",
+ "base/task/sequence_manager/wake_up_queue.cc",
+ "base/task/sequence_manager/work_deduplicator.cc",
+ "base/task/sequence_manager/work_queue.cc",
+ "base/task/sequence_manager/work_queue_sets.cc",
+ "base/task/sequenced_task_runner.cc",
+ "base/task/simple_task_executor.cc",
+ "base/task/single_thread_task_executor.cc",
+ "base/task/single_thread_task_runner.cc",
+ "base/task/task_executor.cc",
+ "base/task/task_features.cc",
+ "base/task/task_runner.cc",
+ "base/task/task_traits.cc",
+ "base/task/thread_pool.cc",
+ "base/task/thread_pool/delayed_priority_queue.cc",
+ "base/task/thread_pool/delayed_task_manager.cc",
+ "base/task/thread_pool/environment_config.cc",
+ "base/task/thread_pool/initialization_util.cc",
+ "base/task/thread_pool/job_task_source.cc",
+ "base/task/thread_pool/pooled_parallel_task_runner.cc",
+ "base/task/thread_pool/pooled_sequenced_task_runner.cc",
+ "base/task/thread_pool/pooled_single_thread_task_runner_manager.cc",
+ "base/task/thread_pool/pooled_task_runner_delegate.cc",
+ "base/task/thread_pool/priority_queue.cc",
+ "base/task/thread_pool/sequence.cc",
+ "base/task/thread_pool/service_thread.cc",
+ "base/task/thread_pool/task.cc",
+ "base/task/thread_pool/task_source.cc",
+ "base/task/thread_pool/task_source_sort_key.cc",
+ "base/task/thread_pool/task_tracker.cc",
+ "base/task/thread_pool/thread_group.cc",
+ "base/task/thread_pool/thread_group_impl.cc",
+ "base/task/thread_pool/thread_group_native.cc",
+ "base/task/thread_pool/thread_pool_impl.cc",
+ "base/task/thread_pool/thread_pool_instance.cc",
+ "base/task/thread_pool/worker_thread.cc",
+ "base/task/thread_pool/worker_thread_stack.cc",
+ "base/third_party/cityhash/city.cc",
+ "base/third_party/cityhash_v103/src/city_v103.cc",
+ "base/third_party/nspr/prtime.cc",
+ "base/third_party/superfasthash/superfasthash.c",
+ "base/threading/hang_watcher.cc",
+ "base/threading/platform_thread.cc",
+ "base/threading/platform_thread_android.cc",
+ "base/threading/platform_thread_internal_posix.cc",
+ "base/threading/platform_thread_posix.cc",
+ "base/threading/platform_thread_ref.cc",
+ "base/threading/post_task_and_reply_impl.cc",
+ "base/threading/scoped_blocking_call.cc",
+ "base/threading/scoped_blocking_call_internal.cc",
+ "base/threading/scoped_thread_priority.cc",
+ "base/threading/sequence_local_storage_map.cc",
+ "base/threading/sequence_local_storage_slot.cc",
+ "base/threading/sequenced_task_runner_handle.cc",
+ "base/threading/simple_thread.cc",
+ "base/threading/thread.cc",
+ "base/threading/thread_checker.cc",
+ "base/threading/thread_checker_impl.cc",
+ "base/threading/thread_collision_warner.cc",
+ "base/threading/thread_id_name_manager.cc",
+ "base/threading/thread_local_storage.cc",
+ "base/threading/thread_local_storage_posix.cc",
+ "base/threading/thread_restrictions.cc",
+ "base/threading/thread_task_runner_handle.cc",
+ "base/threading/watchdog.cc",
+ "base/time/clock.cc",
+ "base/time/default_clock.cc",
+ "base/time/default_tick_clock.cc",
+ "base/time/tick_clock.cc",
+ "base/time/time.cc",
+ "base/time/time_android.cc",
+ "base/time/time_conversion_posix.cc",
+ "base/time/time_delta_from_string.cc",
+ "base/time/time_exploded_icu.cc",
+ "base/time/time_exploded_posix.cc",
+ "base/time/time_now_posix.cc",
+ "base/time/time_override.cc",
+ "base/time/time_to_iso8601.cc",
+ "base/timer/elapsed_timer.cc",
+ "base/timer/hi_res_timer_manager_posix.cc",
+ "base/timer/lap_timer.cc",
+ "base/timer/timer.cc",
+ "base/timer/wall_clock_timer.cc",
+ "base/token.cc",
+ "base/trace_event/cfi_backtrace_android.cc",
+ "base/trace_event/heap_profiler_allocation_context.cc",
+ "base/trace_event/heap_profiler_allocation_context_tracker.cc",
+ "base/trace_event/memory_allocator_dump_guid.cc",
+ "base/trace_event/trace_event_stub.cc",
+ "base/trace_event/trace_id_helper.cc",
+ "base/unguessable_token.cc",
+ "base/value_iterators.cc",
+ "base/values.cc",
+ "base/version.cc",
+ "base/vlog.cc",
+ ],
+ shared_libs: [
+ "libandroid",
+ "liblog",
+ ],
+ static_libs: [
+ "cronet_aml_base_allocator_partition_allocator_partition_alloc",
+ "cronet_aml_base_base_static",
+ "cronet_aml_base_third_party_double_conversion_double_conversion",
+ "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_icu_icui18n",
+ "cronet_aml_third_party_icu_icuuc_private",
+ "cronet_aml_third_party_libevent_libevent",
+ "cronet_aml_third_party_modp_b64_modp_b64",
+ ],
+ generated_headers: [
+ "cronet_aml_base_allocator_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_debugging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_logging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
+ "cronet_aml_base_anchor_functions_buildflags",
+ "cronet_aml_base_base_jni_headers",
+ "cronet_aml_base_build_date",
+ "cronet_aml_base_cfi_buildflags",
+ "cronet_aml_base_clang_profiling_buildflags",
+ "cronet_aml_base_debugging_buildflags",
+ "cronet_aml_base_feature_list_buildflags",
+ "cronet_aml_base_ios_cronet_buildflags",
+ "cronet_aml_base_logging_buildflags",
+ "cronet_aml_base_message_pump_buildflags",
+ "cronet_aml_base_orderfile_buildflags",
+ "cronet_aml_base_parsing_buildflags",
+ "cronet_aml_base_power_monitor_buildflags",
+ "cronet_aml_base_profiler_buildflags",
+ "cronet_aml_base_sanitizer_buildflags",
+ "cronet_aml_base_synchronization_buildflags",
+ "cronet_aml_base_tracing_buildflags",
+ "cronet_aml_build_branding_buildflags",
+ "cronet_aml_build_chromecast_buildflags",
+ "cronet_aml_build_chromeos_buildflags",
+ "cronet_aml_build_config_compiler_compiler_buildflags",
+ ],
+ export_generated_headers: [
+ "cronet_aml_base_allocator_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_debugging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_logging_buildflags",
+ "cronet_aml_base_allocator_partition_allocator_partition_alloc_buildflags",
+ "cronet_aml_base_anchor_functions_buildflags",
+ "cronet_aml_base_base_jni_headers",
+ "cronet_aml_base_build_date",
+ "cronet_aml_base_cfi_buildflags",
+ "cronet_aml_base_clang_profiling_buildflags",
+ "cronet_aml_base_debugging_buildflags",
+ "cronet_aml_base_feature_list_buildflags",
+ "cronet_aml_base_ios_cronet_buildflags",
+ "cronet_aml_base_logging_buildflags",
+ "cronet_aml_base_message_pump_buildflags",
+ "cronet_aml_base_orderfile_buildflags",
+ "cronet_aml_base_parsing_buildflags",
+ "cronet_aml_base_power_monitor_buildflags",
+ "cronet_aml_base_profiler_buildflags",
+ "cronet_aml_base_sanitizer_buildflags",
+ "cronet_aml_base_synchronization_buildflags",
+ "cronet_aml_base_tracing_buildflags",
+ "cronet_aml_build_branding_buildflags",
+ "cronet_aml_build_chromecast_buildflags",
+ "cronet_aml_build_chromeos_buildflags",
+ "cronet_aml_build_config_compiler_compiler_buildflags",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DABSL_ALLOCATOR_NOTHROW=1",
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DBASE_IMPLEMENTATION",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
+ "-DUSE_CHROMIUM_ICU=1",
+ "-DU_ENABLE_DYLOAD=0",
+ "-DU_ENABLE_RESOURCE_TRACING=0",
+ "-DU_ENABLE_TRACING=1",
+ "-DU_STATIC_IMPLEMENTATION",
+ "-DU_USING_ICU_NAMESPACE=0",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/abseil-cpp/",
+ "third_party/android_ndk/sources/android/cpufeatures/",
+ "third_party/boringssl/src/include/",
+ "third_party/icu/source/common/",
+ "third_party/icu/source/i18n/",
+ ],
+ header_libs: [
+ "jni_headers",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //base:base_jni_headers
+genrule {
+ name: "cronet_aml_base_base_jni_headers",
+ srcs: [
+ "base/android/java/src/org/chromium/base/ApkAssets.java",
+ "base/android/java/src/org/chromium/base/ApplicationStatus.java",
+ "base/android/java/src/org/chromium/base/BaseFeatureList.java",
+ "base/android/java/src/org/chromium/base/BuildInfo.java",
+ "base/android/java/src/org/chromium/base/BundleUtils.java",
+ "base/android/java/src/org/chromium/base/Callback.java",
+ "base/android/java/src/org/chromium/base/CommandLine.java",
+ "base/android/java/src/org/chromium/base/ContentUriUtils.java",
+ "base/android/java/src/org/chromium/base/CpuFeatures.java",
+ "base/android/java/src/org/chromium/base/EarlyTraceEvent.java",
+ "base/android/java/src/org/chromium/base/EventLog.java",
+ "base/android/java/src/org/chromium/base/FeatureList.java",
+ "base/android/java/src/org/chromium/base/Features.java",
+ "base/android/java/src/org/chromium/base/FieldTrialList.java",
+ "base/android/java/src/org/chromium/base/FileUtils.java",
+ "base/android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
+ "base/android/java/src/org/chromium/base/IntStringCallback.java",
+ "base/android/java/src/org/chromium/base/JNIUtils.java",
+ "base/android/java/src/org/chromium/base/JavaExceptionReporter.java",
+ "base/android/java/src/org/chromium/base/JavaHandlerThread.java",
+ "base/android/java/src/org/chromium/base/LocaleUtils.java",
+ "base/android/java/src/org/chromium/base/MemoryPressureListener.java",
+ "base/android/java/src/org/chromium/base/PathService.java",
+ "base/android/java/src/org/chromium/base/PathUtils.java",
+ "base/android/java/src/org/chromium/base/PowerMonitor.java",
+ "base/android/java/src/org/chromium/base/RadioUtils.java",
+ "base/android/java/src/org/chromium/base/SysUtils.java",
+ "base/android/java/src/org/chromium/base/ThreadUtils.java",
+ "base/android/java/src/org/chromium/base/TimezoneUtils.java",
+ "base/android/java/src/org/chromium/base/TraceEvent.java",
+ "base/android/java/src/org/chromium/base/UnguessableToken.java",
+ "base/android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java",
+ "base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
+ "base/android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java",
+ "base/android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java",
+ "base/android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java",
+ "base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java",
+ "base/android/java/src/org/chromium/base/process_launcher/ChildProcessService.java",
+ "base/android/java/src/org/chromium/base/task/PostTask.java",
+ "base/android/java/src/org/chromium/base/task/TaskRunnerImpl.java",
+ ],
+ cmd: "$(location base/android/jni_generator/jni_generator.py) --ptr_type " +
+ "long " +
+ " " +
+ " " +
+ "--output_dir " +
+ "$(genDir)/base/base_jni_headers " +
+ "--includes " +
+ "base/android/jni_generator/jni_generator_helper.h " +
+ "--use_proxy_hash " +
+ "--output_name " +
+ "ApkAssets_jni.h " +
+ "--output_name " +
+ "ApplicationStatus_jni.h " +
+ "--output_name " +
+ "BaseFeatureList_jni.h " +
+ "--output_name " +
+ "BuildInfo_jni.h " +
+ "--output_name " +
+ "BundleUtils_jni.h " +
+ "--output_name " +
+ "Callback_jni.h " +
+ "--output_name " +
+ "CommandLine_jni.h " +
+ "--output_name " +
+ "ContentUriUtils_jni.h " +
+ "--output_name " +
+ "CpuFeatures_jni.h " +
+ "--output_name " +
+ "EarlyTraceEvent_jni.h " +
+ "--output_name " +
+ "EventLog_jni.h " +
+ "--output_name " +
+ "FeatureList_jni.h " +
+ "--output_name " +
+ "Features_jni.h " +
+ "--output_name " +
+ "FieldTrialList_jni.h " +
+ "--output_name " +
+ "FileUtils_jni.h " +
+ "--output_name " +
+ "ImportantFileWriterAndroid_jni.h " +
+ "--output_name " +
+ "IntStringCallback_jni.h " +
+ "--output_name " +
+ "JNIUtils_jni.h " +
+ "--output_name " +
+ "JavaExceptionReporter_jni.h " +
+ "--output_name " +
+ "JavaHandlerThread_jni.h " +
+ "--output_name " +
+ "LocaleUtils_jni.h " +
+ "--output_name " +
+ "MemoryPressureListener_jni.h " +
+ "--output_name " +
+ "PathService_jni.h " +
+ "--output_name " +
+ "PathUtils_jni.h " +
+ "--output_name " +
+ "PowerMonitor_jni.h " +
+ "--output_name " +
+ "RadioUtils_jni.h " +
+ "--output_name " +
+ "SysUtils_jni.h " +
+ "--output_name " +
+ "ThreadUtils_jni.h " +
+ "--output_name " +
+ "TimezoneUtils_jni.h " +
+ "--output_name " +
+ "TraceEvent_jni.h " +
+ "--output_name " +
+ "UnguessableToken_jni.h " +
+ "--output_name " +
+ "JankMetricUMARecorder_jni.h " +
+ "--output_name " +
+ "LibraryLoader_jni.h " +
+ "--output_name " +
+ "LibraryPrefetcher_jni.h " +
+ "--output_name " +
+ "JavaHeapDumpGenerator_jni.h " +
+ "--output_name " +
+ "NativeUmaRecorder_jni.h " +
+ "--output_name " +
+ "StatisticsRecorderAndroid_jni.h " +
+ "--output_name " +
+ "ChildProcessService_jni.h " +
+ "--output_name " +
+ "PostTask_jni.h " +
+ "--output_name " +
+ "TaskRunnerImpl_jni.h " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/ApkAssets.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/ApplicationStatus.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/BaseFeatureList.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/BuildInfo.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/BundleUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/Callback.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/CommandLine.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/ContentUriUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/CpuFeatures.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/EarlyTraceEvent.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/EventLog.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/FeatureList.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/Features.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/FieldTrialList.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/FileUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/ImportantFileWriterAndroid.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/IntStringCallback.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/JNIUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/JavaExceptionReporter.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/JavaHandlerThread.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/LocaleUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/MemoryPressureListener.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/PathService.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/PathUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/PowerMonitor.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/RadioUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/SysUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/ThreadUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/TimezoneUtils.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/TraceEvent.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/UnguessableToken.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/jank_tracker/JankMetricUMARecorder.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/library_loader/LibraryPrefetcher.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/memory/JavaHeapDumpGenerator.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/process_launcher/ChildProcessService.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/task/PostTask.java) " +
+ "--input_file " +
+ "$(location base/android/java/src/org/chromium/base/task/TaskRunnerImpl.java)",
+ out: [
+ "base/base_jni_headers/ApkAssets_jni.h",
+ "base/base_jni_headers/ApplicationStatus_jni.h",
+ "base/base_jni_headers/BaseFeatureList_jni.h",
+ "base/base_jni_headers/BuildInfo_jni.h",
+ "base/base_jni_headers/BundleUtils_jni.h",
+ "base/base_jni_headers/Callback_jni.h",
+ "base/base_jni_headers/ChildProcessService_jni.h",
+ "base/base_jni_headers/CommandLine_jni.h",
+ "base/base_jni_headers/ContentUriUtils_jni.h",
+ "base/base_jni_headers/CpuFeatures_jni.h",
+ "base/base_jni_headers/EarlyTraceEvent_jni.h",
+ "base/base_jni_headers/EventLog_jni.h",
+ "base/base_jni_headers/FeatureList_jni.h",
+ "base/base_jni_headers/Features_jni.h",
+ "base/base_jni_headers/FieldTrialList_jni.h",
+ "base/base_jni_headers/FileUtils_jni.h",
+ "base/base_jni_headers/ImportantFileWriterAndroid_jni.h",
+ "base/base_jni_headers/IntStringCallback_jni.h",
+ "base/base_jni_headers/JNIUtils_jni.h",
+ "base/base_jni_headers/JankMetricUMARecorder_jni.h",
+ "base/base_jni_headers/JavaExceptionReporter_jni.h",
+ "base/base_jni_headers/JavaHandlerThread_jni.h",
+ "base/base_jni_headers/JavaHeapDumpGenerator_jni.h",
+ "base/base_jni_headers/LibraryLoader_jni.h",
+ "base/base_jni_headers/LibraryPrefetcher_jni.h",
+ "base/base_jni_headers/LocaleUtils_jni.h",
+ "base/base_jni_headers/MemoryPressureListener_jni.h",
+ "base/base_jni_headers/NativeUmaRecorder_jni.h",
+ "base/base_jni_headers/PathService_jni.h",
+ "base/base_jni_headers/PathUtils_jni.h",
+ "base/base_jni_headers/PostTask_jni.h",
+ "base/base_jni_headers/PowerMonitor_jni.h",
+ "base/base_jni_headers/RadioUtils_jni.h",
+ "base/base_jni_headers/StatisticsRecorderAndroid_jni.h",
+ "base/base_jni_headers/SysUtils_jni.h",
+ "base/base_jni_headers/TaskRunnerImpl_jni.h",
+ "base/base_jni_headers/ThreadUtils_jni.h",
+ "base/base_jni_headers/TimezoneUtils_jni.h",
+ "base/base_jni_headers/TraceEvent_jni.h",
+ "base/base_jni_headers/UnguessableToken_jni.h",
+ ],
+ tool_files: [
+ "base/android/jni_generator/jni_generator.py",
+ "build/android/gyp/util/__init__.py",
+ "build/android/gyp/util/build_utils.py",
+ "build/gn_helpers.py",
+ ],
+}
+
+// GN: //base:base_static
+cc_library_static {
+ name: "cronet_aml_base_base_static",
+ srcs: [
+ "base/base_switches.cc",
+ ],
+ generated_headers: [
+ "cronet_aml_build_chromeos_buildflags",
+ ],
+ export_generated_headers: [
+ "cronet_aml_build_chromeos_buildflags",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //base:build_date
+genrule {
+ name: "cronet_aml_base_build_date",
+ cmd: "$(location build/write_build_date_header.py) $(out) " +
+ "1664686800",
+ out: [
+ "base/generated_build_date.h",
+ ],
+ tool_files: [
+ "build/write_build_date_header.py",
+ ],
+}
+
+// GN: //base:cfi_buildflags
+genrule {
+ name: "cronet_aml_base_cfi_buildflags",
+ cmd: "echo '--flags CFI_CAST_CHECK=\"false && false\" CFI_DIAG=\"false && false\" CFI_ICALL_CHECK=\"false && false\" CFI_ENFORCEMENT_TRAP=\"false && !false\" CFI_ENFORCEMENT_DIAGNOSTIC=\"false && false && !false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:cfi_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/cfi_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:clang_profiling_buildflags
+genrule {
+ name: "cronet_aml_base_clang_profiling_buildflags",
+ cmd: "echo '--flags CLANG_PROFILING=\"false\" CLANG_PROFILING_INSIDE_SANDBOX=\"false\" USE_CLANG_COVERAGE=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:clang_profiling_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/clang_profiling_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:debugging_buildflags
+genrule {
+ name: "cronet_aml_base_debugging_buildflags",
+ cmd: "echo '--flags DCHECK_IS_CONFIGURABLE=\"false\" ENABLE_LOCATION_SOURCE=\"true\" ENABLE_PROFILING=\"false\" CAN_UNWIND_WITH_FRAME_POINTERS=\"false\" UNSAFE_DEVELOPER_BUILD=\"true\" CAN_UNWIND_WITH_CFI_TABLE=\"true\" EXCLUDE_UNWIND_TABLES=\"false\" ENABLE_GDBINIT_WARNING=\"true\" ENABLE_LLDBINIT_WARNING=\"false\" EXPENSIVE_DCHECKS_ARE_ON=\"true\" ENABLE_STACK_TRACE_LINE_NUMBERS=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:debugging_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/debug/debugging_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:feature_list_buildflags
+genrule {
+ name: "cronet_aml_base_feature_list_buildflags",
+ cmd: "echo '--flags ENABLE_BANNED_BASE_FEATURE_PREFIX=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:feature_list_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/feature_list_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:ios_cronet_buildflags
+genrule {
+ name: "cronet_aml_base_ios_cronet_buildflags",
+ cmd: "echo '--flags CRONET_BUILD=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:ios_cronet_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/message_loop/ios_cronet_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:logging_buildflags
+genrule {
+ name: "cronet_aml_base_logging_buildflags",
+ cmd: "echo '--flags ENABLE_LOG_ERROR_NOT_REACHED=\"false\" USE_RUNTIME_VLOG=\"true\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:logging_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/logging_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:message_pump_buildflags
+genrule {
+ name: "cronet_aml_base_message_pump_buildflags",
+ cmd: "echo '--flags ENABLE_MESSAGE_PUMP_EPOLL=\"true\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:message_pump_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/message_loop/message_pump_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/numerics:base_numerics
+filegroup {
+ name: "cronet_aml_base_numerics_base_numerics",
+}
+
+// GN: //base:orderfile_buildflags
+genrule {
+ name: "cronet_aml_base_orderfile_buildflags",
+ cmd: "echo '--flags DEVTOOLS_INSTRUMENTATION_DUMPING=\"false\" ORDERFILE_INSTRUMENTATION=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:orderfile_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/android/orderfile/orderfile_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:parsing_buildflags
+genrule {
+ name: "cronet_aml_base_parsing_buildflags",
+ cmd: "echo '--flags BUILD_RUST_JSON_PARSER=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:parsing_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/parsing_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:power_monitor_buildflags
+genrule {
+ name: "cronet_aml_base_power_monitor_buildflags",
+ cmd: "echo '--flags HAS_BATTERY_LEVEL_PROVIDER_IMPL=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:power_monitor_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/power_monitor/power_monitor_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:profiler_buildflags
+genrule {
+ name: "cronet_aml_base_profiler_buildflags",
+ cmd: "echo '--flags ENABLE_ARM_CFI_TABLE=\"true\" IOS_STACK_PROFILER_ENABLED=\"true\" USE_ANDROID_UNWINDER_V2=\"true\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:profiler_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/profiler/profiler_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:sanitizer_buildflags
+genrule {
+ name: "cronet_aml_base_sanitizer_buildflags",
+ cmd: "echo '--flags IS_HWASAN=\"false\" USING_SANITIZER=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:sanitizer_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/sanitizer_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base:synchronization_buildflags
+genrule {
+ name: "cronet_aml_base_synchronization_buildflags",
+ cmd: "echo '--flags ENABLE_MUTEX_PRIORITY_INHERITANCE=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:synchronization_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/synchronization/synchronization_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //base/third_party/double_conversion:double_conversion
+cc_library_static {
+ name: "cronet_aml_base_third_party_double_conversion_double_conversion",
+ srcs: [
+ "base/third_party/double_conversion/double-conversion/bignum-dtoa.cc",
+ "base/third_party/double_conversion/double-conversion/bignum.cc",
+ "base/third_party/double_conversion/double-conversion/cached-powers.cc",
+ "base/third_party/double_conversion/double-conversion/double-to-string.cc",
+ "base/third_party/double_conversion/double-conversion/fast-dtoa.cc",
+ "base/third_party/double_conversion/double-conversion/fixed-dtoa.cc",
+ "base/third_party/double_conversion/double-conversion/string-to-double.cc",
+ "base/third_party/double_conversion/double-conversion/strtod.cc",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //base/third_party/dynamic_annotations:dynamic_annotations
+cc_library_static {
+ name: "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ srcs: [
+ "base/third_party/dynamic_annotations/dynamic_annotations.c",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //base:tracing_buildflags
+genrule {
+ name: "cronet_aml_base_tracing_buildflags",
+ cmd: "echo '--flags ENABLE_BASE_TRACING=\"false\" USE_PERFETTO_CLIENT_LIBRARY=\"false\" OPTIONAL_TRACE_EVENTS_ENABLED=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//base:tracing_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "base/tracing_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //build:branding_buildflags
+genrule {
+ name: "cronet_aml_build_branding_buildflags",
+ cmd: "echo '--flags CHROMIUM_BRANDING=\"1\" GOOGLE_CHROME_BRANDING=\"0\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//build:branding_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "build/branding_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //build:buildflag_header_h
+filegroup {
+ name: "cronet_aml_build_buildflag_header_h",
+}
+
+// GN: //build:chromecast_buildflags
+genrule {
+ name: "cronet_aml_build_chromecast_buildflags",
+ cmd: "echo '--flags IS_CASTOS=\"false\" IS_CAST_ANDROID=\"false\" ENABLE_CAST_RECEIVER=\"false\" IS_CHROMECAST=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//build:chromecast_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "build/chromecast_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //build:chromeos_buildflags
+genrule {
+ name: "cronet_aml_build_chromeos_buildflags",
+ cmd: "echo '--flags IS_CHROMEOS_DEVICE=\"false\" IS_CHROMEOS_LACROS=\"false\" IS_CHROMEOS_ASH=\"false\" IS_CHROMEOS_WITH_HW_DETAILS=\"false\" IS_REVEN=\"false\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//build:chromeos_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "build/chromeos_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //build/config/compiler:compiler_buildflags
+genrule {
+ name: "cronet_aml_build_config_compiler_compiler_buildflags",
+ cmd: "echo '--flags CLANG_PGO=\"0\" SYMBOL_LEVEL=\"1\"' | " +
+ "$(location build/write_buildflag_header.py) --output " +
+ "$(out) " +
+ "--rulename " +
+ "//build/config/compiler:compiler_buildflags " +
+ "--gen-dir " +
+ ". " +
+ "--definitions " +
+ "/dev/stdin",
+ out: [
+ "build/config/compiler/compiler_buildflags.h",
+ ],
+ tool_files: [
+ "build/write_buildflag_header.py",
+ ],
+}
+
+// GN: //gn:default_deps
+cc_defaults {
+ name: "cronet_aml_defaults",
+ cflags: [
+ "-O2",
+ "-Wno-error=return-type",
+ "-Wno-missing-field-initializers",
+ "-Wno-non-virtual-dtor",
+ "-Wno-sign-compare",
+ "-Wno-sign-promo",
+ "-Wno-unused-parameter",
+ "-fvisibility=hidden",
+ ],
+ stl: "none",
+}
+
+// GN: //third_party/abseil-cpp:absl
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl",
+}
+
+// GN: //third_party/abseil-cpp/absl/algorithm:algorithm
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
+}
+
+// GN: //third_party/abseil-cpp/absl/algorithm:container
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:atomic_hook
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:base
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/cycleclock.cc",
+ "third_party/abseil-cpp/absl/base/internal/spinlock.cc",
+ "third_party/abseil-cpp/absl/base/internal/sysinfo.cc",
+ "third_party/abseil-cpp/absl/base/internal/thread_identity.cc",
+ "third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:base_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:config
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_config",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:core_headers
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:cycleclock_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:dynamic_annotations
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:endian
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_endian",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:errno_saver
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:fast_type_id
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:log_severity
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/log_severity.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:malloc_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:prefetch
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
+}
+
+// GN: //third_party/abseil-cpp/absl/base:raw_logging_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/raw_logging.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:spinlock_wait
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:strerror
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/strerror.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/base:throw_delegate
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ srcs: [
+ "third_party/abseil-cpp/absl/base/internal/throw_delegate.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/cleanup:cleanup
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
+}
+
+// GN: //third_party/abseil-cpp/absl/cleanup:cleanup_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:btree
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_btree",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:common
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_common",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:common_policy_traits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:compressed_tuple
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:container_memory
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:fixed_array
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:flat_hash_map
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:flat_hash_set
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:hash_function_defaults
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:hash_policy_traits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:hashtable_debug_hooks
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:hashtablez_sampler
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ srcs: [
+ "third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc",
+ "third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/container:inlined_vector
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:inlined_vector_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:layout
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_layout",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:node_hash_map
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:node_hash_set
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:node_slot_policy
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:raw_hash_map
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
+}
+
+// GN: //third_party/abseil-cpp/absl/container:raw_hash_set
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ srcs: [
+ "third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:debugging_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc",
+ "third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc",
+ "third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:demangle_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/internal/demangle.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:examine_stack
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:failure_signal_handler
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:stacktrace
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/stacktrace.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/debugging:symbolize
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ srcs: [
+ "third_party/abseil-cpp/absl/debugging/symbolize.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/functional:any_invocable
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
+}
+
+// GN: //third_party/abseil-cpp/absl/functional:bind_front
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
+}
+
+// GN: //third_party/abseil-cpp/absl/functional:function_ref
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
+}
+
+// GN: //third_party/abseil-cpp/absl/hash:city
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ srcs: [
+ "third_party/abseil-cpp/absl/hash/internal/city.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/hash:hash
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ srcs: [
+ "third_party/abseil-cpp/absl/hash/internal/hash.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/hash:low_level_hash
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ srcs: [
+ "third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/memory:memory
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_memory_memory",
+}
+
+// GN: //third_party/abseil-cpp/absl/meta:type_traits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
+}
+
+// GN: //third_party/abseil-cpp/absl/numeric:bits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
+}
+
+// GN: //third_party/abseil-cpp/absl/numeric:int128
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ srcs: [
+ "third_party/abseil-cpp/absl/numeric/int128.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/numeric:representation
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
+}
+
+// GN: //third_party/abseil-cpp/absl/profiling:exponential_biased
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ srcs: [
+ "third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/profiling:sample_recorder
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
+}
+
+// GN: //third_party/abseil-cpp/absl/random:distributions
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/discrete_distribution.cc",
+ "third_party/abseil-cpp/absl/random/gaussian_distribution.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:distribution_caller
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:fast_uniform_bits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:fastmath
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:generate_real
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:iostream_state_saver
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:nonsecure_base
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:pcg_engine
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:platform
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:pool_urbg
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/pool_urbg.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:randen
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/randen.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:randen_engine
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/randen_detect.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes_impl
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:randen_slow
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/randen_slow.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:salted_seed_seq
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:seed_material
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/internal/seed_material.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:traits
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:uniform_helper
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
+}
+
+// GN: //third_party/abseil-cpp/absl/random/internal:wide_multiply
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
+}
+
+// GN: //third_party/abseil-cpp/absl/random:random
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_random",
+}
+
+// GN: //third_party/abseil-cpp/absl/random:seed_gen_exception
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/seed_gen_exception.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/random:seed_sequences
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ srcs: [
+ "third_party/abseil-cpp/absl/random/seed_sequences.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/status:status
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ srcs: [
+ "third_party/abseil-cpp/absl/status/status.cc",
+ "third_party/abseil-cpp/absl/status/status_payload_printer.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/status:statusor
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ srcs: [
+ "third_party/abseil-cpp/absl/status/statusor.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cord
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/cord.cc",
+ "third_party/abseil-cpp/absl/strings/cord_analysis.cc",
+ "third_party/abseil-cpp/absl/strings/cord_buffer.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cord_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/cord_internal.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc",
+ "third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_functions
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_handle
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_info
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/cordz_info.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_statistics
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_update_scope
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:cordz_update_tracker
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/escaping.cc",
+ "third_party/abseil-cpp/absl/strings/internal/ostringstream.cc",
+ "third_party/abseil-cpp/absl/strings/internal/utf8.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:str_format
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:str_format_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc",
+ "third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc",
+ "third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc",
+ "third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc",
+ "third_party/abseil-cpp/absl/strings/internal/str_format/output.cc",
+ "third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/strings:strings
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ srcs: [
+ "third_party/abseil-cpp/absl/strings/ascii.cc",
+ "third_party/abseil-cpp/absl/strings/charconv.cc",
+ "third_party/abseil-cpp/absl/strings/escaping.cc",
+ "third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc",
+ "third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc",
+ "third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc",
+ "third_party/abseil-cpp/absl/strings/internal/memutil.cc",
+ "third_party/abseil-cpp/absl/strings/match.cc",
+ "third_party/abseil-cpp/absl/strings/numbers.cc",
+ "third_party/abseil-cpp/absl/strings/str_cat.cc",
+ "third_party/abseil-cpp/absl/strings/str_replace.cc",
+ "third_party/abseil-cpp/absl/strings/str_split.cc",
+ "third_party/abseil-cpp/absl/strings/string_view.cc",
+ "third_party/abseil-cpp/absl/strings/substitute.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/synchronization:graphcycles_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ srcs: [
+ "third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/synchronization:kernel_timeout_internal
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
+}
+
+// GN: //third_party/abseil-cpp/absl/synchronization:synchronization
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ srcs: [
+ "third_party/abseil-cpp/absl/synchronization/barrier.cc",
+ "third_party/abseil-cpp/absl/synchronization/blocking_counter.cc",
+ "third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc",
+ "third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc",
+ "third_party/abseil-cpp/absl/synchronization/internal/waiter.cc",
+ "third_party/abseil-cpp/absl/synchronization/mutex.cc",
+ "third_party/abseil-cpp/absl/synchronization/notification.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/time/internal/cctz:civil_time
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ srcs: [
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/time/internal/cctz:time_zone
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ srcs: [
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc",
+ "third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/time:time
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ srcs: [
+ "third_party/abseil-cpp/absl/time/civil_time.cc",
+ "third_party/abseil-cpp/absl/time/clock.cc",
+ "third_party/abseil-cpp/absl/time/duration.cc",
+ "third_party/abseil-cpp/absl/time/format.cc",
+ "third_party/abseil-cpp/absl/time/time.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/types:bad_optional_access
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ srcs: [
+ "third_party/abseil-cpp/absl/types/bad_optional_access.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/types:bad_variant_access
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ srcs: [
+ "third_party/abseil-cpp/absl/types/bad_variant_access.cc",
+ ],
+}
+
+// GN: //third_party/abseil-cpp/absl/types:compare
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_compare",
+}
+
+// GN: //third_party/abseil-cpp/absl/types:optional
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_optional",
+}
+
+// GN: //third_party/abseil-cpp/absl/types:span
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_span",
+}
+
+// GN: //third_party/abseil-cpp/absl/types:variant
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_types_variant",
+}
+
+// GN: //third_party/abseil-cpp/absl/utility:utility
+filegroup {
+ name: "cronet_aml_third_party_abseil_cpp_absl_utility_utility",
+}
+
+// GN: //third_party/android_ndk:cpu_features
+filegroup {
+ name: "cronet_aml_third_party_android_ndk_cpu_features",
+ srcs: [
+ "third_party/android_ndk/sources/android/cpufeatures/cpu-features.c",
+ ],
+}
+
+// GN: //third_party/ashmem:ashmem
+filegroup {
+ name: "cronet_aml_third_party_ashmem_ashmem",
+ srcs: [
+ "third_party/ashmem/ashmem-dev.c",
+ ],
+}
+
+// GN: //third_party/boringssl:boringssl
+cc_library_static {
+ name: "cronet_aml_third_party_boringssl_boringssl",
+ srcs: [
+ ":cronet_aml_third_party_boringssl_boringssl_asm",
+ ":cronet_aml_third_party_boringssl_src_third_party_fiat_fiat_license",
+ "third_party/boringssl/err_data.c",
+ "third_party/boringssl/src/crypto/asn1/a_bitstr.c",
+ "third_party/boringssl/src/crypto/asn1/a_bool.c",
+ "third_party/boringssl/src/crypto/asn1/a_d2i_fp.c",
+ "third_party/boringssl/src/crypto/asn1/a_dup.c",
+ "third_party/boringssl/src/crypto/asn1/a_gentm.c",
+ "third_party/boringssl/src/crypto/asn1/a_i2d_fp.c",
+ "third_party/boringssl/src/crypto/asn1/a_int.c",
+ "third_party/boringssl/src/crypto/asn1/a_mbstr.c",
+ "third_party/boringssl/src/crypto/asn1/a_object.c",
+ "third_party/boringssl/src/crypto/asn1/a_octet.c",
+ "third_party/boringssl/src/crypto/asn1/a_print.c",
+ "third_party/boringssl/src/crypto/asn1/a_strex.c",
+ "third_party/boringssl/src/crypto/asn1/a_strnid.c",
+ "third_party/boringssl/src/crypto/asn1/a_time.c",
+ "third_party/boringssl/src/crypto/asn1/a_type.c",
+ "third_party/boringssl/src/crypto/asn1/a_utctm.c",
+ "third_party/boringssl/src/crypto/asn1/a_utf8.c",
+ "third_party/boringssl/src/crypto/asn1/asn1_lib.c",
+ "third_party/boringssl/src/crypto/asn1/asn1_par.c",
+ "third_party/boringssl/src/crypto/asn1/asn_pack.c",
+ "third_party/boringssl/src/crypto/asn1/f_int.c",
+ "third_party/boringssl/src/crypto/asn1/f_string.c",
+ "third_party/boringssl/src/crypto/asn1/posix_time.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_dec.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_enc.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_fre.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_new.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_typ.c",
+ "third_party/boringssl/src/crypto/asn1/tasn_utl.c",
+ "third_party/boringssl/src/crypto/base64/base64.c",
+ "third_party/boringssl/src/crypto/bio/bio.c",
+ "third_party/boringssl/src/crypto/bio/bio_mem.c",
+ "third_party/boringssl/src/crypto/bio/connect.c",
+ "third_party/boringssl/src/crypto/bio/fd.c",
+ "third_party/boringssl/src/crypto/bio/file.c",
+ "third_party/boringssl/src/crypto/bio/hexdump.c",
+ "third_party/boringssl/src/crypto/bio/pair.c",
+ "third_party/boringssl/src/crypto/bio/printf.c",
+ "third_party/boringssl/src/crypto/bio/socket.c",
+ "third_party/boringssl/src/crypto/bio/socket_helper.c",
+ "third_party/boringssl/src/crypto/blake2/blake2.c",
+ "third_party/boringssl/src/crypto/bn_extra/bn_asn1.c",
+ "third_party/boringssl/src/crypto/bn_extra/convert.c",
+ "third_party/boringssl/src/crypto/buf/buf.c",
+ "third_party/boringssl/src/crypto/bytestring/asn1_compat.c",
+ "third_party/boringssl/src/crypto/bytestring/ber.c",
+ "third_party/boringssl/src/crypto/bytestring/cbb.c",
+ "third_party/boringssl/src/crypto/bytestring/cbs.c",
+ "third_party/boringssl/src/crypto/bytestring/unicode.c",
+ "third_party/boringssl/src/crypto/chacha/chacha.c",
+ "third_party/boringssl/src/crypto/cipher_extra/cipher_extra.c",
+ "third_party/boringssl/src/crypto/cipher_extra/derive_key.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_des.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_null.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_rc2.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_rc4.c",
+ "third_party/boringssl/src/crypto/cipher_extra/e_tls.c",
+ "third_party/boringssl/src/crypto/cipher_extra/tls_cbc.c",
+ "third_party/boringssl/src/crypto/conf/conf.c",
+ "third_party/boringssl/src/crypto/cpu_aarch64_apple.c",
+ "third_party/boringssl/src/crypto/cpu_aarch64_fuchsia.c",
+ "third_party/boringssl/src/crypto/cpu_aarch64_linux.c",
+ "third_party/boringssl/src/crypto/cpu_aarch64_win.c",
+ "third_party/boringssl/src/crypto/cpu_arm.c",
+ "third_party/boringssl/src/crypto/cpu_arm_linux.c",
+ "third_party/boringssl/src/crypto/cpu_intel.c",
+ "third_party/boringssl/src/crypto/cpu_ppc64le.c",
+ "third_party/boringssl/src/crypto/crypto.c",
+ "third_party/boringssl/src/crypto/curve25519/curve25519.c",
+ "third_party/boringssl/src/crypto/curve25519/spake25519.c",
+ "third_party/boringssl/src/crypto/des/des.c",
+ "third_party/boringssl/src/crypto/dh_extra/dh_asn1.c",
+ "third_party/boringssl/src/crypto/dh_extra/params.c",
+ "third_party/boringssl/src/crypto/digest_extra/digest_extra.c",
+ "third_party/boringssl/src/crypto/dsa/dsa.c",
+ "third_party/boringssl/src/crypto/dsa/dsa_asn1.c",
+ "third_party/boringssl/src/crypto/ec_extra/ec_asn1.c",
+ "third_party/boringssl/src/crypto/ec_extra/ec_derive.c",
+ "third_party/boringssl/src/crypto/ec_extra/hash_to_curve.c",
+ "third_party/boringssl/src/crypto/ecdh_extra/ecdh_extra.c",
+ "third_party/boringssl/src/crypto/ecdsa_extra/ecdsa_asn1.c",
+ "third_party/boringssl/src/crypto/engine/engine.c",
+ "third_party/boringssl/src/crypto/err/err.c",
+ "third_party/boringssl/src/crypto/evp/evp.c",
+ "third_party/boringssl/src/crypto/evp/evp_asn1.c",
+ "third_party/boringssl/src/crypto/evp/evp_ctx.c",
+ "third_party/boringssl/src/crypto/evp/p_dsa_asn1.c",
+ "third_party/boringssl/src/crypto/evp/p_ec.c",
+ "third_party/boringssl/src/crypto/evp/p_ec_asn1.c",
+ "third_party/boringssl/src/crypto/evp/p_ed25519.c",
+ "third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c",
+ "third_party/boringssl/src/crypto/evp/p_hkdf.c",
+ "third_party/boringssl/src/crypto/evp/p_rsa.c",
+ "third_party/boringssl/src/crypto/evp/p_rsa_asn1.c",
+ "third_party/boringssl/src/crypto/evp/p_x25519.c",
+ "third_party/boringssl/src/crypto/evp/p_x25519_asn1.c",
+ "third_party/boringssl/src/crypto/evp/pbkdf.c",
+ "third_party/boringssl/src/crypto/evp/print.c",
+ "third_party/boringssl/src/crypto/evp/scrypt.c",
+ "third_party/boringssl/src/crypto/evp/sign.c",
+ "third_party/boringssl/src/crypto/ex_data.c",
+ "third_party/boringssl/src/crypto/fipsmodule/bcm.c",
+ "third_party/boringssl/src/crypto/fipsmodule/fips_shared_support.c",
+ "third_party/boringssl/src/crypto/hkdf/hkdf.c",
+ "third_party/boringssl/src/crypto/hpke/hpke.c",
+ "third_party/boringssl/src/crypto/hrss/hrss.c",
+ "third_party/boringssl/src/crypto/lhash/lhash.c",
+ "third_party/boringssl/src/crypto/mem.c",
+ "third_party/boringssl/src/crypto/obj/obj.c",
+ "third_party/boringssl/src/crypto/obj/obj_xref.c",
+ "third_party/boringssl/src/crypto/pem/pem_all.c",
+ "third_party/boringssl/src/crypto/pem/pem_info.c",
+ "third_party/boringssl/src/crypto/pem/pem_lib.c",
+ "third_party/boringssl/src/crypto/pem/pem_oth.c",
+ "third_party/boringssl/src/crypto/pem/pem_pk8.c",
+ "third_party/boringssl/src/crypto/pem/pem_pkey.c",
+ "third_party/boringssl/src/crypto/pem/pem_x509.c",
+ "third_party/boringssl/src/crypto/pem/pem_xaux.c",
+ "third_party/boringssl/src/crypto/pkcs7/pkcs7.c",
+ "third_party/boringssl/src/crypto/pkcs7/pkcs7_x509.c",
+ "third_party/boringssl/src/crypto/pkcs8/p5_pbev2.c",
+ "third_party/boringssl/src/crypto/pkcs8/pkcs8.c",
+ "third_party/boringssl/src/crypto/pkcs8/pkcs8_x509.c",
+ "third_party/boringssl/src/crypto/poly1305/poly1305.c",
+ "third_party/boringssl/src/crypto/poly1305/poly1305_arm.c",
+ "third_party/boringssl/src/crypto/poly1305/poly1305_vec.c",
+ "third_party/boringssl/src/crypto/pool/pool.c",
+ "third_party/boringssl/src/crypto/rand_extra/deterministic.c",
+ "third_party/boringssl/src/crypto/rand_extra/forkunsafe.c",
+ "third_party/boringssl/src/crypto/rand_extra/fuchsia.c",
+ "third_party/boringssl/src/crypto/rand_extra/passive.c",
+ "third_party/boringssl/src/crypto/rand_extra/rand_extra.c",
+ "third_party/boringssl/src/crypto/rand_extra/windows.c",
+ "third_party/boringssl/src/crypto/rc4/rc4.c",
+ "third_party/boringssl/src/crypto/refcount_c11.c",
+ "third_party/boringssl/src/crypto/refcount_lock.c",
+ "third_party/boringssl/src/crypto/rsa_extra/rsa_asn1.c",
+ "third_party/boringssl/src/crypto/rsa_extra/rsa_print.c",
+ "third_party/boringssl/src/crypto/siphash/siphash.c",
+ "third_party/boringssl/src/crypto/stack/stack.c",
+ "third_party/boringssl/src/crypto/thread.c",
+ "third_party/boringssl/src/crypto/thread_none.c",
+ "third_party/boringssl/src/crypto/thread_pthread.c",
+ "third_party/boringssl/src/crypto/thread_win.c",
+ "third_party/boringssl/src/crypto/trust_token/pmbtoken.c",
+ "third_party/boringssl/src/crypto/trust_token/trust_token.c",
+ "third_party/boringssl/src/crypto/trust_token/voprf.c",
+ "third_party/boringssl/src/crypto/x509/a_digest.c",
+ "third_party/boringssl/src/crypto/x509/a_sign.c",
+ "third_party/boringssl/src/crypto/x509/a_verify.c",
+ "third_party/boringssl/src/crypto/x509/algorithm.c",
+ "third_party/boringssl/src/crypto/x509/asn1_gen.c",
+ "third_party/boringssl/src/crypto/x509/by_dir.c",
+ "third_party/boringssl/src/crypto/x509/by_file.c",
+ "third_party/boringssl/src/crypto/x509/i2d_pr.c",
+ "third_party/boringssl/src/crypto/x509/name_print.c",
+ "third_party/boringssl/src/crypto/x509/rsa_pss.c",
+ "third_party/boringssl/src/crypto/x509/t_crl.c",
+ "third_party/boringssl/src/crypto/x509/t_req.c",
+ "third_party/boringssl/src/crypto/x509/t_x509.c",
+ "third_party/boringssl/src/crypto/x509/t_x509a.c",
+ "third_party/boringssl/src/crypto/x509/x509.c",
+ "third_party/boringssl/src/crypto/x509/x509_att.c",
+ "third_party/boringssl/src/crypto/x509/x509_cmp.c",
+ "third_party/boringssl/src/crypto/x509/x509_d2.c",
+ "third_party/boringssl/src/crypto/x509/x509_def.c",
+ "third_party/boringssl/src/crypto/x509/x509_ext.c",
+ "third_party/boringssl/src/crypto/x509/x509_lu.c",
+ "third_party/boringssl/src/crypto/x509/x509_obj.c",
+ "third_party/boringssl/src/crypto/x509/x509_req.c",
+ "third_party/boringssl/src/crypto/x509/x509_set.c",
+ "third_party/boringssl/src/crypto/x509/x509_trs.c",
+ "third_party/boringssl/src/crypto/x509/x509_txt.c",
+ "third_party/boringssl/src/crypto/x509/x509_v3.c",
+ "third_party/boringssl/src/crypto/x509/x509_vfy.c",
+ "third_party/boringssl/src/crypto/x509/x509_vpm.c",
+ "third_party/boringssl/src/crypto/x509/x509cset.c",
+ "third_party/boringssl/src/crypto/x509/x509name.c",
+ "third_party/boringssl/src/crypto/x509/x509rset.c",
+ "third_party/boringssl/src/crypto/x509/x509spki.c",
+ "third_party/boringssl/src/crypto/x509/x_algor.c",
+ "third_party/boringssl/src/crypto/x509/x_all.c",
+ "third_party/boringssl/src/crypto/x509/x_attrib.c",
+ "third_party/boringssl/src/crypto/x509/x_crl.c",
+ "third_party/boringssl/src/crypto/x509/x_exten.c",
+ "third_party/boringssl/src/crypto/x509/x_info.c",
+ "third_party/boringssl/src/crypto/x509/x_name.c",
+ "third_party/boringssl/src/crypto/x509/x_pkey.c",
+ "third_party/boringssl/src/crypto/x509/x_pubkey.c",
+ "third_party/boringssl/src/crypto/x509/x_req.c",
+ "third_party/boringssl/src/crypto/x509/x_sig.c",
+ "third_party/boringssl/src/crypto/x509/x_spki.c",
+ "third_party/boringssl/src/crypto/x509/x_val.c",
+ "third_party/boringssl/src/crypto/x509/x_x509.c",
+ "third_party/boringssl/src/crypto/x509/x_x509a.c",
+ "third_party/boringssl/src/crypto/x509v3/pcy_cache.c",
+ "third_party/boringssl/src/crypto/x509v3/pcy_data.c",
+ "third_party/boringssl/src/crypto/x509v3/pcy_map.c",
+ "third_party/boringssl/src/crypto/x509v3/pcy_node.c",
+ "third_party/boringssl/src/crypto/x509v3/pcy_tree.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_akey.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_akeya.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_alt.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_bcons.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_bitst.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_conf.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_cpols.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_crld.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_enum.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_extku.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_genn.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_ia5.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_info.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_int.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_lib.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_ncons.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_ocsp.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_pci.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_pcia.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_pcons.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_pmaps.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_prn.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_purp.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_skey.c",
+ "third_party/boringssl/src/crypto/x509v3/v3_utl.c",
+ "third_party/boringssl/src/ssl/bio_ssl.cc",
+ "third_party/boringssl/src/ssl/d1_both.cc",
+ "third_party/boringssl/src/ssl/d1_lib.cc",
+ "third_party/boringssl/src/ssl/d1_pkt.cc",
+ "third_party/boringssl/src/ssl/d1_srtp.cc",
+ "third_party/boringssl/src/ssl/dtls_method.cc",
+ "third_party/boringssl/src/ssl/dtls_record.cc",
+ "third_party/boringssl/src/ssl/encrypted_client_hello.cc",
+ "third_party/boringssl/src/ssl/extensions.cc",
+ "third_party/boringssl/src/ssl/handoff.cc",
+ "third_party/boringssl/src/ssl/handshake.cc",
+ "third_party/boringssl/src/ssl/handshake_client.cc",
+ "third_party/boringssl/src/ssl/handshake_server.cc",
+ "third_party/boringssl/src/ssl/s3_both.cc",
+ "third_party/boringssl/src/ssl/s3_lib.cc",
+ "third_party/boringssl/src/ssl/s3_pkt.cc",
+ "third_party/boringssl/src/ssl/ssl_aead_ctx.cc",
+ "third_party/boringssl/src/ssl/ssl_asn1.cc",
+ "third_party/boringssl/src/ssl/ssl_buffer.cc",
+ "third_party/boringssl/src/ssl/ssl_cert.cc",
+ "third_party/boringssl/src/ssl/ssl_cipher.cc",
+ "third_party/boringssl/src/ssl/ssl_file.cc",
+ "third_party/boringssl/src/ssl/ssl_key_share.cc",
+ "third_party/boringssl/src/ssl/ssl_lib.cc",
+ "third_party/boringssl/src/ssl/ssl_privkey.cc",
+ "third_party/boringssl/src/ssl/ssl_session.cc",
+ "third_party/boringssl/src/ssl/ssl_stat.cc",
+ "third_party/boringssl/src/ssl/ssl_transcript.cc",
+ "third_party/boringssl/src/ssl/ssl_versions.cc",
+ "third_party/boringssl/src/ssl/ssl_x509.cc",
+ "third_party/boringssl/src/ssl/t1_enc.cc",
+ "third_party/boringssl/src/ssl/tls13_both.cc",
+ "third_party/boringssl/src/ssl/tls13_client.cc",
+ "third_party/boringssl/src/ssl/tls13_enc.cc",
+ "third_party/boringssl/src/ssl/tls13_server.cc",
+ "third_party/boringssl/src/ssl/tls_method.cc",
+ "third_party/boringssl/src/ssl/tls_record.cc",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DBORINGSSL_ALLOW_CXX_RUNTIME",
+ "-DBORINGSSL_IMPLEMENTATION",
+ "-DBORINGSSL_NO_STATIC_INITIALIZER",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-DOPENSSL_SMALL",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/boringssl/src/include/",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //third_party/boringssl:boringssl_asm
+filegroup {
+ name: "cronet_aml_third_party_boringssl_boringssl_asm",
+}
+
+// GN: //third_party/boringssl/src/third_party/fiat:fiat_license
+filegroup {
+ name: "cronet_aml_third_party_boringssl_src_third_party_fiat_fiat_license",
+}
+
+// GN: //third_party/icu:icui18n
+cc_library_static {
+ name: "cronet_aml_third_party_icu_icui18n",
+ static_libs: [
+ "cronet_aml_third_party_icu_icuuc_private",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_DLOPEN=0",
+ "-DHAVE_SYS_UIO_H",
+ "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
+ "-DUCONFIG_ONLY_HTML_CONVERSION=1",
+ "-DUCONFIG_USE_WINDOWS_LCID_MAPPING_API=0",
+ "-DUSE_CHROMIUM_ICU=1",
+ "-DU_CHARSET_IS_UTF8=1",
+ "-DU_ENABLE_DYLOAD=0",
+ "-DU_ENABLE_RESOURCE_TRACING=0",
+ "-DU_ENABLE_TRACING=1",
+ "-DU_I18N_IMPLEMENTATION",
+ "-DU_STATIC_IMPLEMENTATION",
+ "-DU_USING_ICU_NAMESPACE=0",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/icu/source/common/",
+ "third_party/icu/source/i18n/",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //third_party/icu:icuuc_private
+cc_library_static {
+ name: "cronet_aml_third_party_icu_icuuc_private",
+ srcs: [
+ ":cronet_aml_third_party_icu_icuuc_public",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_DLOPEN=0",
+ "-DHAVE_SYS_UIO_H",
+ "-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE",
+ "-DUCONFIG_ONLY_HTML_CONVERSION=1",
+ "-DUCONFIG_USE_WINDOWS_LCID_MAPPING_API=0",
+ "-DUSE_CHROMIUM_ICU=1",
+ "-DU_CHARSET_IS_UTF8=1",
+ "-DU_COMMON_IMPLEMENTATION",
+ "-DU_ENABLE_DYLOAD=0",
+ "-DU_ENABLE_RESOURCE_TRACING=0",
+ "-DU_ENABLE_TRACING=1",
+ "-DU_ICUDATAENTRY_IN_COMMON",
+ "-DU_STATIC_IMPLEMENTATION",
+ "-DU_USING_ICU_NAMESPACE=0",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/icu/source/common/",
+ "third_party/icu/source/i18n/",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //third_party/icu:icuuc_public
+filegroup {
+ name: "cronet_aml_third_party_icu_icuuc_public",
+}
+
+// GN: //third_party/libevent:libevent
+cc_library_static {
+ name: "cronet_aml_third_party_libevent_libevent",
+ srcs: [
+ "third_party/libevent/buffer.c",
+ "third_party/libevent/epoll.c",
+ "third_party/libevent/evbuffer.c",
+ "third_party/libevent/evdns.c",
+ "third_party/libevent/event.c",
+ "third_party/libevent/event_tagging.c",
+ "third_party/libevent/evrpc.c",
+ "third_party/libevent/evutil.c",
+ "third_party/libevent/http.c",
+ "third_party/libevent/log.c",
+ "third_party/libevent/poll.c",
+ "third_party/libevent/select.c",
+ "third_party/libevent/signal.c",
+ "third_party/libevent/strlcpy.c",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_CONFIG_H",
+ "-DHAVE_SYS_UIO_H",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ "third_party/libevent/android/",
+ ],
+ cpp_std: "c++20",
+}
+
+// GN: //third_party/modp_b64:modp_b64
+cc_library_static {
+ name: "cronet_aml_third_party_modp_b64_modp_b64",
+ srcs: [
+ "third_party/modp_b64/modp_b64.cc",
+ ],
+ defaults: [
+ "cronet_aml_defaults",
+ ],
+ cflags: [
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r23_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-16-init-8697-g60809cd2-1\"",
+ "-DCR_LIBCXX_REVISION=47b31179d10646029c260702650a25d24f555acc",
+ "-DDCHECK_ALWAYS_ON=1",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-DHAVE_SYS_UIO_H",
+ "-D_DEBUG",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED=1",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=1",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++20",
+}
+
diff --git a/tools/gn2bp/desc.json b/tools/gn2bp/desc.json
new file mode 100644
index 0000000..3e97db5
--- /dev/null
+++ b/tools/gn2bp/desc.json
Binary files differ
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index cacb051..0a73a19 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -28,6 +28,7 @@
import argparse
import collections
import json
+import logging as log
import os
import re
import sys
@@ -98,9 +99,6 @@
# Compiler flags which are passed through to the blueprint.
cflag_allowlist = r'^-DPERFETTO.*$'
-# Compiler defines which are passed through to the blueprint.
-define_allowlist = r'^(GOOGLE_PROTO.*)|(ZLIB_.*)|(USE_MMAP)|(HAVE_HIDDEN)$'
-
# Additional arguments to apply to Android.bp rules.
additional_args = {
# TODO: remove if this is not useful for the cronet build.
@@ -341,10 +339,11 @@
self.local_include_dirs = set()
self.header_libs = set()
self.required = set()
- self.tool_files = None
+ self.tool_files = set()
self.android = Target('android')
self.host = Target('host')
self.stl = None
+ self.cpp_std = None
self.dist = dict()
self.strip = dict()
self.data = set()
@@ -356,6 +355,7 @@
self.genrule_headers = set()
self.genrule_srcs = set()
self.genrule_shared_libs = set()
+ self.genrule_header_libs = set()
self.version_script = None
self.test_suites = set()
self.test_config = None
@@ -393,6 +393,7 @@
self._output_field(output, 'tool_files')
self._output_field(output, 'data')
self._output_field(output, 'stl')
+ self._output_field(output, 'cpp_std')
self._output_field(output, 'apex_available')
self._output_field(output, 'min_sdk_version')
self._output_field(output, 'version_script')
@@ -469,7 +470,7 @@
def is_supported_source_file(name):
"""Returns True if |name| can appear in a 'srcs' list."""
- return os.path.splitext(name)[1] in ['.c', '.cc', '.proto']
+ return os.path.splitext(name)[1] in ['.c', '.cc', '.java', '.proto']
def create_proto_modules(blueprint, gn, target):
@@ -600,9 +601,7 @@
def create_amalgamated_sql_metrics_module(blueprint, target):
bp_module_name = label_to_module_name(target.name)
module = Module('genrule', bp_module_name, target.name)
- module.tool_files = [
- 'tools/gen_amalgamated_sql_metrics.py',
- ]
+ module.tool_files.add('tools/gen_amalgamated_sql_metrics.py')
module.cmd = ' '.join([
'$(location tools/gen_amalgamated_sql_metrics.py)',
'--cpp_out=$(out)',
@@ -618,9 +617,7 @@
def create_cc_proto_descriptor_module(blueprint, target):
bp_module_name = label_to_module_name(target.name)
module = Module('genrule', bp_module_name, target.name)
- module.tool_files = [
- 'tools/gen_cc_proto_descriptor.py',
- ]
+ module.tool_files.add('tools/gen_cc_proto_descriptor.py')
module.cmd = ' '.join([
'$(location tools/gen_cc_proto_descriptor.py)', '--gen_dir=$(genDir)',
'--cpp_out=$(out)', '$(in)'
@@ -641,7 +638,7 @@
module = Module('genrule', bp_module_name, gn_utils.GEN_VERSION_TARGET)
script_path = gn_utils.label_to_path(target.script)
module.genrule_headers.add(bp_module_name)
- module.tool_files = [script_path]
+ module.tool_files.add(script_path)
module.out.update(target.outputs)
module.srcs.update(gn_utils.label_to_path(src) for src in target.inputs)
module.cmd = ' '.join([
@@ -670,12 +667,112 @@
blueprint.add_module(module)
+def create_action_module(blueprint, target):
+ bp_module_name = label_to_module_name(target.name)
+ module = Module('genrule', bp_module_name, target.name)
+
+ # Convert ['--param=value'] to ['--param', 'value'] for consistency.
+ # TODO: we may want to only do this for python scripts arguments. If argparse
+ # is used, this transformation is safe.
+ target.args = [str for it in target.args for str in it.split('=')]
+
+ if target.script == "//build/write_buildflag_header.py":
+ # write_buildflag_header.py writes result to args.genDir/args.output
+ # So, override args.genDir by '.' so that args.output=$(out) works
+ for i, val in enumerate(target.args):
+ if val == '--gen-dir':
+ target.args[i + 1] = '.'
+ break
+
+ elif target.script == '//base/android/jni_generator/jni_generator.py':
+ # chromium builds against a prebuilt ndk that contains the jni_headers, so
+ # a dependency is never explicitly created.
+ module.genrule_header_libs.add('jni_headers')
+ needs_javap = False
+ for i, val in enumerate(target.args):
+ if val == '--output_dir':
+ # replace --output_dir gen/jni_headers/... with --output_dir $(genDir)/...
+ target.args[i + 1] = re.sub('^gen/jni_headers', '$(genDir)', target.args[i + 1])
+ if val == '--input_file':
+ # --input_file supports both .class specifiers or source files as arguments.
+ # Only source files need to be wrapped inside a $(location <label>) tag.
+ if re.match('.*\.class$', target.args[i + 1]):
+ continue
+ # replace --input_file ../../... with --input_file $(location ...)
+ # TODO: put inside function
+ filename = re.sub('^\.\./\.\./', '', target.args[i + 1])
+ target.args[i + 1] = '$(location %s)' % filename
+ if val == '--includes' and 'jni_generator_helper' in target.args[i + 1]:
+ # delete all leading ../
+ target.args[i + 1] = re.sub('^(\.\./)+', '', target.args[i + 1])
+ if val == '--prev_output_dir':
+ # this is not needed for aosp builds.
+ target.args[i] = ''
+ target.args[i + 1] = ''
+ if val == '--jar_file':
+ # delete leading ../../ and add path to javap
+ filename = re.sub('^\.\./\.\./', '', target.args[i + 1])
+ target.args[i + 1] = '$(location %s)' % filename
+ needs_javap = True
+
+ if needs_javap:
+ target.args.append('--javap')
+ target.args.append('$$(find out/.path -name javap)')
+ # fix target.output directory to match #include statements.
+ target.outputs = [re.sub('^jni_headers/', '', out) for out in target.outputs]
+
+ script = gn_utils.label_to_path(target.script)
+ module.tool_files.add(script)
+
+ # Replace arg by {$out} if possible
+ if len(target.outputs) == 1:
+ out = list(target.outputs)[0]
+ target.args = ['$(out)' if arg == out or arg == 'gen/' + out else arg for arg in target.args]
+
+ # Handle passing parameters via response file by piping them into the script
+ # and reading them from /dev/stdin.
+ response_file = '{{response_file_name}}'
+ use_response_file = response_file in target.args
+ if use_response_file:
+ # Replace {{response_file_contents}} with /dev/stdin
+ target.args = ['/dev/stdin' if it == response_file else it for it in target.args]
+
+ # put all args on a new line for better diffs.
+ NEWLINE = ' " +\n "'
+ arg_string = NEWLINE.join(target.args)
+ module.cmd = '$(location %s) %s' % (script, arg_string)
+
+ if use_response_file:
+ # Pipe response file contents into script
+ module.cmd = 'echo \'%s\' |%s%s' % (target.response_file_contents, NEWLINE, module.cmd)
+
+ if all(os.path.splitext(it)[1] == '.h' for it in target.outputs):
+ module.genrule_headers.add(bp_module_name)
+
+ # gn treats inputs and sources for actions equally.
+ # soong only supports source files inside srcs, non-source files are added as
+ # tool_files dependency.
+ for it in target.sources or target.inputs:
+ if is_supported_source_file(it):
+ module.srcs.add(gn_utils.label_to_path(it))
+ else:
+ module.tool_files.add(gn_utils.label_to_path(it))
+
+ # Actions using template "action_with_pydeps" also put script inside inputs.
+ # TODO: it might make sense to filter inputs inside GnParser.
+ if script in module.srcs:
+ module.srcs.remove(script)
+
+ module.out.update(target.outputs)
+ blueprint.add_module(module)
+ return module
+
+
def _get_cflags(target):
cflags = {flag for flag in target.cflags if re.match(cflag_allowlist, flag)}
- cflags |= set("-D%s" % define
- for define in target.defines
- if re.match(define_allowlist, define))
+ # Consider proper allowlist or denylist if needed
+ cflags |= set("-D%s" % define.replace("\"", "\\\"") for define in target.defines)
return cflags
@@ -694,6 +791,7 @@
if bp_module_name in blueprint.modules:
return blueprint.modules[bp_module_name]
target = gn.get_target(gn_target_name)
+ log.info('create modules for %s (%s)', target.name, target.type)
name_without_toolchain = gn_utils.label_without_toolchain(target.name)
if target.type == 'executable':
@@ -727,7 +825,13 @@
name_without_toolchain == gn_utils.GEN_VERSION_TARGET:
module = create_gen_version_module(blueprint, target, bp_module_name)
else:
- raise Error('Unhandled action: {}'.format(target.name))
+ module = create_action_module(blueprint, target)
+ elif target.type == 'copy':
+ # TODO: careful now! copy targets are not supported yet, but this will stop
+ # traversing the dependency tree. For //base:base, this is not a big
+ # problem as libicu contains the only copy target which happens to be a
+ # leaf node.
+ return None
else:
raise Error('Unknown target %s (%s)' % (target.name, target.type))
@@ -741,7 +845,21 @@
if target.type in gn_utils.LINKER_UNIT_TYPES:
module.cflags.update(_get_cflags(target))
- module.local_include_dirs.update(gn_utils.label_to_path(it) for it in target.include_dirs)
+ # TODO: implement proper cflag parsing.
+ for flag in target.cflags:
+ if '-std=' in flag:
+ module.cpp_std = flag[len('-std='):]
+ if '-isystem' in flag:
+ module.local_include_dirs.add(flag[len('-isystem../../'):])
+
+ # Adding local_include_dirs is necessary due to source_sets / filegroups
+ # which do not properly propagate include directories.
+ # Filter any directory inside //out as a) this directory does not exist for
+ # aosp / soong builds and b) the include directory should already be
+ # configured via library dependency.
+ module.local_include_dirs.update([gn_utils.label_to_path(d)
+ for d in target.include_dirs
+ if not re.match('^//out/.*', d)])
module_is_compiled = module.type not in ('genrule', 'filegroup')
if module_is_compiled:
@@ -783,33 +901,16 @@
# dep_name is an unmangled GN target name (e.g. //foo:bar(toolchain)).
all_deps = target.deps | target.source_set_deps | target.transitive_proto_deps
for dep_name in all_deps:
- # If the dependency refers to a library which we can replace with an
- # Android equivalent, stop recursing and patch the dependency in.
- # Don't recurse into //buildtools, builtin_deps are intercepted at
- # the //gn:xxx level.
- if dep_name.startswith('//buildtools'):
- continue
-
- # Ignore the dependency on the gen_buildflags genrule. That is run
- # separately in this generator and the generated file is copied over
- # into the repo (see usage of |buildflags_dir| in this script).
- if dep_name.startswith(gn_utils.BUILDFLAGS_TARGET):
- continue
-
- dep_module = create_modules_from_target(blueprint, gn, dep_name)
-
- # For filegroups and genrule, recurse but don't apply the deps.
- if not module_is_compiled:
- continue
-
# |builtin_deps| override GN deps with Android-specific ones. See the
# config in the top of this file.
if gn_utils.label_without_toolchain(dep_name) in builtin_deps:
builtin_deps[gn_utils.label_without_toolchain(dep_name)](module)
continue
- # Don't recurse in any other //gn dep if not handled by builtin_deps.
- if dep_name.startswith('//gn:'):
+ dep_module = create_modules_from_target(blueprint, gn, dep_name)
+
+ # For filegroups and genrule, recurse but don't apply the deps.
+ if not module_is_compiled:
continue
if dep_module is None:
@@ -824,6 +925,7 @@
module.generated_headers.update(dep_module.genrule_headers)
module.srcs.update(dep_module.genrule_srcs)
module.shared_libs.update(dep_module.genrule_shared_libs)
+ module.header_libs.update(dep_module.genrule_header_libs)
elif dep_module.type == 'cc_binary':
continue # Ignore executables deps (used by cmdline integration tests).
else:
@@ -841,12 +943,15 @@
defaults = Module('cc_defaults', defaults_module, '//gn:default_deps')
defaults.cflags = [
'-Wno-error=return-type',
+ '-Wno-non-virtual-dtor',
+ '-Wno-missing-field-initializers',
'-Wno-sign-compare',
'-Wno-sign-promo',
'-Wno-unused-parameter',
'-fvisibility=hidden',
'-O2',
]
+ defaults.stl = 'none'
blueprint.add_module(defaults)
for target in targets:
@@ -873,12 +978,21 @@
default=os.path.join(gn_utils.repo_root(), 'Android.bp'),
)
parser.add_argument(
+ '-v',
+ '--verbose',
+ help='Print debug logs.',
+ action='store_true',
+ )
+ parser.add_argument(
'targets',
nargs=argparse.REMAINDER,
help='Targets to include in the blueprint (e.g., "//:perfetto_tests")'
)
args = parser.parse_args()
+ if args.verbose:
+ log.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s', level=log.DEBUG)
+
with open(args.desc) as f:
desc = json.load(f)
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 95f677a..686003c 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -39,114 +39,12 @@
}
-def _check_command_output(cmd, cwd):
- try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, cwd=cwd)
- except subprocess.CalledProcessError as e:
- print(
- 'Command "{}" failed in {}:'.format(' '.join(cmd), cwd),
- file=sys.stderr)
- print(e.output.decode(), file=sys.stderr)
- sys.exit(1)
- else:
- return output.decode()
-
-
def repo_root():
"""Returns an absolute path to the repository root."""
return os.path.join(
os.path.realpath(os.path.dirname(__file__)), os.path.pardir)
-def _tool_path(name, system_buildtools=False):
- # Pass-through to use name if the caller requests to use the system
- # toolchain.
- if system_buildtools:
- return [name]
- wrapper = os.path.abspath(
- os.path.join(repo_root(), 'tools', 'run_buildtools_binary.py'))
- return ['python3', wrapper, name]
-
-
-def prepare_out_directory(gn_args,
- name,
- root=repo_root(),
- system_buildtools=False):
- """Creates the JSON build description by running GN.
-
- Returns (path, desc) where |path| is the location of the output directory
- and |desc| is the JSON build description.
- """
- out = os.path.join(root, 'out', name)
- try:
- os.makedirs(out)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
- _check_command_output(
- _tool_path('gn', system_buildtools) +
- ['gen', out, '--args=%s' % gn_args],
- cwd=repo_root())
- return out
-
-
-def load_build_description(out, system_buildtools=False):
- """Creates the JSON build description by running GN."""
- desc = _check_command_output(
- _tool_path('gn', system_buildtools) +
- ['desc', out, '--format=json', '--all-toolchains', '//*'],
- cwd=repo_root())
- return json.loads(desc)
-
-
-def create_build_description(gn_args, root=repo_root()):
- """Prepares a GN out directory and loads the build description from it.
-
- The temporary out directory is automatically deleted.
- """
- out = prepare_out_directory(gn_args, 'tmp.gn_utils', root=root)
- try:
- return load_build_description(out)
- finally:
- shutil.rmtree(out)
-
-
-def build_targets(out, targets, quiet=False, system_buildtools=False):
- """Runs ninja to build a list of GN targets in the given out directory.
-
- Compiling these targets is required so that we can include any generated
- source files in the amalgamated result.
- """
- targets = [t.replace('//', '') for t in targets]
- with open(os.devnull, 'w') as devnull:
- stdout = devnull if quiet else None
- cmd = _tool_path('ninja', system_buildtools) + targets
- subprocess.check_call(cmd, cwd=os.path.abspath(out), stdout=stdout)
-
-
-def compute_source_dependencies(out, system_buildtools=False):
- """For each source file, computes a set of headers it depends on."""
- ninja_deps = _check_command_output(
- _tool_path('ninja', system_buildtools) + ['-t', 'deps'], cwd=out)
- deps = {}
- current_source = None
- for line in ninja_deps.split('\n'):
- filename = os.path.relpath(os.path.join(out, line.strip()), repo_root())
- if not line or line[0] != ' ':
- current_source = None
- continue
- elif not current_source:
- # We're assuming the source file is always listed before the
- # headers.
- assert os.path.splitext(line)[1] in ['.c', '.cc', '.cpp', '.S']
- current_source = filename
- deps[current_source] = []
- else:
- assert current_source
- deps[current_source].append(filename)
- return deps
-
-
def label_to_path(label):
"""Turn a GN output label (e.g., //some_dir/file.cc) into a path."""
assert label.startswith('//')
@@ -172,115 +70,6 @@
return name
-def gen_buildflags(gn_args, target_file):
- """Generates the perfetto_build_flags.h for the given config.
-
- target_file: the path, relative to the repo root, where the generated
- buildflag header will be copied into.
- """
- tmp_out = prepare_out_directory(gn_args, 'tmp.gen_buildflags')
- build_targets(tmp_out, [BUILDFLAGS_TARGET], quiet=True)
- src = os.path.join(tmp_out, 'gen', 'build_config', 'perfetto_build_flags.h')
- shutil.copy(src, os.path.join(repo_root(), target_file))
- shutil.rmtree(tmp_out)
-
-
-def check_or_commit_generated_files(tmp_files, check):
- """Checks that gen files are unchanged or renames them to the final location
-
- Takes in input a list of 'xxx.swp' files that have been written.
- If check == False, it renames xxx.swp -> xxx.
- If check == True, it just checks that the contents of 'xxx.swp' == 'xxx'.
- Returns 0 if no diff was detected, 1 otherwise (to be used as exit code).
- """
- res = 0
- for tmp_file in tmp_files:
- assert (tmp_file.endswith('.swp'))
- target_file = os.path.relpath(tmp_file[:-4])
- if check:
- if not filecmp.cmp(tmp_file, target_file):
- sys.stderr.write('%s needs to be regenerated\n' % target_file)
- res = 1
- os.unlink(tmp_file)
- else:
- os.rename(tmp_file, target_file)
- return res
-
-
-class ODRChecker(object):
- """Detects ODR violations in linker units
-
- When we turn GN source sets into Soong & Bazel file groups, there is the risk
- to create ODR violations by including the same file group into different
- linker unit (this is because other build systems don't have a concept
- equivalent to GN's source_set). This class navigates the transitive
- dependencies (mostly static libraries) of a target and detects if multiple
- paths end up including the same file group. This is to avoid situations like:
-
- traced.exe -> base(file group)
- traced.exe -> libperfetto(static lib) -> base(file group)
- """
-
- def __init__(self, gn, target_name):
- self.gn = gn
- self.root = gn.get_target(target_name)
- self.source_sets = collections.defaultdict(set)
- self.deps_visited = set()
- self.source_set_hdr_only = {}
-
- self._visit(target_name)
- num_violations = 0
- if target_name in ODR_VIOLATION_IGNORE_TARGETS:
- return
- for sset, paths in self.source_sets.items():
- if self.is_header_only(sset):
- continue
- if len(paths) != 1:
- num_violations += 1
- print(
- 'ODR violation in target %s, multiple paths include %s:\n %s' %
- (target_name, sset, '\n '.join(paths)),
- file=sys.stderr)
- if num_violations > 0:
- raise Exception('%d ODR violations detected. Build generation aborted' %
- num_violations)
-
- def _visit(self, target_name, parent_path=''):
- target = self.gn.get_target(target_name)
- path = ((parent_path + ' > ') if parent_path else '') + target_name
- if not target:
- raise Exception('Cannot find target %s' % target_name)
- for ssdep in target.source_set_deps:
- name_and_path = '%s (via %s)' % (target_name, path)
- self.source_sets[ssdep].add(name_and_path)
- deps = set(target.deps).union(
- target.transitive_proto_deps) - self.deps_visited
- for dep_name in deps:
- dep = self.gn.get_target(dep_name)
- if dep.type == 'executable':
- continue # Execs are strong boundaries and don't cause ODR violations.
- # static_library dependencies should reset the path. It doesn't matter if
- # we get to a source file via:
- # source_set1 > static_lib > source.cc OR
- # source_set1 > source_set2 > static_lib > source.cc
- # This is NOT an ODR violation because source.cc is linked from the same
- # static library
- next_parent_path = path if dep.type != 'static_library' else ''
- self.deps_visited.add(dep_name)
- self._visit(dep_name, next_parent_path)
-
- def is_header_only(self, source_set_name):
- cached = self.source_set_hdr_only.get(source_set_name)
- if cached is not None:
- return cached
- target = self.gn.get_target(source_set_name)
- if target.type != 'source_set':
- raise TypeError('%s is not a source_set' % source_set_name)
- res = all(src.endswith('.h') for src in target.sources)
- self.source_set_hdr_only[source_set_name] = res
- return res
-
-
class GnParser(object):
"""A parser with some cleverness for GN json desc files
@@ -309,7 +98,7 @@
self.name = name # e.g. //src/ipc:ipc
VALID_TYPES = ('static_library', 'shared_library', 'executable', 'group',
- 'action', 'source_set', 'proto_library')
+ 'action', 'source_set', 'proto_library', 'copy', 'action_foreach')
assert (type in VALID_TYPES)
self.type = type
self.testonly = False
@@ -331,6 +120,7 @@
self.outputs = set()
self.script = None
self.args = []
+ self.response_file_contents = None
# These variables are propagated up when encountering a dependency
# on a source_set target.
@@ -380,6 +170,21 @@
self.actions = {}
self.proto_libs = {}
+ def _get_response_file_contents(self, action_desc):
+ # response_file_contents are formatted as:
+ # ['--flags', '--flag=true && false'] and need to be formatted as:
+ # '--flags --flag=\"true && false\"'
+ flags = action_desc.get('response_file_contents', [])
+ formatted_flags = []
+ for flag in flags:
+ if '=' in flag:
+ key, val = flag.split('=')
+ formatted_flags.append('%s=\\"%s\\"' % (key, val))
+ else:
+ formatted_flags.append(flag)
+
+ return ' '.join(formatted_flags)
+
def get_target(self, gn_target_name):
"""Returns a Target object from the fully qualified GN target name.
@@ -396,10 +201,14 @@
target.toolchain = desc.get('toolchain', None)
self.all_targets[gn_target_name] = target
+ # TODO: determine if below comment should apply for cronet builds in Android.
# We should never have GN targets directly depend on buidtools. They
# should hop via //gn:xxx, so we can give generators an opportunity to
# override them.
- assert (not gn_target_name.startswith('//buildtools'))
+ # Specifically allow targets to depend on libc++ and libunwind.
+ if not any(match in gn_target_name for match in ['libc++', 'libunwind']):
+ assert (not gn_target_name.startswith('//buildtools'))
+
# Don't descend further into third_party targets. Genrators are supposed
# to either ignore them or route to other externally-provided targets.
@@ -422,16 +231,18 @@
elif target.type in LINKER_UNIT_TYPES:
self.linker_units[gn_target_name] = target
target.sources.update(desc.get('sources', []))
- elif target.type == 'action':
+ elif target.type in ['action', 'action_foreach']:
self.actions[gn_target_name] = target
target.inputs.update(desc.get('inputs', []))
target.sources.update(desc.get('sources', []))
outs = [re.sub('^//out/.+?/gen/', '', x) for x in desc['outputs']]
target.outputs.update(outs)
target.script = desc['script']
- # Args are typically relative to the root build dir (../../xxx)
- # because root build dir is typically out/xxx/).
- target.args = [re.sub('^../../', '//', x) for x in desc['args']]
+ target.args = desc['args']
+ target.response_file_contents = self._get_response_file_contents(desc)
+ elif target.type == 'copy':
+ # TODO: copy rules are not currently implemented.
+ self.actions[gn_target_name] = target
# Default for 'public' is //* - all headers in 'sources' are public.
# TODO(primiano): if a 'public' section is specified (even if empty), then
@@ -462,7 +273,7 @@
target.update(dep) # Bubble up source set's cflags/ldflags etc.
elif dep.type == 'group':
target.update(dep) # Bubble up groups's cflags/ldflags etc.
- elif dep.type == 'action':
+ elif dep.type in ['action', 'action_foreach', 'copy']:
if proto_target_type is None:
target.deps.add(dep_name)
elif dep.type in LINKER_UNIT_TYPES:
diff --git a/tools/gn2bp/run_buildtools_binary.py b/tools/gn2bp/run_buildtools_binary.py
deleted file mode 100755
index 7a6fe81..0000000
--- a/tools/gn2bp/run_buildtools_binary.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (C) 2022 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-""" A wrapper to run gn, ninja and other buildtools/ for all platforms. """
-
-from __future__ import print_function
-
-import os
-import subprocess
-import sys
-
-from platform import system, machine
-
-ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-
-def run_buildtools_binary(args):
- if len(args) < 1:
- print('Usage %s command [args]\n' % sys.argv[0])
- return 1
-
- sys_name = system().lower()
- os_dir = None
- ext = ''
- if sys_name == 'windows':
- os_dir = 'win'
- ext = '.exe'
- elif sys_name == 'darwin':
- os_dir = 'mac'
- elif sys_name == 'linux':
- os_dir = 'linux64'
- else:
- print('OS not supported: %s\n' % sys_name)
- return 1
-
- cmd = args[0]
- args = args[1:]
- exe_path = os.path.join(ROOT_DIR, 'buildtools', os_dir, cmd) + ext
- if sys_name == 'windows':
- # execl() behaves oddly on Windows: the spawned process doesn't seem to
- # receive CTRL+C. Use subprocess instead.
- return subprocess.call([exe_path] + args)
- else:
- os.execl(exe_path, os.path.basename(exe_path), *args)
-
-
-if __name__ == '__main__':
- sys.exit(run_buildtools_binary(sys.argv[1:]))
diff --git a/tools/gn2bp/update_results.sh b/tools/gn2bp/update_results.sh
new file mode 100755
index 0000000..6f90a69
--- /dev/null
+++ b/tools/gn2bp/update_results.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# This script is expected to run after gen_android_bp is modified.
+#
+# ./update_result.sh
+#
+# TARGETS contains targets which are supported by gen_android_bp and
+# this script generates Android.bp.swp from TARGETS.
+# This makes it easy to realize unintended impact/degression on
+# previously supported targets.
+
+set -eux
+
+TARGETS=(
+ "//base:base"
+)
+
+BASEDIR=$(dirname "$0")
+$BASEDIR/gen_android_bp --desc $BASEDIR/desc.json --out $BASEDIR/Android.bp ${TARGETS[@]}