Commit Graph

2576 Commits

Author SHA1 Message Date
Chang Li
4c76abdeb3 Merge "Generated by scripts/update-apex-allowed-deps.sh." 2020-10-06 16:19:10 +00:00
Jooyung Han
276f33f175 Merge "apex: emit file_contexts for flattened apex" am: 51ce6b0acc am: 605b7a6bde am: 0d7b03fc88 am: 2c4999b7f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435292

Change-Id: Ic61a5e6645c34c63f5b67cc15811ed2164dd6717
2020-10-06 04:37:48 +00:00
Jooyung Han
0d7b03fc88 Merge "apex: emit file_contexts for flattened apex" am: 51ce6b0acc am: 605b7a6bde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435292

Change-Id: I08b7c17f2e69b94c698f5f7d8949b7e30e5e1943
2020-10-06 04:01:25 +00:00
Jooyung Han
51ce6b0acc Merge "apex: emit file_contexts for flattened apex" 2020-10-06 03:26:14 +00:00
Steven Moreland
3453948ad0 build/soong/scripts/update-apex-allowed-deps.sh
For bionic_libc_platform_headers(minSdkVersion:29).

Bug: 166675194
Test: build
Change-Id: I5c516265003ee2e0cec619ef7872e8a549354385
2020-10-06 00:52:00 +00:00
Chang Li
7ed2e5b154 Generated by scripts/update-apex-allowed-deps.sh.
Similar to ag/12651627, this is for the internal master (based on ag/12597726).

Change-Id: I5a3821f76db0b990af76d6cf99d750ec8d3b870e
2020-10-05 22:49:17 +00:00
Treehugger Robot
0ef34709fc Merge "Remove stale apex_available dependency." am: 0400ede359 am: e74f6092de am: 92071533db am: b10e28c727 am: c467935850
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435497

Change-Id: I10d6d40e8c360a31e2d6cd4a333829ec9e6a360c
2020-10-05 01:10:38 +00:00
Treehugger Robot
92071533db Merge "Remove stale apex_available dependency." am: 0400ede359 am: e74f6092de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435497

Change-Id: I97b5ac333fc196537ae1b803faf459f6d102e946
2020-10-04 23:56:15 +00:00
Treehugger Robot
0400ede359 Merge "Remove stale apex_available dependency." 2020-10-04 22:52:57 +00:00
Santiago Seifert
53e29ad9c1 Add libmediaparser-jni to apex/allowed_deps.txt am: 0e0892588b
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/12736179

Change-Id: I9d4f331515325818eb3a56f68fec8fba9379755b
2020-10-01 19:00:22 +00:00
Santiago Seifert
0e0892588b Add libmediaparser-jni to apex/allowed_deps.txt
Bug: 158742256
Test: atest CtsMediaParserTestCases
Test: atest CtsMediaParserHostTestCases
Change-Id: I5faa49deae62b1a612f88938555f55a586b8175f
2020-10-01 10:54:04 +00:00
Artur Satayev
4e1f2bd0d8 Track allowed transitive deps in any updatable module.
Instead of tracking per module and per module variant, track allowed
list of dependecies for all modules combined. This avoids issues with
different products and different downstream branches having different
build graphs.

To compare allowed_deps.txt vs head, run:
:; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check

To update source allowed_deps.txt, run:
:; build/soong/scripts/update-apex-allowed-deps.sh

Bug: 149622332
Test: m
Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
(cherry picked from commit 453555083b)
(cherry picked from commit e5207cd9a6)
2020-09-30 21:17:42 +00:00
Martin Stjernholm
3b8ca4c317 Remove stale apex_available dependency.
Test: m
Bug: 142944931
Change-Id: I9c69ef64eb9eecd45f6272a1d79bf77ee910815c
2020-09-30 17:40:17 +01:00
Treehugger Robot
198ee1d790 Merge "Add support of test data to python_host_test" am: 025ae97b0e am: 7cfb58c3f4 am: 88f0a9458b am: 48471f78a6 am: 7a663a68ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433195

Change-Id: Ia17b9d4a0667a3271d27f07ad0104a65553bb938
2020-09-30 00:37:16 +00:00
Treehugger Robot
88f0a9458b Merge "Add support of test data to python_host_test" am: 025ae97b0e am: 7cfb58c3f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433195

Change-Id: Ia4e41cc8b57957f830c9707ceb6017bf3fda662e
2020-09-29 23:12:40 +00:00
Treehugger Robot
025ae97b0e Merge "Add support of test data to python_host_test" 2020-09-29 21:56:19 +00:00
Treehugger Robot
579b2388da Merge "Don't include artifacts for host-cross targets" am: 6c76f18aae am: ec2752052e am: 33649cab1a am: f8602ac7f7 am: d0e7b28a6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440496

