Commit graph

1387 commits

Author SHA1 Message Date
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
Paul Duffin
777bf29f3b Merge changes Iaca95efc,I7ccd5581 am: 57fab96e01 am: 3645404e1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1526698

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic6dfde31f226d1ef726d155a40b255b4ac626272
2020-12-14 11:36:31 +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
2246c7bbc0 Merge "Automate NDK API coverage used by Mainline modules build integration" am: e3a2bdf2c8 am: f0fa9dfdd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516605

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic15891d61ac95747f2f2aca0f97cbe302f6e6b70
2020-12-11 22:53:15 +00: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
b6f7bd5d24 Merge "Rename apexDepsMutator to apexInfoMutator" am: 08703826bd am: 452cdd33da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1523982

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I388a2927d49048b5de97fb82cdc494308cef4c0a
2020-12-11 11:15:36 +00:00
Paul Duffin
92f5559fb5 Merge "Extract testDexpreoptWithApexes() for reuse" am: 4d934af2ee am: 30642ff255
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1523981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib745536acb0a80bfd4f5ba9492eeae942908132c
2020-12-11 11:15:25 +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
4d4fce3df8 Merge "stub variants also re-exports headers" am: 6f05a73e3e am: 0c6aecfa06
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518569

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib42ca356ba35563e8de8ae93d2a3db6b2305ec60
2020-12-11 09:55:21 +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
1d58cd8e63 Merge "rust ffi libraries can be included in APEX" am: b555609098 am: 83732bad33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519482

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52f08cde8ddfedbbb9ed55544ba70d4cbd971833
2020-12-11 00:43:40 +00:00
Jiyong Park
a3df735a37 Merge "Add min_sdk_version to Rust modules." am: 0d399b5915 am: 6b31120281
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518205

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4b7735516482cfb8ea743c087d147ef3cb85663e
2020-12-11 00:43:37 +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
3d8f7f7419 Merge "target.apex.exclude_[shared|static]_libs to cc_* modules" am: 35989ae98b am: 2abc02e623
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I274f31fecb5730708b23c4f6aefea6495d46a57e
2020-12-10 19:48:41 +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
2826fca6e6 Merge "Add neuralnetworks_utils_hal_service to apex/allowed_deps.txt" am: a4fd2ea7b2 am: 00a1a3e059
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib9e29a14b01e3a587d61fe93d2b8d101b8895760
2020-12-10 13:08:42 +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
d21fb571b8 Merge "test_for is available for all cc_* module types" am: 2920d2cec0 am: 2b33ad60aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517638

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb7b66c56d49f6d6731416e9a1ae45e1f5b73d19
2020-12-10 00:58:43 +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
85e27e8c69 Merge "Enable soong build tool to handle APEX compression" am: 5d2c54f1e2 am: 8f1078cdcd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511283

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6541eb4829908c85a08aa2fcb10f2c951059444e
2020-12-09 15:23:01 +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
4fa54d1865 Merge "Add native modules build utils to allow list" am: d230030dfd am: f261d7c2bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518600

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2b3766e8f2af22ad77d323e554140e6902c38790
2020-12-08 15:22:09 +00: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
83d5ddd5eb Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." am: d348c41af5 am: 00fd1c09d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515504

Change-Id: If7dabf0da9a2158305ecfd38cda94dbe09707f7d
2020-12-04 07:55:36 +00: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
aa7703d34b Merge "Add linkerconfig to Runtime APEX" am: 2ba87f466c am: 41e45d90b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513630

Change-Id: Idf724126083d36da8c412bd1eb7c782ba0d5e372
2020-12-04 02:04:52 +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
Sophie Zheng
c6dc18ac2a Merge "Automated NDK API coverage used by Mainline modules build integration." am: 8baa8b50a8 am: 94443b9511
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496322

Change-Id: Ib0ed665f1e14c4a6664aa4221c6c0a5ccdbe2e96
2020-12-04 00:22:31 +00:00
Sophie Zheng
94443b9511 Merge "Automated NDK API coverage used by Mainline modules build integration." am: 8baa8b50a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496322

