Commit Graph

1379 Commits

Author SHA1 Message Date
Jooyung Han
db457de0dd Merge "apex: set ":vndk" as required for vendor apexes" am: b0c4d3b319 am: feb217de25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1376856

Change-Id: I4c3a194b68df9245ca0f39fc938e01acab4443a3
2020-07-30 00:30:36 +00:00
Jooyung Han
b0c4d3b319 Merge "apex: set ":vndk" as required for vendor apexes" 2020-07-30 00:00:44 +00:00
Yifan Hong
93a90db516 Prevent GKI APEXes to write to $OUT/apex.
Multiple GKI APEXes may write to the same path
under $OUT/apex. Prevent it.

Fixes: 162366062
Test: build GKI APEX

Change-Id: I1b19870b10d6da2a85c3f7b9d93408d3a0fe90bc
2020-07-29 13:39:57 -07:00
Colin Cross
6e511a9a9f Add libraryDependencyTag to track dependencies on static and shared libraries
dependencyTag uses a set of predefined tags to identify different types
of dependencies.  There are already multiple bits of metadata stored
in the dependency tag (Library, Shared, ReexportFlags), and supporting
them all requires a combinatorial explosion of predefined tags and
causes issues when using equality comparisons if a new bit of metadata
is added.

Add a new libraryDependencyTag type that will contain the metadata
bits, and replace the quality comparisons with checks on the metadata
bits.

There are 5 TODOs where modifying the checks identified problems with
the existing checks.  These were left in place to produce identical
build output and will be fixed separately.

Bug: 162437057
Test: no change to build.ninja or {Android,make_vars,late}-${TARGET_PRODUCT}.mk
Change-Id: I72d4207dcf381c07c92e00e5a03968ebb5ed8d30
2020-07-29 13:22:30 -07:00
Paul Duffin
f289d09d9f Merge "Avoid creating APEX variant for sdk member" am: f91079f120 am: 89a55fdeab am: ce0832b6b4 am: fe20c26f23 am: 9b0e811a7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371417

Change-Id: Ib196b8d31dc8a5c6a1b83e8b13860eb0618c6f5a
2020-07-29 12:56:32 +00:00
Paul Duffin
ce0832b6b4 Merge "Avoid creating APEX variant for sdk member" am: f91079f120 am: 89a55fdeab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371417

Change-Id: I2f78788711e46680321dbf926d63b308ec631bec
2020-07-29 12:05:41 +00:00
Paul Duffin
f91079f120 Merge "Avoid creating APEX variant for sdk member" 2020-07-29 11:33:12 +00:00
Jooyung Han
6c4cc9ce23 apex: set ":vndk" as required for vendor apexes
When a vendor APEX sets use_vndk_as_stable: true, then the apex doesn't
bundle VNDK libraries but instead it uses them from the "vndk" namespace
at runtime.

":vndk" is a pseudo-name for VNDK libraries, which is processed by
linkerconfig so that the generated linker configuration allows the
namespace for the apex to access VNDK libs.

Bug: 159576928
Test: test with a test-only vendor apex
      it runs okay with VNDK libs. (lsof shows that it opens libs from
      VNDK APEX)
Change-Id: I924ce0fea696162575f59589b8f858deddf436b3
2020-07-29 16:00:54 +09:00
Treehugger Robot
e6dc3252b5 Merge "Add apex.use_vndk_as_stable property" am: 4514d96e18 am: 23b4b611ce am: 24387e75b6 am: e6533cd15b am: 61c5710359
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1369777

Change-Id: I62ffe94d9810998395a05f4790143dafed41bc07
2020-07-29 02:41:25 +00:00
Treehugger Robot
24387e75b6 Merge "Add apex.use_vndk_as_stable property" am: 4514d96e18 am: 23b4b611ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1369777

Change-Id: Ie89bff6ef687936a825c050c2cb1a4296ed7a458
2020-07-29 01:45:57 +00:00
Treehugger Robot
4514d96e18 Merge "Add apex.use_vndk_as_stable property" 2020-07-29 01:27:46 +00:00
Liz Kammer
cada807a92 Update language to comply with inclusive guidance
Update android_app_set to use word install rather than master for
android_app_sets, this better matches the phrasing used for apex_set.

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: m nothing
Change-Id: I429e7f8b16c42c10ad4d9543110f5ce814a893b1
2020-07-28 15:47:38 -07:00
Yo Chiang
6201c3a8cc Merge "Use BaseModuleName() + SubName as apexFile.moduleName" am: 060dc0bea2 am: bc2647f97b am: cb7fa1a353 am: 4e62d37eda am: 3c5564ceff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371679

