Commit graph

1265 commits

Author SHA1 Message Date
sophiez
87ff51db84 Automated NDK API coverage used by Mainline modules build integration.
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only

Change-Id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15
2021-01-21 18:08:50 +00:00
Paul Duffin
9f04524673 Allow createGlobalSoongConfig() to be used from tests
Previously, the createGlobalSoongConfig() function was explicitly
prevented from being used in tests because it would fail. However, it
turns out that is no longer the case and it does now work.

That allows the following changes to be made:
* Tests no longer need to use GlobalSoongConfigForTests() to
  prepopulate the cache.
* GlobalSoongConfigForTests() is only needed in the dexpreopt
  package.

Bug: 177892522
Test: m nothing
Change-Id: Ifcbb1a44254c5d2d10c1d02ab23227488d1d1ed1
2021-01-21 15:44:30 +00:00
Hyundo Moon
2b7d4e1ba4 Merge "Allow service-media-s in apex" 2021-01-21 15:00:13 +00:00
Treehugger Robot
d684e04247 Merge "LOCAL_REQUIRED_MODULES from apex has ":32" or ":64" suffix" 2021-01-21 14:34:37 +00:00
Paul Duffin
c059c8c9a0 Add java.RegisterRequiredBuildComponentsForTest function
Insulate tests that exercise code in the java package from having to
register the build components provided by the java package by providing
a single function that registers them all. This follows the pattern
currently used in the cc and rust packages.

This change is in preparation for switching the dex_bootjars singleton
from a singleton, which does not require a module definition in order
to be instantiated, to a singleton module which does. That will require
adding a module definition into java.GatherRequiredDepsForTest() and
this change ensures that the required components will have been
registered in every test.

Bug: 177892522
Test: m nothing
Change-Id: I6475db8240894947dd07c89a940a3e4f201aa598
2021-01-21 11:47:32 +00:00
Hyundo Moon
8bee1b00ea Allow service-media-s in apex
Bug: 175511943
Test: Builds successfully
Change-Id: I5d76087d3c537205e8b8ca837c13ca1aeb641b4c
2021-01-21 02:21:23 +00:00
Ulyana Trafimovich
0caabb6e27 Merge "Support building boot images with disabled dexpreopt." 2021-01-20 17:46:02 +00:00
Bill Peckham
1c8e5e817e Merge changes from topic "prebuilt-hiddenapi"
* changes:
  Supply LOCAL_SOONG_DEX_JAR for java_import with compile_dex.
  Enable an apex to include a java_import.
  Enable prebuilt hiddenapi CSV files.
2021-01-20 17:43:48 +00:00
Mohammad Islam
43c2fe1620 Merge "Fix capex build rule when building using RBE" 2021-01-20 14:21:17 +00:00
Ulya Trafimovich
a4a1c4ee98 Support building boot images with disabled dexpreopt.
Bug: 176171716
Test: build_mainline_modules.sh and ensure that the ART boot image is
    built: `find out -type f -name '*.art'` is nonempty for every arch.
Change-Id: Ibc45581eef2b205c750a30709780cf659ba7cfa1
2021-01-20 14:03:07 +00:00
Jiyong Park
57621b29c4 LOCAL_REQUIRED_MODULES from apex has ":32" or ":64" suffix
Currently, when a module is included in an APEX, the dependencies of the
modules are listed in LOCAL_REQUIRED_MODULES of the APEX. There are two
purposes for this:

1) for native dependencies, they are installed to
$(TARGET_OUT)/apex/<apexname> directories which isn't packaged as an
*.img. However, as a side effect of the installation, their symbol files
are placed under $(TARGET_OUT)/symbols directory to aid debugging.

2) to implement the symlink optimization. When the APEX is not
updatable, the dependencies are not included inside the APEX, but
installed directly to /system partition because the same files might be
used outside of the APEX. The files in the APEX are replaced with
symlinks to the system copy.

So far, the module name like "libfoo" was directly used in
LOCAL_REQUIRED_MODULES. This becomes problematic when only a single arch
variant of the module is used by the APEX. The build system will install
both arch variants to the system partition.

