Commit Graph

8 Commits

Author SHA1 Message Date
Patrick Rohr
09716f5c7e gn2bp: store response_file_contents for action targets
These will be piped into a script, so it is important that both single
and double quotes are properly escaped.

Test: //base:base
Change-Id: I0123e09a698418f222f51b0326608d4e97374928
2022-10-27 14:45:54 -07:00
Patrick Rohr
da778a00ca gn2bp: add basic parser support for copy and action_foreach rules
*Very* basic GnParser support for copy and action_foreach targets.
Copy rules are not very common, for cronet package only two are invoked:

- //components/cronet/android:cronet_package_copy_native_lib
- //third_party/icu:icudata

(I am using a heavily pruned version of cronet_package, it is possible
that the upstreamed version includes more such rules).

Test: parse //components/cronet:cronet_package
Change-Id: I47cd077b7f6261085d8006596df165f27a83a1d8
2022-10-26 11:53:44 -07:00
Patrick Rohr
26af1e76b2 gn2bp: allow targets to depend on chromium's libc++ and libunwind
We need to determine if this should be replaced by Android's version of
those libraries.

This can be done via "stl" property on dependent targets (we would
additionally have to configure the version).

Test: n/a
Change-Id: Ibd54cc0b58086ec77d5eee40708f28b237d70c3f
2022-10-26 11:52:44 -07:00
Motomu Utsumi
b26c337590 gn2bp: Remove unuded code
Test: ./gen_android_bp --desc gn.json --output Android.bp \
'//third_party/zlib:zlib'

Change-Id: Icd3891c605e6b519b4eb7ca9a14563c825c5750d
2022-10-26 19:59:02 +09:00
Motomu Utsumi
73e0322897 gn2bp: Remove unused ODRChecker
Test: ./gen_android_bp --desc gn.json --output Android.bp \
'//third_party/zlib:zlib'

Change-Id: I3f27e552e4134a22e32cf64822bab08958340bbd
2022-10-26 19:57:40 +09:00
Patrick Rohr
c6331c81e7 gn2bp: support '//' in label_to_path
Test: ./gen_android_bp --desc gn.json --output Android.bp \
'//third_party/zlib:zlib'

Change-Id: I65eb857440cb67a7774c120f619cbec86c10d73d
2022-10-25 11:36:57 -07:00
Patrick Rohr
23f2619342 gn2bp: delete compat.py
gn2bp does not need to support python2.

Test: none
Change-Id: I00223ec3e53bf629342380eadf5f867c333863f6
2022-10-25 09:45:22 -07:00
Patrick Rohr
92d7412616 gn2bp: add copy of perfetto project gn to bp tooling
This will serve as a starting point to generate Android.bp files for
cronet.

Test: n/a
Change-Id: Ia5ccad48f705fd48cff212dbedbfb61b6e385468
2022-10-25 15:52:22 +00:00