Change-Id: I960f808499c2f63cfb04c98fe4e35cdc65b94e4a
2020-12-03 23:56:09 +00:00
Treehugger Robot
19c0e36c53 Merge "Rename __ANDROID_SDK_VERSION__." am: fe9e0c775c am: 440ad728a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502112

Change-Id: Ia0f8b1790c6eaf4ae79a6867c1a9ea423091479c
2020-12-03 23:30:38 +00:00
Sophie Zheng
8baa8b50a8 Merge "Automated NDK API coverage used by Mainline modules build integration." 2020-12-03 23:30:21 +00:00
Treehugger Robot
440ad728a4 Merge "Rename __ANDROID_SDK_VERSION__." am: fe9e0c775c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502112

Change-Id: I72397bc3c7da996d44a088a252ca58124118da47
2020-12-03 22:29:10 +00:00
Treehugger Robot
fe9e0c775c Merge "Rename __ANDROID_SDK_VERSION__." 2020-12-03 22:09:56 +00:00
Colin Cross
e4e955818a Merge "Pass pctx and ctx to NewRuleBuilder" am: 897a5ad507 am: c5666f9231
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500984

Change-Id: I10687ab8328c4b294f7eea81fc043cb3b1ffe556
2020-12-03 20:38:59 +00:00
Colin Cross
c5666f9231 Merge "Pass pctx and ctx to NewRuleBuilder" am: 897a5ad507
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500984

Change-Id: Idd3ca2ed1b5ea6c0d666c35d1669bc90ee6edfdc
2020-12-03 20:16:11 +00:00
sophiez
c80a2b392e 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

Forrest run: android-build.googleplex.com/builds/forrest/run/L97800000742565481

Change-Id: I39e5aa7c74eff46aba06808642b2bd67ae45ba1e
2020-12-03 05:45:20 +00:00
Saeid Farivar Asanjan
8cb9f3f5ef Add car-ui-lib-overlayable to apex allowed_deps
Bug: 168062639
Test: manual
Change-Id: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
Merged-In: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
(cherry picked from commit 0b94aab5ef)
2020-12-02 08:58:34 -08:00
Kiyoung Kim
4098c7eddf Add linkerconfig to Runtime APEX
Add linkerconfig to Runtime APEX module.

Bug: 165769179
Test: Cuttlefish boot succeeded
Change-Id: I31c4bfa2ce88b64d7100f227ec289416db253b13
2020-12-02 11:33:54 +09:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Dan Albert
b19953d04a Rename __ANDROID_SDK_VERSION__.
__ANDROID_SDK_VERSION__ is ambiguous. Rename it
__ANDROID_APEX_MIN_SDK_VERSION__ so it's clear which SDK version it
refers to.

Note that this is still different from the minSdkVersion of the module
being compiled. This is the max of *all* the minSdkVersions of modules
that this module shares an APEX with.

Test: treehugger
Bug: None
Change-Id: Id9cbd80a6bc99db8227daef4e1db9c893e63ad1e
2020-11-30 14:39:01 -08:00
Jiyong Park
a9faa25e54 Merge "rust modules can be included in apex" am: fdea25781f am: 88365d1894
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508096

Change-Id: Ida72f5291f3c1a1c7f9fd0301e4a0055bbaddead
2020-11-30 17:01:21 +00:00
Jiyong Park
fdea25781f Merge "rust modules can be included in apex" 2020-11-30 15:41:28 +00:00
Jiyong Park
99644e92c8 rust modules can be included in apex
We will have some APEXes having rust binaries and libraries. So, adding
the support for the types of modules.

rust.Module now inherits from android.ApexModuleBase and implements
the android.ApexModule interface.

Bug: 172414324
Test: m

Exempt-From-Owner-Approval: rebased after +2 from the owner
Change-Id: I356ef4c45f782a6460f001e83af96d1710642d80
2020-11-30 15:40:48 +00:00
Paul Duffin
53a3c6f30f Merge "Remove redundant setting of DistFiles by apexBundle" am: 11402caa47 am: ba5ddbd78c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511915