Change-Id: I7d0dc04f522b836aa4e61d07f66f5e65427b5a9b
2020-07-28 12:32:28 +00:00
Yo Chiang
cb7fa1a353 Merge "Use BaseModuleName() + SubName as apexFile.moduleName" am: 060dc0bea2 am: bc2647f97b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371679

Change-Id: I7413e68bdac18091ee1146e6536e97bb55df1ad5
2020-07-28 11:46:55 +00:00
Jooyung Han
df78e216a8 Add apex.use_vndk_as_stable property
Vendor APEXes(in general, APEXes for non-system partitions) which is
supposed to be tied to a specific VNDK version can set this new property
so that it excludes VNDK libs and use them from VNDK APEX (provided by
system parition).

For these APEXes to use VNDK libs from VNDK APEX, linkerconfig should
link "vndk" linker namespace to the namespaces of these APEXes.

Bug: 159195575
Test: m (soong test added)
Change-Id: If90650973239ef7aab0ff084488bda57d9b0364e
2020-07-27 11:36:52 +09:00
Colin Cross
5bc1744e84 Build transitive lint reports for apex modules
Build and export transitive lint report zips for apex modules.

Bug: 153485543
Test: m TARGET_BUILD_APPS=com.google.android.wifi lint-check dist
Change-Id: I5a1805440452301a7e2c4ca91482b989638b54fb
Merged-In: I5a1805440452301a7e2c4ca91482b989638b54fb
(cherry picked from commit 08dca38eb0)
2020-07-24 11:26:47 -07:00
Treehugger Robot
8f27c4e612 Merge "Build transitive lint reports for apex modules" am: 13aa44fc15 am: 5388d97b37 am: 4826c2668d am: 7df9fd8e51 am: d99ca92460
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1370779

Change-Id: I8449eb661077630f03455bc90a9b1547aeb09e4d
2020-07-24 12:53:47 +00:00
Treehugger Robot
4826c2668d Merge "Build transitive lint reports for apex modules" am: 13aa44fc15 am: 5388d97b37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1370779

Change-Id: I08069e90ec451f09aa7bbea3e8b4834d6cb7ef67
2020-07-24 12:16:40 +00:00
Yo Chiang
e812805e75 Use BaseModuleName() + SubName as apexFile.moduleName
This change fixes this error:
```
TARGET module com.android.adbd.flattened requires non-existent TARGET
module: prebuilt_libclang_rt.ubsan_standalone-arm-android
```

apexFile.moduleName is used as Make dependency name, so it should use
m.BaseModuleName() instead of m.Name(), because soong may prepend
"prebuilt_" to or mutate the output of m.Name() in other ways.

android/androidmk.go emits Android.mk modules with
`LOCAL_MODULE := module.BaseModuleName() + <SubName>`, so replace
apexFile.moduleName with BaseModuleName() + <SubName> as much as
possible.

Bug: 7456955
Test: Add unit test in apex/apex_test.go
Test: lunch blueline_hwasan && SANITIZE_TARGET='hwaddress fuzzer' m nothing
Test: Verify out/soong/Android-blueline_hwasan.mk
Change-Id: If8537fc1bedbe6c3405de3662a5df210a073c43f
2020-07-24 20:05:20 +08:00
Treehugger Robot
13aa44fc15 Merge "Build transitive lint reports for apex modules" 2020-07-24 11:50:39 +00:00
Treehugger Robot
57435ab685 Merge "apexDepsMutator uses WalkDeps" am: e8bc288702 am: 6b3adfad17 am: 6528e9c7ab am: cadc52e391 am: f0cbb33b64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1369776

Change-Id: Iff055618fb36b2693d7104dbb588b40172c73b9a
2020-07-24 10:39:26 +00:00
Paul Duffin
a37eca27c8 Avoid creating APEX variant for sdk member
Previously, an APEX variant was created for a module that was a member
of an SDK just in case it had to be replaced with an APEX requested
snapshotted version of that member. That was necessary because that was
the only way to have APEX specific replacements.

Since then a new method called ReplaceDependenciesIf() has been added
which provides fine grained control over which dependencies are
replaced. This change uses that new method to handle the replacements
which allows the APEX variants to be removed.

Bug: 161928524
Test: m nothing
Change-Id: If3869dd6753dc182b099af566b20fbc9c9c6eff7
2020-07-24 11:10:10 +01:00
Treehugger Robot
6528e9c7ab Merge "apexDepsMutator uses WalkDeps" am: e8bc288702 am: 6b3adfad17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1369776

