Commit Graph

1442 Commits

Author SHA1 Message Date
Jiyong Park
12a719c0fc android_filesystem modules can be included in APEX
android_filesystem modules can be included in APEX via the new
`filesystems` property. The filesystem images are placed at
./etc/fs/<modulename>.img.

Bug: 172413888
Test: m nothing

Change-Id: I215ca7a32ff1988a0de4e1f71397684e189839ea
2021-01-07 15:35:25 +09:00
Bob Badour
b499922acc Revert^2 "Export soong license data to make."
61a55a0344

Change-Id: I5fb017c683df18bad42a8e27fb2d7c7c510514e5
2021-01-06 20:49:11 -08:00
Colin Cross
e4e44bc61b Split vndk_libraries_txt into multiple module types
Replace the vndk_libraries_txt module type with llndk_libraries_txt,
etc. in preparation for making it a new SingletonModule, which will
only work with a single instance of the module type.

Bug: 176904285
Test: m checkbuild
Change-Id: Ie010a9eeee8f5849201aa4ab4eb9b2e7a9cd7d5b
2021-01-06 17:54:30 -08:00
Treehugger Robot
47d186cd4e Merge "Create vndkproduct.libraries.txt" 2021-01-07 01:43:15 +00:00
Bob Badour
a1b87c81ca Merge changes from topic "revert-1377717-metalics-BOEMJWNSHV"
* changes:
  Revert "Add ability to declare licenses in soong."
  Revert "Export soong license data to make."
  Revert "Define the standard license_kind rules."
2021-01-06 19:17:45 +00:00
Jerome Gaillard
61a55a0344 Revert "Export soong license data to make."
Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I51799c94a274eadab414abd80a07b5cda4584be9
2021-01-06 19:00:05 +00:00
Bob Badour
659f11fcfc Merge changes from topic "metalics"
* changes:
  Define the standard license_kind rules.
  Export soong license data to make.
  Add ability to declare licenses in soong.
2021-01-06 18:08:07 +00:00
Anton Hansson
22313cb192 Merge "Allow-list libderive_sdk" 2021-01-06 10:10:48 +00:00
Bob Badour
74fab31712 Export soong license data to make.
See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: If9d661dfcaa732c459d38d8ad7ec4a0e540846b8
2021-01-05 08:42:48 -08:00
Jiyong Park
4da079732d Add TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION
The APEX symlink optimization is a build-time trick to save the
storage/RAM usage of APEX by replacing some files in APEX with symlinks
to the files in the system partition. The optimization however is
automatically turned off for 'updatable: true' APEXes because doing the
optimization for them will hide the sys-health implication until when
the APEXes are built unbundled (i.e. prebuilt) and thus the
optimization is impossible.

TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION forcibly disables the safety net.
When it is set to true, the symlink optimization is done regardless of
the 'updatable' property. This is useful for some of the devices like Go
where most APEXes (even the 'updatable: true' ones) should be
effectively non-updatable.

Bug: 175630508
Test: TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION=true m and check that
updatable APEXes have symlinks to system libs

Change-Id: I26f72e5d5ebccc2d1e09c2a2f743db14937eb39a
2021-01-05 21:01:11 +09:00
Justin Yun
8a2600cfc9 Create vndkproduct.libraries.txt
Some VNDKs will be available to product modules by adding
'product_available' property. These VNDK libs will be listed in
vndkproduct.libraries.txt and tracked by the build system for the
changes. The product available VNDK list will be frozen by the
release process.

Bug: 174323911
Test: build
Change-Id: Ie1b085851413a8f2273925fefdc14fec3bfc7892
2021-01-05 20:05:39 +09:00
Anton Hansson
880109bd68 Allow-list libderive_sdk
This is an apex-safe library.