Change-Id: I3b10f405bdf9a2c207500f7b492b184c8c483c29
2020-11-30 13:41:38 +00:00
Paul Duffin
dd2b98baf4 Merge "Differentiate between no dist tag and an empty dist tag" am: 4326e0e094 am: 982093faaf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511911

Change-Id: Ifc4b718d162f8e95009502d4d62684fb9d9d4cff
2020-11-30 13:41:15 +00:00
Paul Duffin
281bc00bbf Remove redundant setting of DistFiles by apexBundle
A previous change handles dist properties automatically for all module
types and as a result has made the apexBundle setting of DistFiles
redundant so this change removes that.

Test: m nothing
      m dist sdk - before and after this change, compare result to
      make sure that there are no significant differences.
      Test the effect on the apex by following instructions in
      http://b/172951145
Bug: 174226317
Change-Id: If6f741b5b73b3335f4c478a6528f5f311cd633e4
2020-11-27 15:17:44 +00:00
Paul Duffin
74f05598eb Differentiate between no dist tag and an empty dist tag
Change https://r.android.com/1335521 added tag property to the Dist
struct so that it could be used to select one of a number of different
output files to copy to the dist instead of the single file that the
module type made available for dist. The output files were selected
by passing the tag to OutputFiles(tag).

Module types that wanted to support this new approach had to explicitly
set AndroidMkEntries.DistFiles = GenerateTaggedDistFiles(module).
Unfortunately, doing that had a side effect of changing the behavior of
dist entries without a tag.

That was because the change treated a tag that was not specified, as
being the same as "". So, prior to the change no tag meant use the
default dist file but after it meant use the paths returned by
OutputFiles(""). That changed the behavior of the java.Library type
which affected the behavior of the android_app module type.

Prior to the change the java_library would make the
Library.outputFile available for dist when no tag was specified. After
that change it would make Library.outputFile plus
Library.extraOutputFiles. The latter is usually empty except for
android_app which adds some extra files into there which will now be
copied to the dist. That change may have been intentional but there
was no mention of it in the change or the bug. Even if it wasn't
intentional it may still be beneficial.

Any module type that wants to add support for tags in dist runs the
risk of introducing similar changes in behavior. This change
differentiates between the tag not being set and the tag being set to
"" to avoid that possibility and to make the default behavior
explicit for those module types that have switched.

It does so as follows:
* Adds a DefaultDistTag constant that is used when the tag is not set.
  It is a string that is unlikely to be used as an actual tag as it
  does not start with a . and uses some special characters.
* The DefaultDistTag is used in MakeDefaultDistFiles(paths) to indicate
  that the supplied paths are the default ones and and also in
  GenerateTaggedDistFiles() for Dist structures that have no tag
  property set.
* The DefaultDistTag is passed to OutputFiles(tag) just in case the
  module type has explicitly defined the paths to associate with that
  tag in there. If it has then it overrides the legacy behavior. If it
  has not then it is just ignored and falls back to using the previous
  behavior.
* The java.Library.OutputFiles(tag) method explicitly handles the
  DefaultDistTag and returns Library.outputFile for it which restores
  the behavior from before the change that added dist.tag support.
* Similar change was made to apexBundle.OutputFiles(tag) in order to
  preserve its previous behaviour.
* The customModule used by TestGetDistContributions has been modified
  to also preserve its previous behavior after this change.

Test: m nothing
      m dist sdk - before and after this change, compare result to
      make sure that there are no significant differences.
      Test the effect on the apex by following instructions in
      http://b/172951145
Bug: 174226317
Change-Id: Ib8f0d9307751cc2ed34e3d9a5538d3c144666f6d
2020-11-27 15:17:44 +00:00
Treehugger Robot
403cc39d4c Merge "Documenting apex/builer.go" am: 9c4c534d25 am: 024e2442bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1509688