Change-Id: Iae6756d1e810734676fbbb10f41a6bb3cfb49624
2020-07-24 09:52:37 +00:00
Dan Albert
5cf1978048 Update allowed deps for CRT objects.
This is changing from apex_inheric to 16 as part of
https://android-review.googlesource.com/c/platform/bionic/+/1364178
but this file doesn't exist in AOSP.

Test: treehugger
Bug: http://b/159925977
Change-Id: I439347045aad05580edf7baa5c1304c11617ebb1
2020-07-23 23:36:40 +00:00
Artur Satayev
5ccd90bdb9 Fix apex-allowed-deps on multiple targets.
Bug: 161974327
Test: m
Change-Id: Ic30def0b0cbdc69cce26a4ea223be3486c2cfbcf
Exempt-From-Owner-Approval: quick fix for build breakage
2020-07-23 15:07:32 +00:00
Artur Satayev
c745dfec4c Merge "Track allowed transitive deps in any updatable modules." into mainline-prod 2020-07-23 12:40:10 +00:00
Jooyung Han
698dd9f007 apexDepsMutator uses WalkDeps
apexDepsMutator marks all dependencies of apex modules. Previously, it
was converted from WalkDeps() to Top-down mutator to avoid the pitfall
of WalkDeps() bug. (It did't handle multiple visits via different
paths.)

Because WalkDeps() problem solved in aosp/1277516, apexDepsMutator can
be reverted to use WalkDeps().

Even though there's no observable difference between them, I revert this
for the up-coming change, which requires different pruning strategies
per apexes.

Bug: 159195575
Test: m
Change-Id: Ib09cbc7a3dfd143dd37b660b1aea6c71392ce2e3
2020-07-23 13:54:50 +09:00
Colin Cross
08dca38eb0 Build transitive lint reports for apex modules
Build and export transitive lint report zips for apex modules.

Bug: 153485543
Test: m TARGET_BUILD_APPS=com.google.android.wifi lint-check dist
Change-Id: I5a1805440452301a7e2c4ca91482b989638b54fb
2020-07-22 20:16:14 -07:00
Treehugger Robot
5b4c0fc53d Merge "Use RelativeInstallPath for DataPaths in apex" am: 188f2ee1ee am: 4ae015807b am: 0ac24d68b5 am: b78f4d5b37 am: 929d225a97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1368876

Change-Id: I7870da3d4242b2fc055b122240cfc29804cefb12
2020-07-22 07:03:55 +00:00
Treehugger Robot
0ac24d68b5 Merge "Use RelativeInstallPath for DataPaths in apex" am: 188f2ee1ee am: 4ae015807b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1368876

Change-Id: I00c5c94acc8b64f6820884d5c8293f1883b57924
2020-07-22 06:20:52 +00:00
Liz Kammer
0a51aa2c98 Use RelativeInstallPath for DataPaths in apex
The RelativeInstallPath is currently unused for apexes; however, as it
stands, relative install paths would be handled differently for
flattened and unflattened apexes.

Test: go java test
Test m nothing

Change-Id: Iad9350642cad27c4f745cea6e5fc9e11e7b06ee4
2020-07-21 13:29:37 -07:00
TreeHugger Robot
5744b83b67 Merge "Track allowed transitive deps in any updatable module." into rvc-dev-plus-aosp 2020-07-21 20:13:26 +00:00
Christopher Parsons
1901959274 Merge "Install data_libs using relative_install_path property" am: fef9d4b601 am: 4a016f49a9 am: 39e1f73131 am: dc52de4058 am: a42b2aac34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359742

Change-Id: Ie1fcfbe935158b327827cf562024370807934760
2020-07-21 18:57:50 +00:00
Christopher Parsons
39e1f73131 Merge "Install data_libs using relative_install_path property" am: fef9d4b601 am: 4a016f49a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359742

Change-Id: I29f194fa1649a4f36f81f62d0c47c595e07994f5
2020-07-21 18:11:31 +00:00
Christopher Parsons
fef9d4b601 Merge "Install data_libs using relative_install_path property" 2020-07-21 17:26:57 +00:00
Chris Parsons
216e10a0f6 Install data_libs using relative_install_path property
Test: Added to data_libs tests
Test: Manually verified with bionic-unit-tests
Test: Treehugger
Change-Id: I28a8e08e3409f1e7c7bb72f4351310b57f35f513
2020-07-20 13:59:24 -04:00
Artur Satayev
e5207cd9a6 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)
2020-07-20 15:52:45 +01:00
Treehugger Robot
2e5bd33847 Merge "apex_set is force disabled when necessary" am: f70ceecc4c am: 005a5724ca am: 615d01cae9 am: bd13ffdc35 am: d392ec8d1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1364697