This change fixes the problem by appending ":32" or ":64" suffix
when composing LOCAL_REQUIRED_MODULES.

Bug: N/A
Test: m
Test: Cherry-pick I285c5d1bb9b27265c8589f2588d95eafa324d412 and its
dependencies from internal master. `m nothing` doesn't show the artifact
path requirement error.

Change-Id: I78feae1d5b18f93b0f984d3b1558812fd1689a96
2021-01-20 20:44:35 +09:00
Ryan Prichard
809eac3057 Merge "Switch platform EH unwinder to prebuilt LLVM libunwind" 2021-01-20 00:10:59 +00:00
Bill Peckham
a41a6963b4 Enable an apex to include a java_import.
With the addition of the compile_dex property to the
java_import module it becomes possible to include a
java_import module in an apex. This change allows the
dependency and adds a test.

Bug: 177228901
Test: m nothing
Test: new TestApexWithJavaImport
Change-Id: I9336dade1857109e2fd21f7d57e1dc4abc4a402c
2021-01-19 18:15:03 +00:00
Mohammad Samiul Islam
9ac0e32979 Fix capex build rule when building using RBE
Presubmit builds were failing cause they were being built using RBE.

Bug: 172911362
Test: presubmit-builds are passing now
Change-Id: I65ffd912ccf2f4fb8cb9824e7a9579f66908d7b3
2021-01-19 11:32:29 +00:00
Paul Duffin
064b70c918 Export dex implementation jars from prebuilt_apex
Dexpreopt and boot jars package check all require access to dex
implementation jars created for java_library and java_sdk_library. They
were available when building from source but not when building from
prebuilts, even though they are embedded within the .apex files that
are referenced from prebuilt_apex.

This changes adds support to prebuilt_apex to export the dex
implementation jars and updates java_import to use those exported dex
implementation jars.

In a source build dexpreopt/boot jars package check access the apex (or
platform) specific variant of a java_library, e.g. core-oj, from which
it retrieves the dex implementation jar path.

After this change in a prebuilt build dexpreopt/boot jars package check
behave in the same way except in this case they retrieve the dex
implementation jar path from the apex (or platform) specific variant of
the java_import, e.g. core-oj.

The work to export files from a `.apex` file for use by other modules
is performed by a new `deapexer` module type. It is not used directly
in an `Android.bp` file but instead is created implicitly by
`prebuilt_apex`,

In order to do that this contains the following changes:
* Adds a new `dexapexer` module type to handle the exporting of files
  from the `.apex` file.
* Adds an exported_java_libs property to prebuilt_apex to specify the
  set of libraries whose dex implementation jars need exporting.
* Creates apex specific variants of the libraries listed in the
  exported_java_libs property.
* Adds the set of exported files to the ApexInfo to make them available
  to the apex specific variants.
* Prevents the prebuilt_apex variants from being merged together as
  they will not be compatible.
* Modifies java_import to use the exported file for variants of a
  prebuilt_apex.
* Adds a ninja rule to unpack (using deapexer) the contents of the
  prebuilt_apex's apex file, verify that the required files are present
  and make them available as outputs for other rules to use.
* Some minor refactorings to support these changes.
* Adds tests to cover prebuilt only, prebuilt with source preferred,
  and prebuilt preferred with source.

Test: m nothing
Bug: 171061220
Change-Id: Ic9bed81fb65b92f0d59f64c0bce168a9ed44cfac
2021-01-15 18:14:10 +00:00
Treehugger Robot
2463ec5ad5 Merge "Update apex/allowed_deps.txt" 2021-01-14 11:35:06 +00:00
Paul Duffin
4746ae400c Merge "Extract ApexFileProperties from apex PrebuiltProperties" 2021-01-14 11:07:16 +00:00
Mill Chen
797e067b1c Update apex/allowed_deps.txt
Import intermediate-AndroidX Design Library from local Maven ZIP.