Change-Id: I3667e0a2411953ad58e2309749cff2228ee4e371
2020-11-27 01:28:45 +00:00
Jiyong Park
b81b99032d Documenting apex/builer.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reordering functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: Iefdc8e463bcda60187b98e8c90661e220e8cdf40
2020-11-25 09:53:46 +09:00
Treehugger Robot
656b1247bc Merge "Documenting apex/apex.go" am: 333d235475 am: bca26b52d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505673

Change-Id: I867ff8b7074fc0633a974da908d59cd1b6ad26a0
2020-11-24 06:36:00 +00:00
Jiyong Park
c0ec6f99d7 Documenting apex/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m

Change-Id: Ie1799c0972d63da823ad375f008018de782529d1
2020-11-24 09:28:50 +09:00
Treehugger Robot
edb17b5f22 Merge "Documenting android/apex.go" am: b26070efef am: 7ea5837252
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502070

Change-Id: I261a08fe569600a33306cda9032ae96471e48f06
2020-11-23 01:36:53 +00:00
Jiyong Park
7e8eed256c Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8 am: 295f8525be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: I488f5bd18a42b465cf3b4be18de81a91100a6d14
2020-11-20 02:32:03 +00:00
Jiyong Park
295f8525be Merge "Reorganize apex/apex.go" am: 09e9cb547a am: 5bd5a3a9f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: I66fb800655fbbc82c320313c27e749ce3e1bf39e
2020-11-20 02:07:53 +00:00
Jiyong Park
e4758ed844 Documenting android/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: I000c76e818722ed06bac03d9de87588b23552b08
2020-11-20 10:07:19 +09:00
Jiyong Park
8e6d52f362 Reorganize apex/apex.go
The source code is reorganized following the order of the execution for
better readability. The order is as follows:

1) init
2) properties
3) module struct
4) deps mutator
5) post-deps mutator
6) generate build actions
7) module initialization for different sub types
8) misc (e.g. apex_available check, etc.)

Behavior is not touched.

Bug: 173472337
Test: m
Merged-In: I919fca468fa376273d498029e6ac2fa37998a4a6
Change-Id: I919fca468fa376273d498029e6ac2fa37998a4a6
2020-11-20 08:44:55 +09:00
Colin Cross
ba9cb68851 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51 am: 104085c573
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: Iddd550168d954a2c53d8f043b9a3f0db7348d5f8
2020-11-17 00:25:35 +00:00
Colin Cross
104085c573 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I016d612e91f099b0291771d040a42f24ec34154c
2020-11-17 00:11:09 +00:00
Colin Cross
1af783fae7 Merge "Replace android.WriteFile rule with android.WriteFileRule" 2020-11-16 23:11:41 +00:00
Jooyung Han
920ce56b99 Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de am: 7126f7958d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: Ie3ee836923bb65fb7172a7ca5a0102a0e16965e1
2020-11-16 13:32:57 +00:00
Jooyung Han
7126f7958d Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: I287abdc10e5de20750adfc64a6d909f1e31fe26e
2020-11-16 13:15:52 +00:00
Jooyung Han
74f576de58 Remove "apex_uses" mutator
which was added to support built-time common apex. But the common apex
was abandoned and it is used nowhere.

This is a manual revert of 5c998b9ff8.

Bug: 173329465
Test: m
Change-Id: I684e6b8bfe2ef5b53943329f4aaa5a5ccba27738
2020-11-16 09:08:30 +00:00
Colin Cross
cf371cc1f7 Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents.  Wrap it in an android.WriteFileRule that handles
the escaping.

Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-11-14 16:26:00 -08:00
Treehugger Robot
5f3bbae64b Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f am: b8316056fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: I7440d64296961910d6c1047cde11e8b29f37b7cb
2020-11-14 07:04:45 +00:00
Treehugger Robot
b8316056fe Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: I2be87bd643ea2352f3de3579b43f0afe7abd55a4
2020-11-14 06:43:49 +00:00
Colin Cross
ae8600b507 Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing
Config to NewTestContext and NewContext instead of to ctx.Register.
This will enable a followup change to store SingletonMakeVarsProviders
registered on the Context in the Config, which is necessary to run
multiple tests in parallel without data races.