Bug: 176574970
Bug: 173188089
Test: m apex-allowed-deps-check
Change-Id: Ia789ca673a43339c95551dc6fbff1c4ca8e2ec16
Merged-In: Ia789ca673a43339c95551dc6fbff1c4ca8e2ec16
2021-01-01 16:55:06 +00:00
Cindy Zhou
c8680d0691 Skip apex dep check when sanitizer diag is enabled am: 18417cbd72 am: 262139d285
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1523578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8bf285bc3841f204941cf1d9c45203991cd40294
2020-12-29 17:59:10 +00:00
Cindy Zhou
18417cbd72 Skip apex dep check when sanitizer diag is enabled
To avoid adding ubsan to the apex allowed_dep list, this commit adds a
check on depedency tags to see if apex check should be skipped.
The check is only used on sharedLib dependencies when diag mode are enabled
for sanitizers.

Bug: 158010610

Test: make build for aosp-sargo and aosp_cf_x86_phone-userdebug

Change-Id: I3d7dbb70d8c80ffae1854819cf8cf9e6b0b15c00
2020-12-29 14:48:37 +00:00
Jaewoong Jung
9aded01f3a Merge "Break up app.go." am: 8bfb63c5a9 am: 1863d9abf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533144

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I85fe91320bfcf57af66ec375da732625d20aaf91
2020-12-28 18:57:12 +00:00
Jaewoong Jung
8bfb63c5a9 Merge "Break up app.go." 2020-12-28 17:50:44 +00:00
Anton Hansson
de5d8fb877 Merge "Add attribute to disable last-api compat tracking" am: 74c8436ce0 am: 325936250d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic3bd507f68636d3cd41c747ab22b6121417f1970
2020-12-23 09:45:00 +00:00
Anton Hansson
74c8436ce0 Merge "Add attribute to disable last-api compat tracking" 2020-12-23 09:05:46 +00:00
Jaewoong Jung
e3ec6f723e Merge "Remove unnecessary snake case variables." am: e794b1e302 am: ce131b6fcf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I26021fd6bd84ccf36b877eec0a35667446e3ebd4
2020-12-23 02:01:15 +00:00
Jaewoong Jung
18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross
4ee7ea6517 Merge changes from topic "llndk_cc_library" am: 1f8c272984 am: f0dee605eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532861

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba16d4c832f6daa38bb93510f46c9915cb23dc42
2020-12-22 19:43:10 +00:00
Colin Cross
1f8c272984 Merge changes from topic "llndk_cc_library"
* changes:
  Don't rewrite LLNDK dependencies with .llndk suffix
  Don't strip stub libraries
2020-12-22 18:55:34 +00:00
Mohammad Samiul Islam
a8008f9595 Add property to apex soong modules to forcefully compress an APEX
This makes creating compressed APEX artifacts for testing simpler.

Bug: 172911820
Test: atest apex_compression_platform_tests
Change-Id: I77b8bea4662c273420e7b37d5fde181b86c9cb78
2020-12-22 10:47:50 +00:00
Colin Cross
127bb8b9f6 Don't rewrite LLNDK dependencies with .llndk suffix
Rewriting LLNDK dependencies with .llndk suffix requries referencing
a global data structure to determine if a given library is an LLNDK
library and therefore needs the .llndk suffix.  References to
global data structures from mutators must be removed to support
incremental Soong analysis.  Instead, move the LLNDK stubs rules
into the vendor variant of the implementing cc_library so that
the original name can be used.

As an incremental step, the llndk_library modules are left in
place, and the properties are copied into the cc_library via
the dependency specified by the llndk_stub property.  A followup
will move the LLNDK properties directly into the cc_library and
delete the llndk_library modules.

The global list of LLNDK libraries is kept for now as it is used
to generate the vndk.libraries.txt file.

Bug: 170784825
Test: m checkbuild
Test: compare Soong outputs
Test: all Soong tests
Change-Id: I2a942b21c162541a49e27b2e5833c9aebccff1d0
2020-12-21 17:53:30 -08:00
Jaewoong Jung
f9b44657c8 Break up app.go.
Test: m nothing + TreeHugger
Change-Id: I64c6d7f10530c424bc282d8111dfaf9159426f00
2020-12-21 12:31:51 -08:00
Anton Hansson
dff2c78a20 Add attribute to disable last-api compat tracking
Setting this to true by default is dangerous as it can mask bugs. Create
a dedicated attribute for java_sdk_library to enable this behavior
instead. The default will be flipped in a future CL when all the current
offenders have been fixed.

