Set a system property to enable Android specific transformer that drops
UnsupportedAppUsage annotation for repackaged classes to avoid adding
unneeded hidden api symbols on jarjar.
Bug: 146418363
Test: m, manual diff hiddenapi-flags.csv
Exempt-From-Owner-Approval: patch approved by owner
Change-Id: I10b49feb15257301574162b5d389cbc30277f672
Merged-In: I10b49feb15257301574162b5d389cbc30277f672
(cherry picked from commit 762d9f38af)
Coverage build adds extra dependencies for the runtime libs. Marking
them and their transitive dependenciese with apex_available doesn't make
any value; it instead adds noise.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 150999716
Test: m
Merged-In: I08e51cec1de6ded624ef9d4c41c1e5b2e611ff38
(cherry picked from commit 58d1090032)
Change-Id: I08e51cec1de6ded624ef9d4c41c1e5b2e611ff38
The marked library(ies) were available to the adbd APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 150999716
Test: m
Merged-In: I6afbe905dda11056559521b937803dcd85b32fe5
(cherry picked from commit 3a0db5ef4e)
Change-Id: I6afbe905dda11056559521b937803dcd85b32fe5
The NDK prebuilts are implicitly used when building with sdk_version set.
Make the module types be available to any apex so that we don't need to
manually add apex_available property to the module definitions manually.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 150999716
Test: m
Merged-In: I0870afa4c74b4a06ab1273dff84615778561ecc9
(cherry picked from commit e01e228270)
Change-Id: I0870afa4c74b4a06ab1273dff84615778561ecc9
The marked library(ies) were available to the APEXes via the hand-written
whitelist in build/soong/apex/apex.go. Trying to remove the whitelist
by adding apex_available property to the Android.bp of the libraries.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 150999716
Test: m
Merged-In: I91d1b1076733a949ca2a959ba640ce34d0233492
(cherry picked from commit 541142ce6b)
Change-Id: I91d1b1076733a949ca2a959ba640ce34d0233492
There are no known usages of these variables, and many have been
incorrectly set for a long time.
Also convert the <module> phony for api txt to androidmk.
Bug: 152479829
Test: m
Change-Id: Iff355041d88eb59ac47dd19a03e993cf1ce3927e
Merged-In: Iff355041d88eb59ac47dd19a03e993cf1ce3927e
Bug: http://b/153164546
Test: Built aosp_blueline successfully. Kernel also verified without
needing workarounds from LLD crash.
Change-Id: I41ae5a5be0065da98dd941b16196a3f4888b86b1
Merged-In: I41ae5a5be0065da98dd941b16196a3f4888b86b1
(cherry picked from commit 883a0fdfd9)
This exposes test func on ValueMatcher and helpers relevant for testing neverallows.
Bug: 153333044
Test: m
Change-Id: Ied07cd33afa537f9d7aa3c33e59f4ac985901a0f
Merged-In: Ied07cd33afa537f9d7aa3c33e59f4ac985901a0f
Exempt-From-Owner-Approval: clean cherry-pick
(cherry picked from commit c5570ac9b1)
As a follow up, this property will be set to APKs participating in mainline program.
Bug: 153333044
Test: m
Change-Id: I6ea2f3c1d26992259e4e9e6a6d8cecf091d39c43
Merged-In: I6ea2f3c1d26992259e4e9e6a6d8cecf091d39c43
(cherry picked from commit 2db1c3f1c4)
Exempt-From-Owner-Approval: clean cherry-pick
We're not doing a great job of copying over all the library dependencies (especially when using sanitizer libraries). Just omit these from the checks, which shouldn't really matter.
Bug: 151093572
Test: treehugger
Change-Id: I8470bbfbf36a51739e8a7e699ad090a66c9db8b2
Merged-In: I8470bbfbf36a51739e8a7e699ad090a66c9db8b2
(cherry picked from commit bc32a50ff4)
platform.
The NOTICE file generation depends on the NOTICE targets for all static
library dependencies. If such a dependency didn't have
//apex_available:platform it didn't get any AndroidMk entry and hence
no NOTICE target via soong_cc_prebuilt.mk. If it was then depended upon
by a binary or library that is accessible to platform, the NOTICE
dependency failed.
Normally such a dependency is invalid, but there are corner cases where
binaries go neither into platform nor any APEX module, and they can
legitimately have such dependencies (cf. b/152241137).
With this CL requests to skip installation of such a static libraries
are ignored so that they get AndroidMk entries, which will always have
LOCAL_UNINSTALLABLE_MODULE set.
Test: "m simpleperf_ndk" with https://r.android.com/1273016, which
removes //apex_available:platform from libs that simpleperf_ndk
depends on statically.
Bug: 152241137
Bug: 149217815
Change-Id: If36e85dd16ade56d4ec1d6744811df5a15b6242c
Merged-In: If36e85dd16ade56d4ec1d6744811df5a15b6242c
For R+, symlinks from /system/lib to VNDK APEX are not necessary. (Note
that, symlinks to older VNDK are still necessary because older vendor
may access old locations.)
Hence, do not make symlinks for R+ VNDK APEX.
Bug: 142911355
Test: m # check /system/lib[64]/ for symlinks
# cf should contain 28/29 symlinks but no symlinks for R
Change-Id: I852fad7edebed3e4edc03c374b3643da6b053fed
If a lib has stubs, that means the library provides stable C APIs and
the APIs are guaranteed to be maintained in a backwards compatible
manner. Then there is no reason to have the same library in VNDK,
because VNDK is for libraries (usually having C++ interfaces) where API
stability across the yearly releases is hard (or impossible) to be
guaranteed.
This change triggers an error when the build system finds a VNDK lib
which has stubs defined. Users are suggested to make the lib an LLNDK
one.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 151303316
Test: m
Merged-In: Id305196a9d5a6fc7e7f9c02f3fa076859dc9a282
(cherry picked from commit ea97f51a29)
Change-Id: Id305196a9d5a6fc7e7f9c02f3fa076859dc9a282
blueprint.writeAllModuleActions attemts to sort modules by name, and
sorting them assumes that each module's name is unique. Although
soong_config_module_type_import modules will not generate anything,
their names should be unique, too for that reason.
Fixes: 150421585
Test: m nothing
Change-Id: I6782e42c129dc3b0fc7649ce97d5f94effc63fa7
Merged-In: I6782e42c129dc3b0fc7649ce97d5f94effc63fa7
Allow the platform stubs to specify sdk_version: none,
and add generic support for a regexp matcher.
Bug: 144149403
Test: m
Change-Id: Icaece0d9797bace8ae9741f7a029b9ea57fcbbb9
Merged-In: Icaece0d9797bace8ae9741f7a029b9ea57fcbbb9
The default build-id is generated using timestamp. Pass -Brepro to
avoid using timestamp for deterministic build.
Bug: 153462962
Test: build fastboot.exe twice, got same shasum
Change-Id: I38fe993eec23c60bfcf1b76188774bfe06839fa4
Merged-In: I38fe993eec23c60bfcf1b76188774bfe06839fa4
(cherry picked from commit a3c22e7ee2)
Exempt-From-Owner-Approval: backport
An attempt to reference one of the prebuilt modules directly from an
Android.bp file highlighted a bug. The prebuilt_apis module used a
mutator to create filegroup and java_import modules for a set of api
versions. That mutator ran after the "prebuilts" mutator which handled
the renaming of prebuilt modules when the matching source module was
not present. That meant that the only way to reference the module was
by explicitly adding the prefix "prebuilt_".
This change fixed that bug by creating the modules in a load hook rather
that a mutator. This ensures that the prebuilt modules are present well
before the "prebuilts" mutator is run. Removing the mutator also removes
an unnecessary traversal of the whole dependency tree.
It also updated the documentation to explain that it creates
java_import modules as well as the filegroup modules.
Bug: 153649372
Test: m droid
Change-Id: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
There are some cases that aren't handled with the existing variable
types for booleans or known lists of strings. Similarly to our
product_variables that uses %s / %d for things like
PLATFORM_SDK_VERSION, allow vendors to define their own config variables
to be substituted into properties.
For example, some of the makefiles that I've attempted to convert had
the option to pass in version numbers from the board, or the default
display size:
-DDISPLAY_VERSION=550
-DDISP_H=1080
These examples happen to be integers, but since our configuration
language (make) doesn't support numbers, %s works just as well.
This change will allow the above to be represented using:
soong_config_module_type {
name: "acme_cc_defaults",
module_type: "cc_defaults",
config_namespace: "acme",
value_variables: [
"DISPLAY_VERSION",
"DISP_H",
],
properties: ["cflags"],
}
acme_cc_defaults {
name: "my_defaults",
soong_config_variables: {
DISPLAY_VERSION: {
cflags: ["-DDISPLAY_VERSION=%s"],
},
DISP_H: {
cflags: ["-DDISP_H=%s"],
}
},
}
Bug: 153161144
Test: built-in tests
Change-Id: I18f35746b5cc39c304a136980249e886d38c6df6
Merged-In: I18f35746b5cc39c304a136980249e886d38c6df6
(cherry picked from commit b0935db8c3)
framework.aidl includes the parcelables from the non-updatable
part of the framework as well as the modules. This causes a
dependency cycle when building module stubs:
module_stub -> module_sdk -> framework.aidl -> public_sdk -> module_stub
The module_sdk only includes the the stubs for the non-updatable
part of the framework, so it should also only contain the non-updatable
parcelables. This change creates a framework_non_updatable.aidl with
those parcelables, and updates module_current to use that.
Bug: 144149403
Test: m
Test: m && diff out/soong/framework{,_non_updatable}.aidl
(the diff contains just TestApi + module parcelables)
Change-Id: I224117a0ff695c22d4a4317a51a9b775ed73066b
Remote execution and other tools can be confused by references to
build_number.txt without a dependency. Add an order-only dependency,
which maintains the current behavior.
Test: BUILD_NUMBER=1 && m aapt && aapt version # shows 1
BUILD_NUMBER=2 && m aapt && aapt version # shows 1
rm out/soong/.intermediates/frameworks/base/tools/aapt/aapt/linux_glibc_x86_64/aapt
BUILD_NUMBER=2 && m aapt && aapt version # shows 2
Change-Id: Icfa98d6840b1dc2e273ba29c33011635d1cf93b1
Bug: 153071808
Merged-In: I1609a790dd4d0a03c8308b6e552622fe33fa2499
This is to guard against the potential situation when someone adds
updatable modules to the list of boot jars by mistake.
Test: aosp_walleye-userdebug builds.
Test: Manually break the checks and observe the errors:
- move updatable module 'conscrypt' from
PRODUCT_UPDATABLE_BOOT_JARS to ART_APEX_JARS:
internal error: module 'conscrypt' from updatable apex 'com.android.conscrypt' is not allowed in the ART boot image
- add updatable module 'conscrypt' to ART_APEX_JARS
(but do not remove it from PRODUCT_UPDATABLE_BOOT_JARS):
error: A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but conscrypt is.
- move updatable module 'framework-tethering' from
PRODUCT_UPDATABLE_BOOT_JARS to PRODUCT_BOOT_JARS:
internal error: module 'framework-tethering' from updatable apex 'com.android.tethering' is not allowed in the framework boot image
- add non-updatable (in AOSP) module 'android.net.ipsec.ike'
to PRODUCT_BOOT_JARS:
internal error: failed to find a dex jar path for module 'com.android.ipsec.ike', note that some jars may be filtered out by module constraints
Bug: 147579140
Exempt-From-Owner-Approval: cherry-pick, approved in AOSP.
Change-Id: I25ca2f52530fcfa1f9823b2cfa3485db9c0d0db1
Merged-In: I25ca2f52530fcfa1f9823b2cfa3485db9c0d0db1
(cherry picked from commit b28cc3758c)
Modules with compile_multilib property set to "both" cause builds to
fail due to duplicate Make recipes. Fix it by outputting reports only
for the first target for now.
Bug: 153461674
Test: Built cts with the coverage flags set.
Change-Id: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
It has been wrong to split ALL_VERSIONS into exclusive two sets of
before/after TARGET_PLATFORM_VERSION.
And PLATFORM_VERSION_ALL_CODENAMES supports all *active* list of
non-finalized codenames.
Bug: 152960049
Test: m
Change-Id: I78ca88758998e440bea72ba2d56d90eea3ec99ae