Test: all soong tests
Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-12 10:07:49 -08:00
Anton Hansson
ccde16f88c Merge "Make apex modules support tagged dists" am: fabdd28fdb am: afe209bdad am: 2a54e56ef9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496336

Change-Id: I45c0bdfc3eb0b0fc7626b23ace632a70e3b3f57b
2020-11-12 09:48:21 +00:00
Anton Hansson
2a54e56ef9 Merge "Make apex modules support tagged dists" am: fabdd28fdb am: afe209bdad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496336

Change-Id: If5928370895562efbb392a751978a716dcbb6418
2020-11-12 09:35:55 +00:00
Anton Hansson
82d502a7b2 Make apex modules support tagged dists
Bug: 172951145
Test: m dist my_dist_target (with patch in bug)
Change-Id: I0da4568a49ea48efbf864614a7e7c647f251a7ce
2020-11-11 12:34:20 +00:00
Nikita Ioffe
ed2d774c41 DO NOT MERGE: update apex/allowed_deps.txt
Test: presubmit
Bug: 172824175
Change-Id: Iff22f74889c88b73a913425445e3b3e827a20377
2020-11-09 19:21:48 +00:00
Nikita Ioffe
aed3c6b7b7 Update apex/allowed_deps.txt
Test: presubmit
Bug: 172791253
Merged-In: I5f3d834687121ba967d1e3aeb301c87679b2078d
Change-Id: I46549088749604c42390bb27e59f61edd25149d6
2020-11-09 15:23:27 +00:00
Treehugger Robot
320e6bbd7b Merge "Define product_available property" am: 25b0780f37 am: 779adff9e6 am: a993a3cd22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1479576

Change-Id: Ieead4fbac401a530368c072ccb48874bee6a2ab6
2020-11-09 06:21:48 +00:00
Nikita Ioffe
af3ca9be6b Merge "Update apex/allowed_deps.txt" am: 3862cd509b am: 0f6410aeae am: 24b2833f50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1489477

Change-Id: If16d91b2c8269a8b24bead949c4291ecb25d7e2d
2020-11-09 06:21:19 +00:00
Treehugger Robot
25b0780f37 Merge "Define product_available property" 2020-11-09 00:40:50 +00:00
Justin Yun
63e9ec70bb Define product_available property
To make a module available to product variants, it must define
`product_available: true`. `vendor_available: true` will not create
product variants any more.
However, in this CL, we don't change the behavior of
`vendor_available` property. It still creates both variants. After we
update all Android.bp files that need to provide product variants
with `product_available: true`, we may upload the remaining patches.

Bug: 150902910
Test: lunch aosp_arm64-userdebug && m
Change-Id: I0fd5be7bbae2c45d5cab3c3c2ca49f53a9b6f975
2020-11-08 23:53:22 +00:00
Nikita Ioffe
3862cd509b Merge "Update apex/allowed_deps.txt" 2020-11-06 12:46:39 +00:00
Nikita Ioffe
77e1d4b4e5 Update apex/allowed_deps.txt
Bug: 171330443
Bug: 171668006
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: I5f3d834687121ba967d1e3aeb301c87679b2078d
Merged-In: I5f3d834687121ba967d1e3aeb301c87679b2078d
2020-11-05 21:46:26 +00:00
Nikita Ioffe
ae29cb45f2 Update apex/allowed_deps.txt
Test: build/soong/scripts/update-apex-allowed-deps.sh
Bug: 172564863
Merged-In: I5faa49deae62b1a612f88938555f55a586b8175f
Change-Id: I73b5510254dee638955609695a96d465267507f2
2020-11-05 15:56:56 +00:00
Nikita Ioffe
403ece5b20 Merge changes from topic "apex-allowed-deps" am: a6d18b6830 am: 256d717359 am: ed95de2470
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486216