Bug: 177216791
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Iffdf5e03f76fa5583a751d048ccb85b69c091de2
Merged-In: Iffdf5e03f76fa5583a751d048ccb85b69c091de2
2021-01-14 17:57:05 +08:00
Maciej Żenczykowski
47dbd2619b Merge "Add bpf_syscall_wrappers for tethering apex and update allowed-deps.txt" 2021-01-14 07:36:50 +00:00
Ryan Prichard
b35a85ee8b Switch platform EH unwinder to prebuilt LLVM libunwind
For the platform libc++ STL, remove the
-Wl,--exclude-libs,libunwind_llvm.a argument, which is redundant with
the same argument in deviceGlobalLdflags.

Bug: http://b/153025717
Test: device boots
Change-Id: Idd7791d52f74aab2d5f59419fb75f841fc29a2eb
2021-01-13 19:51:06 -08:00
Paul Duffin
851f3995bc Extract ApexFileProperties from apex PrebuiltProperties
The properties and logic to select the appropriate arch specific src
property will need to be shared between the 'prebuilt_apex' module type
and an upcoming 'deapexer' module type to which the `prebuilt_apex`
will delegate responsibility for exporting the '.apex' file's contents.
This refactoring extracts them into the new ApexFileProperties struct
for reuse.

Bug: 171061220
Test: m nothing
Change-Id: Iac321a28afc469e885ee5b19ad33fecd94117236
2021-01-13 23:22:13 +00:00
Hungming Chen
e261c0107a Add bpf_syscall_wrappers for tethering apex and update allowed-deps.txt
Split the BPF system calls header definition into a new header library
(bpf_syscall_wrappers). Both platform and tethering apex require the
BPF system call definition. Move the definition from system/bpf/
libbpf_android/include/bpf/BpfUtils.h to frameworks/libs/net/
common/native/bpf_syscall_wrappers

Test: build, flash and run atest BpfMapTest
Change-Id: Ief5ffbb96c216796e4f0f4cacbde7c08f4af274a
2021-01-13 17:09:21 +00:00
Evgenii Stepanov
aa12c9b040 Add memtag_heap notes to allowed deps.
Bug: b/135772972
Test: build with SANITIZE_TARGET=memtag_heap
Merged-In: Id580f55cc9ee6d0ef452d7c0d84f56bf8cd1402a
Change-Id: Id580f55cc9ee6d0ef452d7c0d84f56bf8cd1402a
2021-01-12 21:22:35 -08:00
Mohammad Islam
fdb9e89642 Merge "Add property to apex soong modules to forcefully compress an APEX" 2021-01-12 13:51:50 +00:00
Lucas Lin
dcd957eac5 Merge "Add netd-client for tethering apex and update allowed-deps.txt" 2021-01-11 01:49:12 +00:00
Anton Hansson
c7ca43ec92 Merge "Allowlist sdkextensions proto lib" 2021-01-08 09:39:41 +00:00
lucaslin
5a73550925 Add netd-client for tethering apex and update allowed-deps.txt
Split some code from Tethering apex to frameworks/libs/net and
have a new library(netd-client) for it. So basically, netd-client
contains code which was already in Tethering apex.
netd-client also links to netd_aidl_interface-java and
netd_event_listener_interface-java, so netd_aidl_interface-java
and netd_event_listener_interface-java are also added into
allowed-deps.txt.

Bug: 174837473
Test: Manual test and check the log.
Change-Id: I31a467f02a8f3049e005d771d61f3d990ac9b8ba
Merged-In: I31a467f02a8f3049e005d771d61f3d990ac9b8ba
2021-01-08 01:56:11 +00:00
Treehugger Robot
1985115ff1 Merge "android_filesystem modules can be included in APEX" 2021-01-08 00:32:19 +00:00
Bob Badour
ddac9bf3f2 Merge changes from topic "revert-1541855-revert-1377717-metalics-BOEMJWNSHV-PBOZXBJQZD"
* changes:
  Revert^2 "Define the standard license_kind rules."
  Revert^2 "Export soong license data to make."
  Revert^2 "Add ability to declare licenses in soong."