Change-Id: I190f13a8a4436c18a8197a065f192d376b77e7dc
2020-07-20 02:25:47 +00:00
Treehugger Robot
615d01cae9 Merge "apex_set is force disabled when necessary" am: f70ceecc4c am: 005a5724ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1364697

Change-Id: Iee2b6e2c90304339df052806ea5e727ba7fffdab
2020-07-20 01:50:32 +00:00
Treehugger Robot
f70ceecc4c Merge "apex_set is force disabled when necessary" 2020-07-20 01:17:06 +00:00
Jiyong Park
f220db80b8 apex_set is force disabled when necessary
prebuilt_apex has been disabled when the device is configured for
flattened APEXes, sanitized, instrumented, or built unbundled. However,
apex_set which is another type of APEX prebuilt wasn't disabled for the
same conditions.

This change fixes the discripency. apex_set modules are also force
disabled when the prebuilts are not expected.

Bug: 161316762
Bug: 160933444
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m
The built image has only the flattened APEXes and the device boots

Merged-In: I6c90dfb28d565861a473a1bdce93269ec370601d
(cherry picked from commit 10e926bc8d)
Change-Id: I6c90dfb28d565861a473a1bdce93269ec370601d
2020-07-20 10:11:15 +09:00
Colin Cross
b32b71222e Pass unstripped JNI libraries to Make
Pass a list of unstripped JNI libraries to Make so that they can be
installed into the symbols directory.

Bug: 159726429
Test: forrest
Change-Id: Ieb4bffbb3d0a09f476da011399c5b8b1611929d7
Merged-In: Ieb4bffbb3d0a09f476da011399c5b8b1611929d7
(cherry picked from commit 403cc15f1b)
2020-07-17 19:11:05 +00:00
Jiyong Park
10e926bc8d apex_set is force disabled when necessary
prebuilt_apex has been disabled when the device is configured for
flattened APEXes, sanitized, instrumented, or built unbundled. However,
apex_set which is another type of APEX prebuilt wasn't disabled for the
same conditions.

This change fixes the discripency. apex_set modules are also force
disabled when the prebuilts are not expected.

Bug: 161316762
Bug: 160933444
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m
The built image has only the flattened APEXes and the device boots

Change-Id: I6c90dfb28d565861a473a1bdce93269ec370601d
2020-07-17 12:37:16 +09:00
Treehugger Robot
3cfdf3badc Merge "Pass unstripped JNI libraries to Make" am: bf81ed4fd1 am: 9a6d827dc3 am: 0add164d0e am: 7bca8cdf36 am: 969eda7d78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356262

Change-Id: Ib889a30b922f3fa99a813b1abf3122341398917b
2020-07-17 00:31:45 +00:00
Treehugger Robot
0add164d0e Merge "Pass unstripped JNI libraries to Make" am: bf81ed4fd1 am: 9a6d827dc3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356262

Change-Id: I99a111aafcab5a8a8a5b704b9dd67904c93b0aea
2020-07-16 23:19:16 +00:00
Treehugger Robot
bf81ed4fd1 Merge "Pass unstripped JNI libraries to Make" 2020-07-16 22:43:53 +00:00
Artur Satayev
ad2ce794d5 Track allowed transitive deps in any updatable modules.
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.

Bug: 149622332
Test: m (with different products)
Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
(cherry picked from commit 019560ff02)
2020-07-15 14:49:19 +01:00
Colin Cross
774a758026 Use unzip -DD
We put reproducible timestamps in zip files so that the artifacts
are consistent, but that leads to old timestamps in the output
directory if they are unzipped as part of the build.  Use
unzip -DD when unzipping to update the timestamps.

Bug: 161015009
Test: touch -d 2020-01-01 ref; find $OUT/system -not -newer ref
Change-Id: I70407a627cb070e24be510faa6a774e3d9eae3a8
Merged-In: I70407a627cb070e24be510faa6a774e3d9eae3a8
(cherry picked from commit d783bbbace)
2020-07-13 14:26:12 -07:00
Treehugger Robot
20efa41af8 Merge "Set LOCAL_APKCERTS_FILE for apk_set modules in apexes" 2020-07-13 11:39:43 +00:00
Colin Cross
9e98a20159 Merge "Use unzip -DD" am: b7cea24fe3 am: cae5903677 am: 56b330f8e7 am: fc39fa1145 am: d7f475e820
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1361337

Change-Id: Ie0dd1d31466cdb8180147fd6e8a773411ec4a1cd
2020-07-13 06:59:39 +00:00