Maciej Żenczykowski
d0c03cf20f
Merge "bpf netd.c - switch from 'int direction' to 'bool egress'"
2022-11-21 20:29:40 +00:00
Maciej Żenczykowski
55474984e8
bpf netd.c - switch from 'int direction' to 'bool egress'
...
and get rid of some macros while we're at it.
This is just slightly easier to read.
(side note: this is all resolved at compile time!)
Bug: 259199087
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com >
Change-Id: I7b38afd4b6f9d73b4f34a90040639f0780544ac8
2022-11-21 16:53:38 +00:00
Mohannad Farrag
293ea35b75
Merge changes I6025abba,I7788a6bb,I4fe381a2,Ib1ee183e,Ifb8843aa, ...
...
* changes:
gn2bp: create one action per arch
gn2bp: support multiple jni registration modules
gn2bp: get rid of local_include_dir hacks
gn2bp: remove jni_headers from jni_generator genrule
gn2bp: add common header dependencies to defaults
gn2bp: unconditionally remove -DANDROID for all host targets
2022-11-21 14:08:15 +00:00
Maciej Żenczykowski
1b7c1f1c97
bpf netd.c - add a TODO
...
Bug: 259889995
Test: N/A, comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com >
Change-Id: I0511433663738550b556208c140b08f76ca7898b
2022-11-21 09:41:33 +00:00
Maciej Żenczykowski
0adec97ca7
Merge "bpf clatd.c - per RFC 6145 simply use bottom 16 bits of IPv6 frag id."
2022-11-21 09:16:08 +00:00
Maciej Żenczykowski
3621cbddf1
bpf netd.c - refactor skip_owner_match() tcp flag processing
...
(no-op simplification)
Bug: 259199087
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com >
Change-Id: Ib9e126f1ca84f60b4057ccbbd0071f9684b20b92
2022-11-20 13:48:24 +00:00
Patrick Rohr
98600687ec
gn2bp: create one action per arch
...
Action modules can have different args depending on target_cpu
(specifically, the buildflags action). Therefore, we create one action
per target os & arch.
Test: //components/cronet/android:cronet
Change-Id: I6025abba8eb9f1974ef0fa6b62f79998305374a3
2022-11-18 19:29:18 -08:00
Patrick Rohr
6ef2272edd
gn2bp: support multiple jni registration modules
...
My next change will start appending ARCH to module names, so this
function needs to support multiple jni registration modules.
Test: //components/cronet/android:cronet
Change-Id: I7788a6bbd8807e527f2e1c6981b5f6219eea9a45
2022-11-18 18:24:01 -08:00
Patrick Rohr
3cd5ffb288
gn2bp: get rid of local_include_dir hacks
...
Those should not be needed anymore, as we are using glibc and bionic
headers, not the chromium packaged sysroot.
Test: //components/cronet/android:cronet
Change-Id: I4fe381a2aa1bb35857e70f90b283895dc7f570e2
2022-11-18 17:40:55 -08:00
Patrick Rohr
59e45bb3bf
gn2bp: remove jni_headers from jni_generator genrule
...
jni_headers are now globally included in defaults.
Test: //components/cronet/android:cronet
Change-Id: Ib1ee183eb556c8144713f7df26270b2df6ee12f9
2022-11-18 17:33:32 -08:00
Patrick Rohr
c03f1bb1d6
gn2bp: add common header dependencies to defaults
...
Chromium builds get these headers directly from sysroot, so they do
not explicitly list the dependency. While this is probably an upstream
bug (or at least a limitation), it is easiest to just add them to
cc_defaults.
This also adds jni_headers which are required by multiple targets.
Test: //components/cronet/android:cronet
Change-Id: Ifb8843aaa60b2454544886b3e60aae42f9a5388e
2022-11-18 17:32:50 -08:00
Patrick Rohr
5446df8d33
gn2bp: unconditionally remove -DANDROID for all host targets
...
It turns out, -DANDROID was not consistently applied across the chromium
code base, so it was removed for some targets where it shouldn't have
been.
Adding it to the host defaults solves this problem.
Test: //components/android/cronet:cronet
Change-Id: Ieff81727410c47a0d90d22b56348c6773f653a25
2022-11-18 14:57:41 -08:00
Mohannad Farrag
97b4eeddab
gn2bp: Add -UANDROID for host supported targets
...
* Base now builds under multi-architectures.
Test: m cronet_aml_base_base
Change-Id: Ia672c79c51763d43258510c5e63eb609e465bfba
2022-11-18 19:04:30 +00:00
Patrick Rohr
592958fa2c
Merge "gn2bp: Use AOSP libc and NDK"
2022-11-18 18:10:43 +00:00
Mohannad Farrag
06e2b648ed
gn2bp: Use AOSP libc and NDK
...
* Deleted the dependency on chromium libc and Android NDK.
* This is a tweak for an upstream problem as libbase has a dependency on libmedia without declaring it.
Change-Id: I77655b8d550a51d256d9b33c07d6eb69971f3811
Test: m cronet_aml_base_base
2022-11-18 17:54:26 +00:00
Maciej Żenczykowski
e6b4ec5b29
bpf clatd.c - per RFC 6145 simply use bottom 16 bits of IPv6 frag id.
...
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com >
Change-Id: Ifac9ae3702b0fc54a02fcfcf05efb36c1299e8ec
2022-11-18 15:00:03 +00:00
Treehugger Robot
61845d0b10
Merge "Reinstate sleep pending better fix"
2022-11-18 13:59:50 +00:00
Treehugger Robot
adb9c9e83a
Merge "Refactor CarrierPrivilegeAuthenticatorTest"
2022-11-18 12:05:53 +00:00
Motomu Utsumi
5539463ed1
gn2bp: Skip extracting common part for source_set
...
Test: ./update_results.sh
Change-Id: I429cef85ffbb47df0e44970732f223d81e2867c8
2022-11-18 20:00:04 +09:00
Motomu Utsumi
6550118309
gn2bp: Add desc_x86.json to update_results.sh
...
Generate Android.bp.swp from desc_x64.json and desc_x86.json
Test: ./update_results.sh
Change-Id: I9ad74af6b7a792c736ec68523d398d67729cc81f
2022-11-18 19:39:25 +09:00
Motomu Utsumi
879dec819d
gn2bp: Support multiple desc files
...
Test: ./update_results.sh
Change-Id: Ice6dc1a2e01dbecdc92fcd5e118df56da138a8d4
2022-11-18 19:39:25 +09:00
Motomu Utsumi
a71281cd12
gn2bp: Remove desc from the arg of create_blueprint_for_targets
...
Test: ./update_results.sh
Change-Id: I31e438f820b8d198851da1124cc544bc108f3446
2022-11-18 19:39:25 +09:00
Motomu Utsumi
7a122f52b3
gn2bp: add desc_arm.json
...
This is a preparation to support multiple desc.json for differet
target_cpu.
desc_arm is generated with following configuration.
args.gn
```
target_os = "android"
enable_websockets = false
disable_file_support = true
disable_brotli_filter = false
is_component_build = false
use_crash_key_stubs = true
use_partition_alloc = false
include_transport_security_state_preload_list = false
use_platform_icu_alternatives = true
default_min_sdk_version = 19
use_errorprone_java_compiler = true
enable_reporting = true
use_hashed_jni_names = true
treat_warnings_as_errors = false
enable_base_tracing = false
target_cpu = "arm"
```
chromium at 14f5ebc46c254d2e4956f10c87e7ae7d8bc72969 with following
changes.
```
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 16e3bbfd3f3..89d2f3d8a1e 100644
-- a/components/cronet/android/BUILD.gn
++ b/components/cronet/android/BUILD.gn
@@ -1600,22 +1600,8 @@ if (!is_component_build) {
if (use_platform_icu_alternatives &&
(!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon)) {
deps = [
- ":api_static_checks",
- ":cronet_package_copy",
- ":cronet_package_copy_native_headers",
":cronet_package_copy_native_lib",
- ":cronet_package_copy_native_lib_unstripped",
- ":cronet_package_copy_resources",
- ":cronet_sizes",
- ":cronet_test_package",
- ":generate_javadoc",
- ":generate_licenses",
":jar_cronet_api_source",
- ":jar_cronet_impl_common_java_source",
- ":jar_cronet_impl_fake_java_source",
- ":jar_cronet_impl_native_java_source",
- ":jar_cronet_impl_platform_java_source",
- ":jar_cronet_sample_source",
":repackage_api",
":repackage_common",
":repackage_fake",
diff --git a/net/BUILD.gn b/net/BUILD.gn
index de630fff3c1..e380bd0dd3d 100644
-- a/net/BUILD.gn
++ b/net/BUILD.gn
@@ -1632,7 +1632,6 @@ source_set("net_deps") {
":constants",
":isolation_info_proto",
":net_export_header",
- ":net_resources",
":preload_decoder",
"//base",
"//base/third_party/dynamic_annotations",
```
Test: ./gen_android_bp --desc desc_arm.json "//components/cronet/android:cronet"
Change-Id: Ifebde41e8ab39621b74cbf04ad8efee68d5bee39
2022-11-18 19:39:24 +09:00
Motomu Utsumi
fff513db18
gn2bp: add desc_arm64.json
...
This is a preparation to support multiple desc.json for differet
target_cpu.
desc_arm64 is generated with following configuration.
args.gn
```
target_os = "android"
enable_websockets = false
disable_file_support = true
disable_brotli_filter = false
is_component_build = false
use_crash_key_stubs = true
use_partition_alloc = false
include_transport_security_state_preload_list = false
use_platform_icu_alternatives = true
default_min_sdk_version = 19
use_errorprone_java_compiler = true
enable_reporting = true
use_hashed_jni_names = true
treat_warnings_as_errors = false
enable_base_tracing = false
target_cpu = "arm64"
```
chromium at 14f5ebc46c254d2e4956f10c87e7ae7d8bc72969 with following
changes.
```
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 16e3bbfd3f3..89d2f3d8a1e 100644
-- a/components/cronet/android/BUILD.gn
++ b/components/cronet/android/BUILD.gn
@@ -1600,22 +1600,8 @@ if (!is_component_build) {
if (use_platform_icu_alternatives &&
(!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon)) {
deps = [
- ":api_static_checks",
- ":cronet_package_copy",
- ":cronet_package_copy_native_headers",
":cronet_package_copy_native_lib",
- ":cronet_package_copy_native_lib_unstripped",
- ":cronet_package_copy_resources",
- ":cronet_sizes",
- ":cronet_test_package",
- ":generate_javadoc",
- ":generate_licenses",
":jar_cronet_api_source",
- ":jar_cronet_impl_common_java_source",
- ":jar_cronet_impl_fake_java_source",
- ":jar_cronet_impl_native_java_source",
- ":jar_cronet_impl_platform_java_source",
- ":jar_cronet_sample_source",
":repackage_api",
":repackage_common",
":repackage_fake",
diff --git a/net/BUILD.gn b/net/BUILD.gn
index de630fff3c1..e380bd0dd3d 100644
-- a/net/BUILD.gn
++ b/net/BUILD.gn
@@ -1632,7 +1632,6 @@ source_set("net_deps") {
":constants",
":isolation_info_proto",
":net_export_header",
- ":net_resources",
":preload_decoder",
"//base",
"//base/third_party/dynamic_annotations",
```
Test: ./gen_android_bp --desc desc_arm64.json "//components/cronet/android:cronet"
Change-Id: I79943c9d2fdef8c2c23ad32a2a43c08afd9a7458
2022-11-18 19:39:23 +09:00
Motomu Utsumi
ad4314183b
gn2bp: add desc_x86.json
...
This is a preparation to support multiple desc.json for differet
target_cpu.
desc_x86 is generated with following configuration.
args.gn
```
target_os = "android"
enable_websockets = false
disable_file_support = true
disable_brotli_filter = false
is_component_build = false
use_crash_key_stubs = true
use_partition_alloc = false
include_transport_security_state_preload_list = false
use_platform_icu_alternatives = true
default_min_sdk_version = 19
use_errorprone_java_compiler = true
enable_reporting = true
use_hashed_jni_names = true
treat_warnings_as_errors = false
enable_base_tracing = false
target_cpu = "x86"
```
chromium at 14f5ebc46c254d2e4956f10c87e7ae7d8bc72969 with following
changes.
```
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 16e3bbfd3f3..89d2f3d8a1e 100644
-- a/components/cronet/android/BUILD.gn
++ b/components/cronet/android/BUILD.gn
@@ -1600,22 +1600,8 @@ if (!is_component_build) {
if (use_platform_icu_alternatives &&
(!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon)) {
deps = [
- ":api_static_checks",
- ":cronet_package_copy",
- ":cronet_package_copy_native_headers",
":cronet_package_copy_native_lib",
- ":cronet_package_copy_native_lib_unstripped",
- ":cronet_package_copy_resources",
- ":cronet_sizes",
- ":cronet_test_package",
- ":generate_javadoc",
- ":generate_licenses",
":jar_cronet_api_source",
- ":jar_cronet_impl_common_java_source",
- ":jar_cronet_impl_fake_java_source",
- ":jar_cronet_impl_native_java_source",
- ":jar_cronet_impl_platform_java_source",
- ":jar_cronet_sample_source",
":repackage_api",
":repackage_common",
":repackage_fake",
diff --git a/net/BUILD.gn b/net/BUILD.gn
index de630fff3c1..e380bd0dd3d 100644
-- a/net/BUILD.gn
++ b/net/BUILD.gn
@@ -1632,7 +1632,6 @@ source_set("net_deps") {
":constants",
":isolation_info_proto",
":net_export_header",
- ":net_resources",
":preload_decoder",
"//base",
"//base/third_party/dynamic_annotations",
```
Test: ./gen_android_bp --desc desc_x86.json "//components/cronet/android:cronet"
Change-Id: Id221efc612e2fb8ebadfec4a87902046b91f1e85
2022-11-18 19:39:23 +09:00
Motomu Utsumi
ba876a6b3c
gn2bp: rename desc.json to desc_x64.json
...
This is a preparation to support multiple desc.json for differet
target_cpu.
desc_x64 is generated with following configuration.
args.gn
```
target_os = "android"
enable_websockets = false
disable_file_support = true
disable_brotli_filter = false
is_component_build = false
use_crash_key_stubs = true
use_partition_alloc = false
include_transport_security_state_preload_list = false
use_platform_icu_alternatives = true
default_min_sdk_version = 19
use_errorprone_java_compiler = true
enable_reporting = true
use_hashed_jni_names = true
treat_warnings_as_errors = false
enable_base_tracing = false
target_cpu = "x64"
```
chromium at 14f5ebc46c254d2e4956f10c87e7ae7d8bc72969 with following
changes.
```
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 16e3bbfd3f3..89d2f3d8a1e 100644
-- a/components/cronet/android/BUILD.gn
++ b/components/cronet/android/BUILD.gn
@@ -1600,22 +1600,8 @@ if (!is_component_build) {
if (use_platform_icu_alternatives &&
(!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon)) {
deps = [
- ":api_static_checks",
- ":cronet_package_copy",
- ":cronet_package_copy_native_headers",
":cronet_package_copy_native_lib",
- ":cronet_package_copy_native_lib_unstripped",
- ":cronet_package_copy_resources",
- ":cronet_sizes",
- ":cronet_test_package",
- ":generate_javadoc",
- ":generate_licenses",
":jar_cronet_api_source",
- ":jar_cronet_impl_common_java_source",
- ":jar_cronet_impl_fake_java_source",
- ":jar_cronet_impl_native_java_source",
- ":jar_cronet_impl_platform_java_source",
- ":jar_cronet_sample_source",
":repackage_api",
":repackage_common",
":repackage_fake",
diff --git a/net/BUILD.gn b/net/BUILD.gn
index de630fff3c1..e380bd0dd3d 100644
-- a/net/BUILD.gn
++ b/net/BUILD.gn
@@ -1632,7 +1632,6 @@ source_set("net_deps") {
":constants",
":isolation_info_proto",
":net_export_header",
- ":net_resources",
":preload_decoder",
"//base",
"//base/third_party/dynamic_annotations",
```
Test: ./update_results.sh
Change-Id: Iae45100c654e955c5c805536b8126b0603d3d255
2022-11-18 19:39:22 +09:00
Motomu Utsumi
1b16989360
gn2bp: Remove test targets
...
"//base:base_test" was for local testing and should not be in the
desc.json.
Test: ./update_results.sh
Change-Id: I3124505e1fc1dff4530966fbe5f49e85cdd1b04b
2022-11-18 19:39:16 +09:00
Motomu Utsumi
be62aee3df
Merge "gn2bp: move sysroot include to cc_default"
2022-11-18 09:33:26 +00:00
Chalard Jean
c4cff7e40c
Reinstate sleep pending better fix
...
Bug: 259506077
Test: ConnectivityDiagnosticsManagerTest
Change-Id: I2fa304e978267dc4fd23012d128150f6bbf32133
2022-11-18 17:18:01 +09:00
Chiachang Wang
dfea18945c
Merge "Move VpnTransportInfoTest to common test"
2022-11-18 05:44:20 +00:00
Patrick Rohr
81435163b0
gn2bp: move sysroot include to cc_default
...
Order in local_include_dirs matter and -isystem is not supported.
export_system_include_dirs is properly ignored in cc_binary.
Test: none
Change-Id: I22c981727d2a9b11f5b041ef6c6a7b95a05cc030
2022-11-17 19:34:32 -08:00
chiachangwang
91bac1953c
Move VpnTransportInfoTest to common test
...
Move VpnTransportInfoTest to common test to add the cts
coverage.
Annotate @ConnectivityModuleTest so that the test will
not fail with module that is not up-to-date, and use
assertParcelingIsLossless to prevent similar order module
in device case.
Bug: 256775913
Test: atest CtsNetTestCases:android.net.VpnTransportInfoTest
Change-Id: I1c40a4fc42468748d71c3df5c18b2ceb5b3769e1
2022-11-18 02:17:33 +00:00
Patrick Rohr
b51878f6c3
gn2bp: handle target-specific dependencies
...
This currently only supports cc_library_static as its the only target
that is currently used in this way.
Test: //components/cronet/android:cronet
Change-Id: Ia3f0338f486890835691c1435ee1a297d9e62f81
2022-11-17 07:06:20 -08:00
Patrick Rohr
297f979e8f
gn2bp: collect linker unit deps per target
...
Both transitive static libraries and LINKER_UNIT_TYPES dependencies need
to be stored separately for every target as they could differ. In
reality, only static deps differ right now.
I am not a big fan of how transitive_static_libs_deps are handled in
this CL; maybe we can come up with a more readable solution.
Test: //components/cronet/android:cronet
Change-Id: Ia4ad8e264b1243b7dd5d58a26543ee78206f9c79
2022-11-17 07:05:47 -08:00
Patrick Rohr
f1004372e6
gn2bp: remove is_third_party_dep
...
This is not used anymore.
Test: //components/cronet/android:cronet
Change-Id: Ie6d21f93e44348b51732b6030de315e8c67db52a
2022-11-17 07:03:09 -08:00
Mohannad Farrag
5f55226309
Merge changes Iac05e49a,If9b0e74b,I341043b4,I5eef9120,I4d747786, ...
...
* changes:
gn2bp: Add flags and include_dirs to target
gn2bp: Add cppflags and local_include_dirs to Target
gn2bp: Split function to set local_include_dirs
gn2bp: Split function to set module flags
gn2bp: Add indlue_dirs to arch
gn2bp: Add defines to arch
gn2bp: Add cflags to arch
2022-11-17 14:04:40 +00:00
Motomu Utsumi
f0f4768b5d
gn2bp: Add flags and include_dirs to target
...
Test: ./update_results.sh
Change-Id: Iac05e49a7f195afec72e229f667a402bae8a1742
2022-11-17 22:45:34 +09:00
Motomu Utsumi
50ad217eb4
gn2bp: Add cppflags and local_include_dirs to Target
...
Test: ./update_results.sh
Change-Id: If9b0e74bb9957acfec2c6364a2083ec28db273b7
2022-11-17 22:45:33 +09:00
Motomu Utsumi
88efbb4a9c
gn2bp: Split function to set local_include_dirs
...
Test: ./update_results.sh
Change-Id: I341043b46348cac2af949e121b4bb4cd8b266827
2022-11-17 22:45:33 +09:00
Motomu Utsumi
c34b137c01
gn2bp: Split function to set module flags
...
Test: ./update_results.sh
Change-Id: I5eef9120cf88f48ff8f3f59f6f8c77460af4df36
2022-11-17 22:45:33 +09:00
Motomu Utsumi
778f830dd1
gn2bp: Add indlue_dirs to arch
...
Test: ./update_results.sh
Change-Id: I4d7477869bbf0c121e2c0249d031a57b82e11e6f
2022-11-17 22:45:33 +09:00
Motomu Utsumi
80e044716b
gn2bp: Add defines to arch
...
Test: ./update_results.sh
Change-Id: Ia167511becaa4c1ddb3ed40e2b78732fc291cb8e
2022-11-17 22:45:33 +09:00
Motomu Utsumi
1c64e448dc
gn2bp: Add cflags to arch
...
Test: m cronet_aml_third_party_protobuf_protoc
Change-Id: Iea847d205fd258ae00ba1ff03e382798deb2f0a8
2022-11-17 22:45:25 +09:00
Mohannad Farrag
1c6f326073
Merge changes I7728eb4f,Ia31285bd,I7d08e055,I492d40ff
...
* changes:
gn2bp: Remove hardcoded arch support
gn2bp: Remove .h files from srcs
gn2bp: Update protoc tool name
gn2bp: Make local_include_dir order deterministic
2022-11-17 12:57:56 +00:00
Motomu Utsumi
4b14ffca89
gn2bp: Remove hardcoded arch support
...
Currently, multi-toolchain is supported in generic way by target
condition
Test: ./update_results.sh
Change-Id: I7728eb4f7faada753d051af80fe179ffdf94fe10
2022-11-17 20:31:24 +09:00
Motomu Utsumi
40f95c53f5
gn2bp: Remove .h files from srcs
...
Test: ./update_results.sh
Change-Id: Ia31285bd046eae134bd221c72512214773952847
2022-11-17 20:31:24 +09:00
Motomu Utsumi
bd4013ff2f
gn2bp: Update protoc tool name
...
Test: ./update_results.sh
Change-Id: I7d08e0557327768ec0a293028992fd6156e03583
2022-11-17 20:31:24 +09:00
Motomu Utsumi
20e8f899eb
gn2bp: Make local_include_dir order deterministic
...
Test: ./update_results.sh 10 times
Change-Id: I492d40ffd867c62ef856ec882d0dc12c6eeeff91
2022-11-17 20:31:21 +09:00
Remi NGUYEN VAN
0f92b69af7
Merge "Add MdnsNsecRecord"
2022-11-17 08:00:15 +00:00
Motomu Utsumi
dcc4e0a495
Merge changes Ie937102c,I47405379,Ic88a99ed,I37ad0250,I1583db83
...
* changes:
gn2bp: change filegroup to cc_defaults
gn2bp: change remove to discard
gn2bp: move module_is_compiled to Module class
gn2bp: using dep.name when adding dependency is more correct
gn2bp: properly add proto_deps
2022-11-17 06:36:24 +00:00