Change-Id: Icc74b5920639984343481cf69819ecdf04a944cf
2020-11-05 14:39:47 +00:00
Nikita Ioffe
051f7664d2 Update apex/allowed_deps.txt am: 3b834bf347 am: e9ab014f6e am: 977cebfc68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486244

Change-Id: I7a7f6e39bca445d99a6f74f3db0ac68a403f4977
2020-11-05 14:39:44 +00:00
Artur Satayev
ed667a8345 Add PHONY for apex-allowed-deps check.
Bug: 149622332
Test: m apex-allowed-deps-check
Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
Merged-In: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
(cherry picked from commit 01aa11e833)
2020-11-04 20:50:03 +00:00
Nikita Ioffe
c4e79a340a Merge "Add car-ui-lib-overlayable to apex allowed_deps" into rvc-qpr-dev-plus-aosp 2020-11-04 20:29:08 +00:00
Nikita Ioffe
3b834bf347 Update apex/allowed_deps.txt
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Iad138bdb439e3ebc7a145dec7875b8bb5756d755
2020-11-04 17:12:27 +00:00
Martin Stjernholm
af3bf0dd5d Merge "Move hardcoded apex_available's for ART modules into ART blueprints." 2020-11-04 16:28:26 +00:00
Saeid Farivar Asanjan
e21fd34bf2 Add car-ui-lib-overlayable to apex allowed_deps
Bug: 168062639
Test: manual
Change-Id: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
Merged-In: If31714ad0ab00af65e6f880fb8f7224e2c46d0a3
(cherry picked from commit 0b94aab5ef)
2020-11-04 16:14:35 +00:00
Slava Shklyaev
af7e511921 Add new neuralnetworks targets to apex/allowed_deps.txt
Generated with build/soong/scripts/update-apex-allowed-deps.sh

Bug: 160669906
Test: m
Change-Id: Ifd056230dd352fe3fa1c462d1e090aef5bbeb09d
Merged-In: Ifd056230dd352fe3fa1c462d1e090aef5bbeb09d
(cherry picked from commit 7f0c05539f)
2020-11-03 17:40:01 +00:00
Steven Moreland
9efbd038a7 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I97f26b78758f2eed128fc46db03b5f6ba3f2245f
Merged-In: I97f26b78758f2eed128fc46db03b5f6ba3f2245f
(cherry picked from commit 25281087a9)
2020-11-03 17:35:43 +00:00
Nikita Ioffe
f9b945196b Manually update apex/allowed_deps.txt
This is one in a series of cls to make sure that
build/soong/scripts/update-apex-allowed-deps.sh is a no-op on cleanly
checked out aosp/master.

This cl is an intersection of the following:
ag/I9f98361aa248b82cb58527a5cd59e6d17c3e8723,
ag/I19ba5900ddff84948cfa29e48e31cd609e61dbdb,
build/soon/apex/allowed_deps.txt in aosp/master

Test: presubmit
Merged-In: I9f98361aa248b82cb58527a5cd59e6d17c3e8723
Change-Id: I19d58582de85e1ae1ef1c2b997d568235ca17710
2020-11-03 17:30:31 +00:00
Treehugger Robot
20cf20ba1c Merge changes I0289d866,Ie7363524
* changes:
  Move stubs related methods out of LinkableInterface
  Don't create stubs variants of static libraries
2020-11-02 21:31:11 +00:00
Martin Stjernholm
377d752a6b Move hardcoded apex_available's for ART modules into ART blueprints.
Test: m droid
Bug: 133140750
Change-Id: I7280c7c61979d8f1aa3c849ff7079a5dd3ef216d
2020-10-30 02:17:23 +00:00
Colin Cross
a717db7304 Don't create stubs variants of static libraries
Statically linking stub implementations doesn't make sense, don't
create stubs variants of static libraries.

