* This is a GN-specific flag that should live in gn_utils as it might be used in the future when converting to Bazel.
Test: update_results.sh
Change-Id: If870f757cf3ee57a00c571947a7ffea18a7db55d
* This converts all of the `actions` whose script is in the list of `JAVA_BANNED_SCRIPTS` into a `java_group`. `java_group` don't have dependencies but all of the actions reachable through them are stored.
Test: m cronet_aml_components_cronet_android_cronet
Change-Id: Ib91dfdd6789fc25466e298a4a274e224fe08b5e9
.so file name needs to match with CronetLibraryLoader.java
(e.g. libcronet.109.0.5386.0.so)
Test: m, atest CtsCronetTestCases
Change-Id: I82285c32e82fc27ba5233e1bef7195ec57c35bea
* This change doesn't effectively use the `CC_ARCH` environment variable. Just a change of variable name.
* cc_genrules are compiled so they need host_supported/device_supported tags.
Test: m cronet_aml_components_cronet_android_cronet
Change-Id: Ie55e5e0fb60b444817bc13c967e89f35c4e8badf
* This will include all of the java files needed to build cronet java.
Test: m cronet_aml_components_cronet_android_cronet
Change-Id: Idc0f61a5f290eca1a03253b622c416c65eba04c9
* `source_set` were converted to cc_defaults and this would pose a huge problem if those cc_defaults had rtti on since it affected all of the dependencies of the source target.
* The solution here would be to compile the `source_set` independently as a static/shared library with rtti on then link it.
Test: m cronet_aml_components_cronet_android_cronet
Change-Id: I28bbe0947d0dc87c2d602514a2759a3171b68aa2
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
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
This is pretty much a noop, but if we ever decided to change the
target.name or similar, the code would still work.
Test: //components/cronet/android:cronet
Change-Id: I37ad0250ec1b25f03f8942e34fddc57186340276
With proper arch support, we now have all the information to do this
properly.
Test: //components/cronet/android:cronet
Change-Id: Iab86261a6a4d775ba5f3b12b2487b7c27096580d
Once sources will be added to a Target.Arch, common sources need to be
collected from the arch-dependent object. This is done via finalize()
method, which is called once on every Target. Finalize collects the
intersection of all sources and subtracts it from the arch dependent
sources.
Test: //components/cronet/android:cronet
Change-Id: If2d0d04ff6c8df0efb541a322bcf2febcf79bb55
Default all non-android toolchains to the host toolchain. Some limited
host support may be required. Let's see.
Test: //components/cronet/android:cronet
Change-Id: I3bc7a0d5da0c9558bda83583a0a7f90b1a5a2597
arch set will consist of Arch object that contain arch-dependent
properties (sources, flags, etc.).
Test: //components/cronet/android:cronet
Change-Id: Ic5b62063d3c5ea07435c676eb11923defdf4e577
This change does affect the Android.bp.swp for targets that currently
exist in multiple toolchain variations. Only the first one is parsed.
Test: //components/cronet/android:cronet
Change-Id: I77501b1b195a91a61e29566d540ecc7dfadeea75
This was not useful for the cronet build, as we have not remapped
third_party deps into //gn (unlike perfetto).
We probably do want something similar for builtin_deps (like pass
builtin_deps into the GnParser constructor) to prevent static_library
dependencies to circumvent replaced dependencies via builtin_deps.
Test: //components/cronet/android:cronet
Change-Id: I77ed99eb14618a478281b9be025cf9d384066ddb
This is to get ready for removing the toolchain from Target names.
Test: //components/cronet/android:cronet
Change-Id: I0d7d6ae286c2e5c493e7bb565a4943be6f4c5b98
Eventually, this will lead to support for passing in different gn desc
files.
Test: //components/cronet/android:cronet
Change-Id: I6e1f7ee51f9819969b0bef8da7a1a21abbccabc8
To support parsing multiple gn desc files for different architectures,
the process of parsing and retrieving Targets needs to be split in two.
Test: //components/cronet/android:cronet
Change-Id: Ib94cbc18b9b73b17942a71289ef86f69d4e36c5f
There were some flaws in the previous logic. Dependencies need to be
bubbled up for all targets, but only static_libs should be added to
them.
Test: update_results.sh
Change-Id: I98025a8a0720d34bc47a820bf45118c06acd64a0
Soong explicitly requires to list all static libraries, including static
libraries that are linked by a dependency.
What is interesting is that this change seemed to have introduced new
targets?! Will have to check if that's correct, but at first glance it
seems to make sense.
Test: //components/cronet/android:cronet
Change-Id: I0e6e9a760dd0a4ebc5ce50f5dabc02458ff488a8
--proto_path specify the directory in which to search for imports.
net_quic_proto and metrics_proto have files that import other files.
Get proper --proto_path from the args in the desc.
Also, update --cpp_out to follow --proto_path change.
There are 6 targets which use protoc_wrapper.py in the dependency
from cronet_package_android.
It is confirmed that they could build with this commit.
Test: m cronet_aml_net_isolation_info_proto_gen
(//net:isolation_info_proto)
Test: m cronet_aml_net_net_nqe_proto_gen
(//net:net_nqe_proto)
Test: m cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen
(//net/third_party/quiche:net_quic_test_tools_proto)
Test: m cronet_aml_net_cert_root_store_proto_full_gen
(//net/cert:root_store_proto_full)
Test: m cronet_aml_net_third_party_quiche_net_quic_proto_gen
(//net/third_party/quiche:net_quic_proto)
Test: m cronet_aml_third_party_metrics_proto_metrics_proto_gen
(//third_party/metrics_proto:metrics_proto)
Change-Id: Id19e956eb0eb3fb402f8aaa9eb94734b731c74fd
GnUtils and gen_android_bp already have support for proto targets.
It looks pretty generic and quite a bit more evolved than what we have
done so far.
Test: //net:net
Change-Id: I1ca0d004650b4dc5e09fae4a0f4159699b4de96b
The current plan is to write a lightweight wrapper around Cronet that
serves as the Android API surface. If that holds true, we might get away
with putting all .java sources in a single jar. Otherwise, the API will
have to be put in a separate source jar.
Test: //net:net
Change-Id: I2bef893ebdf0a4390dfb634e715c60ccd94dc1fb
According to the docs, java target names are (somewhat) guaranteed to end in
_java. There are some other variations that are allowlisted, though it
is currently unclear if those need to be supported for our purposes.
Test: //net:net
Change-Id: I0647dac6a078790e23509d437628aed0d8d62f77
gn_utils does not have enough information to fix the args, so it should
not touch them.
Test: //base:base
Change-Id: Id813a255fcf3694448eae2bb51637b10fc8a0297