soong_build uses / as it's cwd, so we need to specify the top directory
when checkign for files.
Test: add a printf in the if statement; touch out/soong/Android.bp && m nothing; ensure printf doesn't fire
Change-Id: Iba9773765547b22a03dbca33aa6b8c75359cb5ff
* changes:
Install transitive deps of jni libs, but not the jni libs themselves
Add SkipToTransitiveDepsTag interface for dependency tags
Revert "Revert "Collect transitve deps of jni libs only for bund..."
Revert^2 "Always embed jni libs and store uncompressed"
cc_test modules can use data_libs to put shared libraries alongside
the test. Add $ORIGIN to rpath so they can load them as DT_NEEDED
libraries or with dlopen.
Test: treehugger
Change-Id: I4227d16ff80e70dfecb481a2de6dd15af66348bc
These tests fail on sdk-sdk_mac-trunk_staging because this feature is
not intended to run outside of Linux. Let's skip these tests for now
until we figure out how to disable snapshot feature properly.
Bug: 339782737
Test: go test
Change-Id: Ibe70a0e3dc92262c78ce9e3a8af58f2da3bfeda2
Consider this case:
app --(jni_libs)--> libfoo --(shared_libs)--> libprivate
Only libfoo is embedded into the app. libprivate is not embedded because
libprivate is very likely to be depended on by other components in the
platform, in which case it will anyway be installed to /system/lib.
Embedding libprivate into the app will increase the storage usage as a
whole. Furthermore, if libprivate is not a shared lib but a config file
(of type prebuilt_etc), it can't be embedded and therefore must be
installed outside of the app.
However, a problem occurs when libprivate is not depended on by anyone
else. Then libprivate is not installed to the system partition, causing
an error at runtime.
This CL fixes that by making the jni_libs dependency to implement the
new SKipToTransitiveDepsTag interface. Now, jni_libs themselves are not
installed, but their transitive deps are depended on by the app
containing the jni libs.
Bug: 330276359
Test: m NfcNci and check if libnfc-nci.config is installed.
Test: m CarService and check android.hardware.automotive.evs-V2-ndk.so
is installed as well.
Test: go test ./... under soong/java
Change-Id: I04cc92b7fad768a20ec60a02b3e7534641b1e74d
Consider this dependency graph:
A --> B --> C
And let's assume that B is built into A (e.g. static_libs), while B -->
C is a runtime dependency (e.g. required).
We want to install C (but not B of course) when A gets installed.
However, before this change, it was not supported because the dependency
A -> B was not tracked in computeInstallDeps. One had to explicitly add
a A -> C dependency.
This change fixes the problem by introducing the new interface
SkipToTransitiveDepsTag. computeInstallDeps uses it to decide whether to
take all install files and packaging specs or only those from transitive
dependencies. In the above example, if the dependency A --> B implements
the new interface and returns true, B's transitive dependencies (i.e. C)
are added into A's transitive dependencies. B's outputs are not added.
Bug: N/A
Test: go test ./... under soong/android
Change-Id: I3ca03a21633883f320ecb9e5bc82eb134519cd88
android.ModuleBase already calls aconfigUpdateAndroidBuildActions()
that is the same with CollectDependencyAconfigFiles(). Remove the
CollectDependencyAconfigFiles() to avoid duplication with
aconfigUpdateAndroidBuildActions().
To make the aconfig information available in
GenerateAndroidBuildActions() of all modules, call
aconfigUpdateAndroidBuildActions() before calling
GenerateAndroidBuildActions() of each module.
Also, we don't need SetAconfigFileMkEntries(), which is a duplicate
of aconfigUpdateAndroidMkData()
Bug: 335363964
Test: diff `adb shell printflags` before and after the change.
Change-Id: I52808e442e9fed7db1eae7b7c5ed0b1c5ba74f5d
To be more consistent with the terminology used in the rest of the
release flag infrastructure.
Bug: 323382414
Test: Presubmits
Change-Id: I176ce164c00e95ef7653608298b0051da3298aa9
Make needs to know about the "extra" zip files that are extracted
to the staging directories so that it can track all the installed files
correctly.
Also add a utility tool for listing the contents of relevant zips.
Bug: 337869220
Test: m droid and checked the contents of file_list.txt when adding an android_app_set locally
Change-Id: Idc5dd785b03c05f7972c66620d4e6359892b3863
If the default value for RELEASE_ACONFIG_VALUE_SETS is not a string,
the resulting value is the empty string.
Bug: 328495189
Test: manual
Change-Id: Ie8f262d6408b1564ec7a3918f8654ccfa9bc5940
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.
This change relands https://r.android.com/3035972. Implementation
changes from the original change:
- "all_apex_contributions" is added as a dependecy to the implementation
library modules where the parent sdk_library module has a prebuilt
equivalent. This allows the source apex variant to be hidden from make
when the prebuilt is active.
Test: patch in internal main, lunch barbet-ap2a-userdebug && m nothing
Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I017938e5567aef82e428e7ceb557d9c9090e0257
When writing all makefiles, we also need to write the makefile for
${TARGET_RELEASE}. We can skip writing it a second time if it is not
an alias.
Bug: 328495189
Test: manual, TH
Change-Id: Ia5d1955f419312c76eb9c8a33b1c8a6bcc5efe0b
Background: if a lib has `sdk_version` set, it is mutated into two
variants: platform and sdk. The latter is for the inclusion into
unbundled APKs which can be installed on older platforms. The former is
what is installed to the platform.
So far, for unbundled app builds, (1) the platform variant was marked as
uninstallable, (2) while the sdk variant was left installable. (1) is
causing a problem (b/339262059) when an APEX containing a filesystem
module is built as unbundled. The filesystem skips installing the
platform variant. (2) is not causing a problem, but is unnecessary
because the sdk variant is not something to be installed (on the
platform). It is built into the APK via the jni_libs property. It's not
considered an installation.
This change fixes (1) and (2). For (1), the platform variant is always
marked installable even for unbundled build. For (2), the sdk variant is
always marked non-installable.. because, again, it's not designed to be
installed to the platform.
Bug: 339262059
Test: banchan com.android.virt aosp_arm64
UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
check libc++.so, libcrypto.so are in the microdroid image in the APEX.
Change-Id: I8999b724926cd9ab6d56796133e218fefcc1910b
The default directory for flag values is the last of:
- Where the flag is declared,
- Where the release config is first declared,
- Where the flag value is currently being set for this release config.
Bug: 328495189
Test: manual
Change-Id: Ida1f906b75704f658e7fa1de703e0c789dce06a6