Change-Id: If75c580964e9abb50606b37e68c5197045080bb6
2020-09-29 15:51:27 +00:00
Treehugger Robot
33649cab1a Merge "Don't include artifacts for host-cross targets" am: 6c76f18aae am: ec2752052e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440496

Change-Id: Ica21c3802daaea21d91755e80cb5c33a3c765e50
2020-09-29 14:55:03 +00:00
Treehugger Robot
6c76f18aae Merge "Don't include artifacts for host-cross targets" 2020-09-29 14:03:05 +00:00
Jiyong Park
ccb406fc9c Don't include artifacts for host-cross targets
When building an APEX, the build system included artifacts from all
targets that are returned from ctx.MultiTargets(). This however has
became a problem as we add new host targets like linux_bionic_arm64.
When there are multiple host targets having different OSes,
ctx.MultiTargets() returns one target per a host OS. For example, when
linux_bionic_arm64 is enabled, ctx.MultiTargets() returns the following
two targets because linux_bionic != linux_glibc.

* linux_glibc_86_64
* linux_bionic_arm64

Some dependencies (like soong_zip, etc.) are not enabled for the new
host target (because they don't have to) and therefore the build fails.
Since the purpose of host APEX is to package some host tools for
testing, etc., we actually don't need the second target for APEX.

Fixing the problem by not skipping "cross host" targets which can't be
natively executed on the host machine.

Bug: 169454252
Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m
Test: DIST_DIR=$(pwd)/out/dist \
        ./art/tools/dist_linux_bionic.sh com.android.support.apexer
Change-Id: Idaded56e4b4fc0195c8bbc760e4b4728016bd5b4
2020-09-29 11:22:23 +09:00
Treehugger Robot
a312770456 Merge changes Id412359e,I9c4d3a33,Ic3216235 am: ca17414206 am: 70cea45d8e am: ef5534114c am: 192d515e63 am: 24fadfd1cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439754

Change-Id: I407daeb9d8cd4237b848e7ef3dba8d60d3e2c612
2020-09-28 22:54:00 +00:00
Treehugger Robot
ef5534114c Merge changes Id412359e,I9c4d3a33,Ic3216235 am: ca17414206 am: 70cea45d8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439754

Change-Id: I101387b7b62f7eda9c6044787a6f354a5c58b3cb
2020-09-28 21:28:54 +00:00
Colin Cross
7812fd3814 Fix ChooseSdkVersion after api levels
I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50 switched normalizeVersions
to work on ApiLevels, which inadvertantly caused it to return "current"
instead of "10000" for libraries that specify "current" in their stubs
property.  ChooseSdkVersion couldn't handle "current" because it was
manually converting the version to an int.  Switch ChooseSdkVersion
to use ApiLevels instead so that it can handle "current".

Test: m checkbuild
Change-Id: Id412359e092483ba419118dd03bc206fae702a96
2020-09-26 00:53:03 +00:00
Treehugger Robot
e798cae7e5 Merge changes I0885e493,Ic37c8db9 am: 4f6eebff0c am: bbfd7e016a am: e67f4200fd am: 2b04afb880 am: 2c81bf414e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429848

Change-Id: Id5cd03ac91d2ea43a7d3b42d4c682b2cb5621a39
2020-09-25 07:01:03 +00:00
Dan Albert
40e6162788 Merge changes from topics "soong-apilevel", "soong-config-apilevel" am: 8bd5095362 am: 587f425a1b am: eee05b3d29 am: 2be28db3af am: f6805df843
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388352

Change-Id: I2e1c94c83f5ca7df45534027651075e9b4b39e95
2020-09-25 06:01:02 +00:00
Dan Albert
063452b1c1 Replace FutureApiLevel with an ApiLevel. am: 0b176c8038 am: d5e15a13df am: 818d1b4e6e am: d997f3cd33 am: 07f0cae3c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388351

Change-Id: Ife2f7c6a1d6dc9828c07ef6341b774e23d40fe3e
2020-09-25 06:00:59 +00:00
Dan Albert
d2a7987456 Replace ApiStrToNum uses with ApiLevel. am: c8060536e8 am: 6e3d089818 am: c81c409966 am: 97825a1e23 am: 049b18bb14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371896

Change-Id: Id26f8d0f0323da9fbf924fcb42dda23d326e2909
2020-09-25 06:00:55 +00:00
Treehugger Robot
e67f4200fd Merge changes I0885e493,Ic37c8db9 am: 4f6eebff0c am: bbfd7e016a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429848

Change-Id: I65d8e04c6245b2232768f68d2882428a6ee90f36
2020-09-25 05:46:26 +00:00
Dan Albert
eee05b3d29 Merge changes from topics "soong-apilevel", "soong-config-apilevel" am: 8bd5095362 am: 587f425a1b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388352

Change-Id: I6a57771665f386c8279078d1bbd9d1ae4b770f53
2020-09-24 23:49:02 +00:00
Dan Albert
818d1b4e6e Replace FutureApiLevel with an ApiLevel. am: 0b176c8038 am: d5e15a13df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388351

Change-Id: Ica0a6c1a244225e39586523314b1e7e9e1d98096
2020-09-24 23:49:00 +00:00
Dan Albert
c81c409966 Replace ApiStrToNum uses with ApiLevel. am: c8060536e8 am: 6e3d089818
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371896

Change-Id: Ib7861bde161e92291228ec0405e6d0c206296944
2020-09-24 23:48:57 +00:00
Treehugger Robot
4f6eebff0c Merge changes I0885e493,Ic37c8db9
* changes:
  linux_bionic_arm64 is added when Host_bionic_arm64 is true
  HostCross is an attribute of a Target, not OsType
2020-09-24 22:56:43 +00:00
Jiyong Park
1613e5541f HostCross is an attribute of a Target, not OsType
A host target is considered as being cross-compiled when the target
can't run natively on the build machine. For example, linux_glibc/x86_64
is a non-cross target on a standard x86/Linux machine, but is a cross
host on Mac. Previously, whether cross or not was a static attribute of
an OsType. For example, Windows was always considered as cross host,
while linux_bionic was not. This becomes a problem when we support more
host targets like linux_bionic/arm64 which should be cross-host on
standard x86/Linux machines.

This change removes HostCross from the OsClass type and instead adds a
property HostCross to the Target type. When a target is being added, it
is initialized to true when the target can't run natively on the current
build machine.

Bug: 168086242
Test: m
Change-Id: Ic37c8db918873ddf324c86b12b5412952b0f2be2
2020-09-24 14:14:31 +09:00
Jooyung Han
7f146c0da1 apex: emit file_contexts for flattened apex
Flattened APEXes are installed in /<partition>/apex/<name>, so its
file_contexts file should be amended accordingly.
For example, file_contexts of an apex "com.android.foo" with should be
modified by prepending actual install path to the path regex.

/bin/foo <sepolicy label>
=> /system/apex/com\.android\.foo/bin/foo <sepolicy label>

File_contexts file is emitted to "make" via LOCAL_FILE_CONTEXTS variable
for apex_manifest.pb module.

Make collects these files and use them to build file_contexts.bin.

Also removed global state which is used to keep the list of all
flattened apexes.

Bug: 166518492
Test: m file_contexts.bin
      check intermediate file_contexts.modules.tmp file
      in $OUT/obj/ETC/file_contexts.bin_intermediates/
Change-Id: I780370b6e576964a5c09f9477f3361f341dd576b
2020-09-23 15:43:39 +00:00
Dan Albert
4f378d75aa Convert more versions in config to ApiLevel.
The test case I removed is invalid. The codename has had its int
assigned, but the config claims it is not final.

If this ever does need to be supported it's just a matter of making
sure the Q -> 29 mapping (or whatever) in the finalized codenames map
in android/api_levels.go.

Test: treehugger
Bug: http://b/154667674
Change-Id: I4f42ec2fd4a37750519ee3937938a1c65b6bb1e8
2020-09-22 16:01:56 -07:00
Dan Albert
0b176c8038 Replace FutureApiLevel with an ApiLevel.
Keeping the int constant around for now as FutureApiLevelInt because
it's still useful in places that haven't adopted ApiLevel yet for
testing if their non-ApiLevel API level is current or not.

Test: treehugger
Bug: http://b/154667674
Change-Id: I47a7012703f41fdeb56f91edf9c83afa93042deb
2020-09-22 15:04:48 -07:00
Dan Albert
c8060536e8 Replace ApiStrToNum uses with ApiLevel.
Test: treehugger
Bug: http://b/154667674
Change-Id: I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50
2020-09-22 15:04:48 -07:00
Jooyung Han
e2f8cdbcf6 Merge "apex: prebuilt_firmware installs in /etc/firmware" am: ca4536fc26 am: 49c323c549 am: 69cda4a694 am: 63c593639e am: feb9c0048b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429865

Change-Id: I483daefa646cada397f3838963d891aa3b8d151f
2020-09-22 03:58:31 +00:00
Jooyung Han
69cda4a694 Merge "apex: prebuilt_firmware installs in /etc/firmware" am: ca4536fc26 am: 49c323c549
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429865

Change-Id: I44875d563415aef30a84db37ef090ec5b68b2f45
2020-09-22 02:26:29 +00:00
Dan Shi
3194912150 Add support of test data to python_host_test
Bug: none
Test: m -j vts_vndk_abi_test
confirm abi_dump.zip found next to test binary

Change-Id: I834dddfc13eb9e7addd234307b085b16124db234
2020-09-21 14:36:43 -07:00
Jooyung Han
8e5685ddca apex: prebuilt_firmware installs in /etc/firmware
Installation path of prebuilt_firmware varies accoding to target
partitions. When it is for system, it installs a file in
/system/etc/firmware while it installs in /vendor/firmware for vendor.

We'd better be consistent about installation path when it is
for APEXes regardless of target partition. Otherwise, ueventd would need
to scan both /apex/*/etc/firmware and /apex/*/firmware.

Having /etc prefix for prebuilt modules helps module owners to predict
the layout of the contents.

Bug: 162701747
Bug: 167942098
Test: soong tests
Test: loading vibrator firmware from vibrator apex (sunfish)
Change-Id: I7a7105026426f8a7a156bc947304930f761c81f3
2020-09-21 11:02:57 +09:00
Mike Yu
a0e2e2fd59 Update apex allowed_deps
It's due to the dependency change in NetworkStack

Bug: 168675447
Test: Run build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Id78bb6f8f6ea48435f66528b0c2f915d1ba2b0b3
2020-09-16 09:01:36 +00:00
Artur Satayev
ecb3580b55 Fix apex-allowed-deps on multiple targets. am: 5ccd90bdb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/12216251

Change-Id: I314d276e1a93b149aaf00dff7dbbc20b94f16423
2020-09-16 07:37:04 +00:00
Jiyong Park
b6241d46aa Notice files for prebuilt_etc are included in APEX
This change fixes a bug that notice files for some module type (e.g.
prebuilt_etc) were not included in APEX. This happened because we relied
on WalkPayloadDeps which actually doesn't traverse module types that
don't implement ApexModule interface. prebuilt_etc is one such module
type. Fixing the problem by also iterating the filesInfo array which
has info about all modules that are included in the APEX.

Bug: 166575301
Test: m com.android.tzdata and inspect the built artifact.
NOTICE.html.gz is there.

Merged-In: Iceb055b60184aef2a3e65e44680304853eb79a53
Change-Id: Iceb055b60184aef2a3e65e44680304853eb79a53
(cherry picked from commit 41f637d653)
2020-09-14 01:01:11 +00:00
Jeongik Cha
6e8131f649 Update apex allowed_deps
Bug: 168376939
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: I19ba5900ddff84948cfa29e48e31cd609e61dbdb
2020-09-13 13:59:18 +09:00
Colin Cross
680b11571f Merge "Use alias for test_per_src apex dependencies" am: a018b3df16 am: b524b7a9f6 am: a6aafd9d18 am: bf6baa6494 am: 2b90325fa0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1406260

Change-Id: I368bf31438820af7de33c2a5f0931763cde2cb4a
2020-09-12 22:42:10 +00:00
Colin Cross
a6aafd9d18 Merge "Use alias for test_per_src apex dependencies" am: a018b3df16 am: b524b7a9f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1406260

Change-Id: I4872476a43cbe9fd91e5ae43b25891c7d9a68ad5
2020-09-12 21:19:52 +00:00
Colin Cross
a018b3df16 Merge "Use alias for test_per_src apex dependencies" 2020-09-12 20:21:36 +00:00
Jooyung Han
dfa1b48d3a apex: pass init_rc/vintf_fragments to make am: 07931c73a3 am: 89287e071a am: 62d0b91ef3 am: 9060bc09d2 am: 1a041bf9d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1425588

Change-Id: I23d628f734703a8225218714b774ea7903ab73d1
2020-09-12 00:13:06 +00:00
Colin Cross
90dab3498d Use alias for test_per_src apex dependencies
AddFarVariationDependencies was broken, which allowed apex to add
dependencies on tests by requesting an empty test_per_src variation
even though some test dependencies did not have a test_per_src
variation.  Add an alias from the pre-test_per_src variation
variant to the empty test_per_src variation, and drop the
test_per_src variation when requesting the depencency.

Test: TestApexWithTests
Change-Id: I2ed7bdd761027956141e25d4d81f9074afe628b6
2020-09-11 16:02:24 -07:00