2021-01-07 22:42:08 +00:00
Anton Hansson
2ef1084896 Allowlist sdkextensions proto lib
This is safe for apex use.

Bug: 173188089
Test: m apex-allowed-deps-check
Merged-In: Ib4a69d93843d4e3b44073c79e704c5fc1635c1ad
Change-Id: Ib4a69d93843d4e3b44073c79e704c5fc1635c1ad
2021-01-07 13:00:20 +00:00
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
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
8bfb63c5a9 Merge "Break up app.go." 2020-12-28 17:50:44 +00:00
Anton Hansson
74c8436ce0 Merge "Add attribute to disable last-api compat tracking" 2020-12-23 09:05:46 +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
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
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
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
f1c48afc31 Merge "arch specific dependencies are supported for apex" 2020-12-17 00:15:26 +00:00
Treehugger Robot
abada78f05 Merge "Always track transitive dependencies for host." 2020-12-16 13:14:28 +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
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
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
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
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
Paul Duffin
57fab96e01 Merge changes Iaca95efc,I7ccd5581
* changes:
  Add RemoveOptionalPrebuiltPrefix() helper function
  Delegate work of apexInfoMutator to ApexInfoMutator interface
2020-12-14 10:54:21 +00:00
Jiyong Park
59140307ec arch specific dependencies are supported for apex
The apex module type now supports arch specific native dependencies.

apex {
    name: "myapex",
    arch: {
        arm64: {
	    native_shared_libraries: ["arm64_only_lib"],
	},
    },
}

Bug: 174639241
Test: m nothing
Change-Id: I3f00aa87c480d4127b27d33e9620c4336824e937
2020-12-14 18:44:04 +09:00
Sophie Zheng
e3a2bdf2c8 Merge "Automate NDK API coverage used by Mainline modules build integration" 2020-12-11 22:19:00 +00:00
Paul Duffin
d23c726b36 Add RemoveOptionalPrebuiltPrefix() helper function
Test: m nothing
Bug: 171061220
Change-Id: Iaca95efcaf3f02e066751c6e988d609ac40e048a
2020-12-11 18:13:08 +00:00
Paul Duffin
a7d6a89774 Delegate work of apexInfoMutator to ApexInfoMutator interface
Refactor the apexInfoMutator to delegate the work to an implementation
of ApexInfoMutator and then move the existing functionality into the
apexBundle.ApexInfoMutator(). This will allow a follow up change to
customize the behavior of this mutator for prebuilt_apex modules.

Test: m nothing
Bug: 171061220
Change-Id: I7ccd55818e02a606c5494e215f4370b635ddd0a5
2020-12-11 16:07:17 +00:00
Paul Duffin
08703826bd Merge "Rename apexDepsMutator to apexInfoMutator" 2020-12-11 10:06:19 +00:00
Paul Duffin
4d934af2ee Merge "Extract testDexpreoptWithApexes() for reuse" 2020-12-11 10:06:07 +00:00
Jiyong Park
6f05a73e3e Merge "stub variants also re-exports headers" 2020-12-11 08:50:12 +00:00
Jiyong Park
1ad8e16fbe stub variants also re-exports headers
This change fixes a bug that headers are not re-exported from stub
variants of a library, if the headers are not from header libs, but from
shared or static libs. This is because only header lib dependencies
are respected for stubs variants.