Fix all the tests to have the right API files.

Bug: 176092454
Test: m nothing
Change-Id: Ieab94bcb74abf8d018365a56fb447fe3dbd46957
2020-12-21 17:25:30 +00:00
Colin Cross
cba3514b6e Merge "Fix NDK build in downstream branches" am: bad07a2fb9 am: 1f31a3e61b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532267

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie8358d59d1807c56930d4938ab26067afd0a5172
2020-12-20 06:20:51 +00:00
Colin Cross
e6a83e65d1 Fix NDK build in downstream branches
The NDK build in downstream branches with prebuilt apexes break
with multiple rules to copy the apex after
I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a renamed SkipInstall to
HideFromMake, which is shadowed by an existing HideFromMake method.
Call through from the existing HideFromMake as a quick-fix for the
build.

Fixes: 175911330
Test: NDK build
Change-Id: Id475671d5dad888913bfb1af2e4be1f2454c3211
2020-12-17 18:22:34 -08:00
Colin Cross
cc288ca3f4 Merge changes from topic "sbox_tools" am: 97a1be6e7b am: 62bc8d2316
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531944

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1788ff6407a03242902d572eb747abfa538d9578
2020-12-17 23:16:31 +00:00
Colin Cross
a9c8c9f145 Call ctx.InstallFile for uninstallable cc modules
SkipInstall is actually primarily used to prevent making a module
visible to Make, rename it and add new SkipInstall that actually
skips installation without affecting Make.

Call c.SkipInstall() for uninstallable cc modules to allow calling
c.installer.install, which will collect PackagingSpecs for
uninstallable cc modules, allowing them to be used by genrules.

Bug: 124313442
Test: m checkbuild
Change-Id: I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a
2020-12-17 10:02:18 -08:00
Treehugger Robot
0596c78a7e Merge "arch specific dependencies are supported for apex" am: f1c48afc31 am: 502066e794
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1527546

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iac527a34246fd30461f70e82202b22d78a079252
2020-12-17 01:24:14 +00:00
Treehugger Robot
f1c48afc31 Merge "arch specific dependencies are supported for apex" 2020-12-17 00:15:26 +00:00
Treehugger Robot
431e41e3b8 Merge "Always track transitive dependencies for host." am: abada78f05 am: dc6328e6f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531398

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83c971512e228e8b2742fbad566cb946774f1565
2020-12-16 13:53:29 +00:00
Treehugger Robot
abada78f05 Merge "Always track transitive dependencies for host." 2020-12-16 13:14:28 +00:00
Treehugger Robot
7a162fecb3 Merge "versioning macro is exported from prebuilt stubs as well" am: 6a8c18a89b am: a781b0a384
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1527540

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa46646bb30f94b53281d29849e12d2c1ccba038
2020-12-16 02:33:34 +00:00
Martin Stjernholm
f2635ec434 Always track transitive dependencies for host.
This fixes a regression in https://r.android.com/1515154 when building
the host ART APEX (com.android.art.host).

Test: art/build/apex/runtests.sh
Bug: 166468760
Change-Id: I39a00019b7bfa77a865e7287c66add3566b34d87
2020-12-16 01:34:43 +00:00
Treehugger Robot
6a8c18a89b Merge "versioning macro is exported from prebuilt stubs as well" 2020-12-16 01:31:10 +00:00
Colin Cross
74b6e49c91 Merge changes from topic "header_libs_requirement" am: 01a44004fd am: ea1903d539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1525004

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3e1e2a338d36de3e451488b0bce6121a43989e6
2020-12-15 19:03:12 +00:00
Jiyong Park
892a98f0a3 versioning macro is exported from prebuilt stubs as well
This change fixes a bug that the versioning macro (__LIBNAME_API__) is
omitted for prebuilts providing a stub.