Bug: 170784825
Test: all soong tests
Change-Id: Ie73635244516edf6da884e3a7a275971a9bd7839
2020-10-29 14:17:37 -07:00
Nikita Ioffe
7f17421012 Update apex/allowed_deps.txt
Bug: 171330443
Bug: 171668006
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Id239ea9b31ce23f045f0db4027db33658ef3da14
Merged-In: Id239ea9b31ce23f045f0db4027db33658ef3da14
2020-10-29 15:35:01 +00:00
Nikita Ioffe
769f4a5c03 Update apex/allowed_deps.txt
Bug: 171330443
Test: build/soong/scripts/update-apex-allowed-deps.sh
Change-Id: Ic7ddd86cefc0c6a26de294b6e73b3e23d4791f5c
Merged-In: Ic7ddd86cefc0c6a26de294b6e73b3e23d4791f5c
2020-10-28 01:17:55 +00:00
Paul Duffin
e10dfa4e3d Cleanup usages of CreateConfiguredJarList
After previous refactorings the CreateConfiguredJarList function is now
only used in tests and are supplied with a PathContext that will cause
ReportPathErrorf() to panic. So, this change removes the ctx parameter,
calls panic directly on any error and renames the method to make it
clear that it is for testing only.

Bug: 171479578
Test: m nothing
Change-Id: Icfb4bdfe720afa855b64ecf0e74a0b030882d029
2020-10-27 10:36:29 +00:00
Paul Duffin
69d1fb1e39 Switch BootJars/UpdatableBootJars to ConfiguredJarList
This change:
* Switches BootJars/UpdatableBootJars fields of config.productVariables
  from []string to ConfiguredJarList.
* Updates BootJars() method to simply concatenate the jars list from
  the BootJars/UpdatableBootJars fields.
* Adds an UnmarshalJSON(..) method to ConfiguredJarList to support
  unmarshalling from a single string array to avoid having to change the
  format of the JSON file from which the configuration is loaded.
* Adds some additional calls to ConfiguredJarList(..) in tests to
  convert from []string to ConfiguredJarList. They pass nil as the
  ctx argument as there is no suitable PathContext which will cause any
  errors to be thrown using panic. That is reasonable for hard coded
  values in tests. A follow up change will clean up the calls to
  ConfiguredJarList(..).

Bug: 171479578
Test: m nothing
Change-Id: I59b94dafb479ccd8f0471ed802be175af57be271
2020-10-27 10:36:29 +00:00
Treehugger Robot
93d8c6443e Merge "Add libdmabufheap to the list of allowed dependencies" 2020-10-26 19:31:57 +00:00
Colin Cross
ed5dee0a8f Merge "Add llndk_stubs property" 2020-10-23 18:09:42 +00:00
Martin Stjernholm
9649748516 Merge "Rename ART release APEX to com.android.art." 2020-10-23 10:03:24 +00:00
Steven Moreland
8f01ff814b Merge "apex dependency error: note 'apex_available'" 2020-10-22 23:08:18 +00:00
Hridya Valsaraju
87076a45be Add libdmabufheap to the list of allowed dependencies
It needs to be in the list since it is needed by codec2_vndk.
It will eventually replace libion(also in the list).

Test: m
Bug: 168333162
Change-Id: If11d7e845bd4704f34f84435b5cac32b614312a8
2020-10-21 22:09:44 -07:00
Steven Moreland
6e36cd6104 apex dependency error: note 'apex_available'
This error tracks `apex_available` closure, but the message doesn't
indicate this variable specifically. Calling it out to try to make
the problem more searchable/discoverable/intuitable.

Bug: N/A
Test: apex_test.go
Change-Id: Ib254ace1dbd4e77d073ed4f98ee181dd86adfcfc
2020-10-22 01:23:33 +00:00
Colin Cross
0477b42276 Add llndk_stubs property
Prepare for making the relationship between an llndk_library stubs
module and the cc_library implementation module explicit by
adding an llndk_stubs property.  Each cc_library will be updated
to point to its llndk_library, and the llndk_library name will
be changed to make the .llndk suffix explicit.  Then the implicit
connection and suffix can be removed.