The fix is as follows. 1) dependencies to the shared/static libs are
added even for stubs variants. 2) instead, in depsToPaths, they are
treated like header libs (i.e. don't contribute to linkFile) for the
stubs variants.

Bug: 174558745
Test: m

Change-Id: Iab6c77e7817055d0f2d09cb114186b30164fc231
2020-12-11 13:48:28 +09:00
sophiez
55e8815fb8 Automate NDK API coverage used by Mainline modules build integration
Dist txt files containing NDK APIs used by Mainline modules

Test: TARGET_BUILD_APPS=com.google.android.adbd m dist apps_only

Change-Id: I035f1e0cc7eb43fc09e796dbc6ce77e65b8aa3b4
2020-12-11 00:45:20 +00:00
Jiyong Park
b555609098 Merge "rust ffi libraries can be included in APEX" 2020-12-10 23:54:34 +00:00
Jiyong Park
0d399b5915 Merge "Add min_sdk_version to Rust modules." 2020-12-10 23:54:34 +00:00
Paul Duffin
949abc03eb Rename apexDepsMutator to apexInfoMutator
Generally ...DepsMutator methods add dependencies between modules but
the apexDepsMutator does not which can be confusing. This renames
apexDepsMutator to apexInfoMutator and adds some extra documentation to
clarify its function. It also renames the registered name for the
mutator and its associated providers from apex_deps to apex_info.

Test: m nothing
Bug: 171061220
Change-Id: Ic074a281215b23e982448ccff7ac075236123bee
2020-12-10 20:16:57 +00:00
Paul Duffin
c3bbb96667 Extract testDexpreoptWithApexes() for reuse
Extracts testDexpreoptWithApexes() from testDexpreoptWithApexes() to
reuse in other tests.

Test: m nothing
Bug: 171061220
Change-Id: Iee62b68d72133b4cc066e2875bd27d7051206cbc
2020-12-10 20:16:57 +00:00
Steven Moreland
35989ae98b Merge "target.apex.exclude_[shared|static]_libs to cc_* modules" 2020-12-10 19:02:02 +00:00
Treehugger Robot
a4fd2ea7b2 Merge "Add neuralnetworks_utils_hal_service to apex/allowed_deps.txt" 2020-12-10 12:21:57 +00:00
Jiyong Park
2b33ad60aa Merge "test_for is available for all cc_* module types" am: 2920d2cec0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517638

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38d61acc50786ee97ee85e7cf89d9664dd91a148
2020-12-10 00:33:40 +00:00
Jiyong Park
2920d2cec0 Merge "test_for is available for all cc_* module types" 2020-12-10 00:16:29 +00:00
Yan Yan
1a93af7632 Allow IPsec module to depend on modules-utils-build
This is generated by build/soong/scripts/update-apex-allowed-deps.sh

Bug: 157577190
Test: builds
Change-Id: Ie71c63238c16c9cade400e1b3df02c35d915265c
2020-12-09 15:48:55 -08:00
Ivan Lozano
3e9f9e47cf Add min_sdk_version to Rust modules.
Add the min_sdk_version property to Rust modules so they can declare
a minimum SDK version they support for use with APEX modules.

Test: New Soong test passes.
Bug: 174862583
Change-Id: I2829053a320f50c218783dee5adbeff9cef81e8e
2020-12-09 11:30:44 -05:00
Slava Shklyaev
af1df7008b Add neuralnetworks_utils_hal_service to apex/allowed_deps.txt
Similarly to the other neuralnetworks_utils_hal_* targets, this new
target is a result of restructuring our code.

Generated with build/soong/scripts/update-apex-allowed-deps.sh

Bug: 170289677
Test: m
Change-Id: I7ca24e8afe6cfb978d51f0b55389615e5f28a1e0
Merged-In: I7ca24e8afe6cfb978d51f0b55389615e5f28a1e0
(cherry picked from commit c1a84ca5cb)
2020-12-09 16:01:31 +00:00
Mohammad Islam
8f1078cdcd Merge "Enable soong build tool to handle APEX compression" am: 5d2c54f1e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511283

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I567fada250e030005c9c103b1c24228bf0b52988
2020-12-09 14:49:33 +00:00
Mohammad Islam
5d2c54f1e2 Merge "Enable soong build tool to handle APEX compression" 2020-12-09 14:34:42 +00:00
Jiyong Park
46a512f1f5 test_for is available for all cc_* module types
Sometimes, the ordinary cc_library_* modules need test_for property when
they are part of a bigger cc_test. Instead of propagating the test_for
property from cc_test to its dependencies, this change requires the very
dependency which needs access to the private part of an APEX to
explicitly have the test_for property.

Bug: 161575591
Test: m
Change-Id: Ie1ffe9a60cd2ab02d41bbe5a98225a40392470f6
2020-12-09 12:59:19 +09:00
Jiyong Park
f2cc1b77f3 rust ffi libraries can be included in APEX
This CL fixes a bug that rust_ffi_shared libraries can't be included in
an APEX either directly (via native_shared_libs property) or indirectly.

Bug: 175105284
Test: m
Change-Id: I2e2d3e11b3901f3412b9725e47a8ebf31f93847b
2020-12-09 00:29:54 +09:00
Anton Hansson
f261d7c2bf Merge "Add native modules build utils to allow list" am: d230030dfd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518600

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41c3cb22b2f18b22b128e418976b2e7f7c0e7aef
2020-12-08 14:34:05 +00:00
Orion Hodson
50ad989646 apex/allowed_deps: add libnetjniutils
Bug: 158749603
Test: m
Change-Id: I00a8d61eebba5ae43f2338822854264dfabad4af
2020-12-08 13:55:16 +00:00
Mohammad Samiul Islam
3cd005d347 Enable soong build tool to handle APEX compression
1. Soong can now detect PRODUCT_COMPRESSED_APEX flag
     We don't want APEX to be compressed on all devices. Only those that
     have explicitely set PRODUCT_COMPRESSED_APEX flag.
2. Handle "compressible" field in soong build rule
     On devices that supports APEX compression, all APEX will be
     compressed by default. If any apex does not want to be compressed,
     they will need to state that by setting "compressible" field to
     false
3. Can use apex_compression_tool to compress APEX
     Note we compress the APEX after it has been signed. That way, when
     we decompress we will get a signed APEX.
4. Place the compressed APEX in system with .capex extension
     This makes it easy to identify. We still preserve the original
     extension so that when we decompress, we can just rename by cuttif
     off the .capex extension.

Note: with this change, we can create a system image with compressed
APEX, but we cannot boot with it since platform doesn't know how to
handle .capex files. Platform support will be added on follow up CLs.

Bug: 172911362
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=true m (apex_test.go)
Test: observed $OUT/system/apex has .capex files
Change-Id: I20ac4c4ceb521924c751a6017f979b2d808fdded
2020-12-08 13:06:25 +00:00
Anton Hansson
1e1e823895 Add native modules build utils to allow list
This is a backward-compatible library.

Test: m with dep
Change-Id: Id68a00efe8973e7660ce2e53d42b7741c9f22a5c
2020-12-07 12:54:07 +00:00
Jiyong Park
e386754898 target.apex.exclude_[shared|static]_libs to cc_* modules
The property is used to exclude some shared and static libs when the
module is built for an APEX.

Bug: 166468760
Test: m
Change-Id: I0dcaa4ae94c01aa00dc5539c60d3054c57fd8824
2020-12-04 18:09:39 +09:00
Treehugger Robot
00fd1c09d5 Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." am: d348c41af5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515504

Change-Id: Id640558409539dd91f945f35786085afcbbf8fa3
2020-12-04 07:32:25 +00:00
Treehugger Robot
d348c41af5 Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." 2020-12-04 06:23:51 +00:00
Kiyoung Kim
41e45d90b3 Merge "Add linkerconfig to Runtime APEX" am: 2ba87f466c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513630

Change-Id: I52d9e487f3dba459bde89db08182227b8f1ad526
2020-12-04 01:35:45 +00:00
Martin Stjernholm
2856c66c99 Don't use module names with "prebuilt_" prefixes in make dependencies.
The distinction between foo and prebuilt_foo doesn't exist in make, so
this could create invalid dependencies when both source and prebuilt
modules exist and the prebuilts are preferred.

Test: `m` with ART module prebuilts with prefer:true in the tree
Test: m nothing
Bug: 172480615
Change-Id: I90b76a8f38493882b3330d1b6789159852e59d55
2020-12-04 01:00:23 +00:00
Kiyoung Kim
2ba87f466c Merge "Add linkerconfig to Runtime APEX" 2020-12-04 01:00:22 +00:00