Bug: 175166063
Test: m nothing

Change-Id: I1cce5ab58ef245622861200ec0d8b0f84e3178ed
2020-12-16 03:54:44 +09:00
Colin Cross
01a44004fd Merge changes from topic "header_libs_requirement"
* changes:
  Add libstagefright_mp3dec_headers to allowed apex deps
  Require libraries in header_libs to be cc_library_header
2020-12-15 18:40:55 +00:00
Treehugger Robot
e55788a64f Merge "Add quiche and its deps to apex/allowed_deps.txt" am: 16976bf676 am: 48f743c74c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521397

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iafafd46ca4dd219dfb937859031833f267d74d35
2020-12-15 16:17:38 +00:00
Bernie Innocenti
22d64d9d45 Add quiche and its deps to apex/allowed_deps.txt
Test: m
Bug: 155855709
Change-Id: I1eda029d912d53b0f888c4162422b4bbab948fe1
Merged-In: I0f4b1d011d058a1d3a43687a5ea0b7b5335aebbc
2020-12-15 09:34:08 +00:00
Treehugger Robot
82424f5085 Merge "Prebuilt stub not available to platform is handled correctly" am: e223512bb4 am: 1dc12fc99b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521398

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ida66490b3a0c8286ef050334efca3bbf47bff2b5
2020-12-15 07:24:58 +00:00
Orion Hodson
f48c1ae6eb Merge "apex/allowed_deps: add libnetjniutils" am: c7dff7f142 am: 4bc549e36b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519660

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I74f35ce8e8448f26ddd4d0b3b2202570026edd06
2020-12-15 07:24:45 +00:00
Treehugger Robot
e223512bb4 Merge "Prebuilt stub not available to platform is handled correctly" 2020-12-15 06:26:33 +00:00
Orion Hodson
c7dff7f142 Merge "apex/allowed_deps: add libnetjniutils" 2020-12-15 06:25:38 +00:00
Jiyong Park
f7c3bbe433 Prebuilt stub not available to platform is handled correctly
When a shared library providing stubs is included in an APEX, only the
stub variant (i.e. version:"1", etc.) gets emitted to Android.mk. This
enforces that everything in the Make world to link to the stub providing
only the public APIs of the library. The non-stub variant (i.e.
version:"") isn't exposed, otherwise, others will be able to access
private part of the lib which isn't guaranteed to be stable.

This has been done by unhiding the stub variant when it is known that
the library is actually included in an APEX. Note that stub variants are
by default hidden.

The above mechanism however doesn't work when the shared library is
replaced by a prebuilt and when the APEX is also replaced by a prebuilt.
Then, the fact that the prebuilt library is actually in the APEX gets
lost.  In that case, AnyVariantDirectlyInAnyApex() returns false for the
prebuilt library. As a result, the stub variant remains hidden and not
emitted to Android.mk.

This change fixes the problem by checking if the lib isn't available for
the platform at all. If not available for the platform (e.g.
apex_available doesn't have "//apex_available:platform"), the lib is
assumed to be included in an APEX even when it actually didn't go
through the apex mutator (... because it's a prebuilt).

Bug: 175166063
Test: m nothing

Change-Id: I41fabd5b368baecf4dc3c5a080b466f8bcd79d77
2020-12-15 09:17:36 +09:00
Yan Yan
76f91ea300 Merge "Allow IPsec module to depend on modules-utils-build" am: 1df80f2951 am: 22d8148922
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7c17de731d4e855bf9fcf46c55f76490895a5f73
2020-12-14 19:52:21 +00:00
Colin Cross
3f2fa9b846 Add libstagefright_mp3dec_headers to allowed apex deps
libstagefright_mp3dec_headers is being split out of
libstagefright_mp3dec.

Bug: 173252016
Test: m checkbuild
Change-Id: I7ab485832628203a907ebe8c3f79325d8b5788f4
2020-12-14 19:28:47 +00:00
Yan Yan
1df80f2951 Merge "Allow IPsec module to depend on modules-utils-build" 2020-12-14 18:33:50 +00:00