Bug: 170784825
Test: m checkbuild
Change-Id: I6b0482a3f286ec29b2e928551aa4317749f2b499
2020-10-21 10:55:33 -07:00
Martin Stjernholm
7f51107ee6 Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
2020-10-21 15:41:02 +01:00
Nikita Ioffe
5335bc471a Propagate min_sdk_version to apexer
This way it will be correctly set in the auto-generated
AndroidManifest.xml.

Bug: 171096530
Bug: 157078772
Test: m
Change-Id: I268f08ca5dd17fa9d6763ad70cc9a3f83891a8d6
Merged-In: I268f08ca5dd17fa9d6763ad70cc9a3f83891a8d6
(cherry picked from commit 97fd49235a)
2020-10-21 14:26:44 +01:00
Nikita Ioffe
dd203b6b34 Update allowed deps for sdkext apex
Test: m
Bug: 171096530
Bug: 171330443
Change-Id: Iacaa4e8c6ed2e3854ef973a84bb0e44c433c00d3
2020-10-20 21:08:41 +00:00
Colin Cross
d4620701ad Merge "Start using Providers instead of direct module access" 2020-10-13 21:48:26 +00:00
Evgenii Stepanov
2080bfe79a Support asan/hwasan versions of prebuilts.
In apex_set and cc_prebuilt_library_*, provide a way to specify an
alternative source to use when build with sanitizers.

Test: prebuilt_test, apex_test
Change-Id: I1ab8091bf696d94da3547cf5248853df489bdee6
2020-10-13 03:37:32 +00:00
Colin Cross
0de8a1e17b Start using Providers instead of direct module access
Export information about static libraries, shared libraries and
exported flags through Providers instead of accessing the module
directly.  Much more is left to be converted, but this significantly
simplifies the dependencies on libraries with stubs by making it easy
for a module to masquerade as another by simply exporting the
providers from the other module.  Instead of depending on all the
versions of a library and then picking which one to use later, it
can depend only on the implementation variant and then select the
right SharedLibraryInfo from the variant.

Test: m checkbuild
Test: only expected changes to build.ninja
Change-Id: I1fd9eb4d251cf96ed8398d586efc3e0817663c76
2020-10-12 16:55:47 -07:00
Steven Moreland
73a9e603d5 Merge "build/soong/scripts/update-apex-allowed-deps.sh" 2020-10-12 16:59:24 +00:00
Colin Cross
405af07859 Revert "Make lots of tests run in parallel"
This reverts commit 323dc60712.

Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests

Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-09 18:34:24 -07:00
Colin Cross
323dc60712 Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.

Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-06 15:12:22 -07:00
Colin Cross
56a8321c21 Remove global state from apex modules
A global variant was used to store the global mapping between
modules and APEXes.  Replace it with storing pointers to APEX
contents inside each module so that they can query the contents
of any APEXes they belong to.

Bug: 146393795
Test: all Soong tests
Test: single line change to build.ninja host install dependency ordering
Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk
Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
2020-10-06 13:39:57 -07: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
Treehugger Robot
0400ede359 Merge "Remove stale apex_available dependency." 2020-10-04 22:52:57 +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
025ae97b0e Merge "Add support of test data to python_host_test" 2020-09-29 21:56:19 +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
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
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
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
Colin Cross
a018b3df16 Merge "Use alias for test_per_src apex dependencies" 2020-09-12 20:21:36 +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
Jooyung Han
07931c73a3 apex: pass init_rc/vintf_fragments to make
For "non-updatable" devices, apex_manifest.pb is a module representing
the apex, so we need to pass common properties like init_rc and
vintf_fragments to the Make module of apex_manifest.pb so that those
files are copied when the apex is installed as flattened.

Bug: 159211312
Bug: 167383491
Test: lunch aosp_sunfish-userdebug
      OVERRIDE_TARGET_FLATTEN_APEX=true m com.android.vibrator.sunfish
      check $OUT/vendor/etc for init_rc/vintf_fragmemts
Change-Id: I5d5ce5acb9b837da2fb4e6ee8f3813707c6c3bd4
2020-09-11 17:33:19 +09:00
Xin Li
80dc4f137a Merge "Merge Android R" 2020-09-10 17:22:09 +00:00