This is used when Soong and Make don't know the full output file list,
and so use a tool to generate a per-module apkcerts.txt file instead.
Fixes: 160119159
Test: m apkcerts-list
Merged-In: I48183bc8cbf9dcc521f791812734205ed3f28f4c
Change-Id: I48183bc8cbf9dcc521f791812734205ed3f28f4c
This reverts commit 6e1fa4452b.
Reason for revert: relanding a reverted changed
Bug: 153073816
Change-Id: I3735866776cf6eb0320c9fb8c6be8ac0c48baa1c
Test: m
This reverts commit f9e67a8980.
Reason for revert: broke some targets
Exempt-From-Owner-Approval: reverting
Change-Id: I10af29b0fcf564dba0c3dbc1951b660b24fc58bb
A module is marked unavailable for platform when 1) it does not have
"//apex_available:platform" in its apex_available property, or 2)
it depends on another module that is unavailable for platform.
In that case, LOCAL_NOT_AVAILABLE_FOR_PLATFORM is set to true for the
module in the Make world. Later, that flag is used to ensure that there
is no module with the flag is installed to the device.
The reason why this isn't entirely done in Soong is because Soong
doesn't know if a module will be installed to the device or not. To
explain this, let's have an example.
cc_test { name: "mytest", static_libs: ["libfoo"]}
cc_library_static { name: "libfoo", static_libs: ["libbar"]}
cc_library { name: "libbar", apex_available: ["com.android.xxx"]}
Here, libbar is not available for platform, but is used by libfoo which
is available for platform (apex_available defaults to
"//apex_available:platform"). libfoo is again depended on by mytest
which again is available for platform. The use of libbar should be
allowed in the context of test; we don't want to make libbar available
to platform just for the dependency from test because it will allow
non-test uses of the library as well.
Soong by itself can't tell whether libfoo and libbar are used only in the
context of a test. There could be another module depending them, e.g.,
cc_library_shared { name: "mylib", static_libs: ["libfoo"] }
can exist and it might be installed to the device, in which case
we really should trigger an error.
Since Make has the knowledge of what's installed and what's not,
the check should be done there.
Bug: 153073816
Test: m
Change-Id: I14ddf0e5700d0a7bf60e4e41536efbd26ab5ed3d
These were deprecated in R, which has now branched, and there aren't any
users on master.
Test: build-aosp_crosshatch.ninja is identical
Test: treehugger
Change-Id: I6286880e45c0facbae56f9a16e8cfcbde12f121c
This was deprecated in R, which has now branched, and there aren't any
users on master.
Test: build-aosp_crosshatch.ninja is the same (except for the removal of the empty auxiliary target)
Test: treehugger
Change-Id: I306156ab7f91cd4a2258554b4215766c99cd12d1
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.
(This is a cherry-pick change.)
Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
Merged-In: If7d5d4bd308629c8340231520214c76c8a568a65
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.
This allows us to gain the code-size improvements from
"-z noseparate-code".
Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.
Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
Similar to native:vendor, native:product can use VNDK libs but not
vndk_private.
It is activated when PRODUCT_PRODUCT_VNDK_VERSION is set.
This restores the reverted commit
4e7e76fe5a (aosp/1197274).
The problem of the original CL was assuming no modules have both
LOCAL_PRODUCT_MODULE and LOCAL_USE_VNDK in the old implementations.
But many vendor modules in the targets without setting
PRODUCT_PRODUCT_VNDK_VERSION in old branches had both flags that
caused link failures.
To make it no-op without PRODUCT_PRODUCT_VNDK_VERSION, I defined
LOCAL_USE_VNDK_PRODUCT that is set to true if
PRODUCT_PRODUCT_VNDK_VERSION is defined and LOCAL_PRODUCT_MODULE is
true.
Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: I344c7dc1c47f08706c101e486ff07c3f10aff8ac
Previously, we only check VNDK core and vendor variants are identical
when a VNDK library is not declared to have different variants AND the
target has TARGET_VNDK_USE_CORE_VARIANT set. Therefore, it is fairly
easily to break a TARGET_VNDK_USE_CORE_VARIANT target as it needs to be
tested explicitly.
This change uses the new LOCAL_CHECK_SAME_VNDK_VARIANTS and expands the
check to run regardless of TARGET_VNDK_USE_CORE_VARIANT. Also adds
support for VNDK-in-product.
Bug: 145157349
Test: Build success for targets with and without
TARGET_VNDK_USE_CORE_VARIANT.
Test: With the corresponding change in build/make, remove libbinder
from build/soong/cc/config/vndk.go and check build fails even
when TARGET_VNDK_USE_CORE_VARIANT is not set.
Change-Id: Iec708b971072e6580f77a03e243b30b89b3b054d
No device in our tree use this obsolete thing now.
OEM devices with libhealthd should define health HAL
2.1 instead.
Test: builds
Fixes: 127677771
Change-Id: I1861452a3f7fc97ee20615c8f9f25422f9f507e2
Additional context (for Googlers): go/android-fuzzing-shared
This patch adds the Make support for automatically installing sanitized
dependent shared libraries. 'make $module' will find all the shared
library dependencies in soong, and create the rules to install them. We
simply need to add the <install sanitized shared library> rule that's
made by Soong as a dependency of the module's phony.
We also now change 'm fuzz' to not just build the fuzz packages, but to
build all fuzz targets into the respective
$ANDROID_PRODUCT_OUT/data/fuzz and $ANDROID_HOST_OUT/fuzz directories.
Bug: N/A
Test: Build fuzz target with shared libs, note the contents of
$ANDROID_PRODUCT_OUT/data/fuzz/lib and out/soong/fuzz-target-*.zip now
has shared libraries.
Change-Id: I74def02fee663ef788ee25ec0d5106faf474c2a6
Stripping is incompatible with ART module updatability.
Bug: 65154345
Bug: 138851227
Test: build and observe no change in output (stripping is not used by
default).
Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
We need to get files generated by a droidstubs target into the SDK. So
we first copy them into the out/target/common/obj/PACKAGING folder where
they can be picked up by the SDK build.
Bug: 142480924
Test: m sdk
Change-Id: I7a0b22907603e1d17ac05901ee7f8bb9cff89f7f
Adds the backend makefile parser for the LOCAL_FUZZ_DATA vars generated
by the cc_fuzz target.
Bug: 141026328
Test: m example_fuzzer, fuzz target should have adjacent corpus/dict
files.
Change-Id: Ide2c34318f11be132992650ce5cc1fd27895915c
Add LOCAL_INJECT_BSSL_HASH for the two modules in Make that
statically link libcrypto.
Bug: 137267623
Test: m checkbuild
Change-Id: I5d21c262ff388aeb2dbd02595706c5531a628b7e
Support for rust modules built in Soong.
Bug: 136189233
Test: Test module builds.
Test: crosvm builds.
Change-Id: Idf2e4a4f760cbcee1d35fe6567ef8e12d4855094
Do this by introducing a new LOCAL_PROGUARD_FLAGS_DEPS variable that we
can modify anytime we add a file reference to LOCAL_PROGUARD_FLAGS.
An alternative would have been to switch to LOCAL_PROGUARD_FLAG_FILES,
but that would have been much harder to ensure the same command line
ordering.
Bug: 130111713
Test: treehugger
Change-Id: If367197b30d563e0796f0cafa00be1f275f2c406
You can get a system.img without current VNDK libs.
This may help when you want a smaller system.img given that the image
will be used with a specific version (not current) of vendor image.
Bug: 132140714
Test: m TARGET_SKIP_CURRENT_VNDK=true && see if current VNDK is not
installed
Change-Id: Ie0815e6dd6ce2f861b6c42e637da4bb146320673
AAPT2 is used everywhere now, remove support for AAPT1. Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).
Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed. Instead, the core variant
will be used by vendor binaries at runtime.
To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module. This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed. When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.
As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform. We add native:platform_vndk for this.
Bug: 119423884
Test: With the corresponding Soong change, build with
TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
on it. Build with no-vendor-variant VNDK and check the core
variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
dummy VNDK library and check build fails.
Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
The soong-only variable is used to specify the location where the symbol
file is located. When unspecified, LOCAL_MODULE_PATH is used instead as
before.
This is needed when the path that a file is installed to is different
from the path that the file is accessed from at runtime. For example, if
TARGET_FLATTEN_APEX=true, a file lib/libX.so in an APEX com.android.foo
is installed to /system/apex/com.android.foo/lib/libX.so. However, it's
runtime path is /apex/com.android.foo/lib/libX.so as
/system/apex/com.android.foo is bind-mounted to /apex/com,android.foo.
Bug: 120846816
Test: m and inspect that symbol files exist under
$(PRODUCT_OUT)/symbols/apex/com.android.runtime/
Change-Id: I1b39f6e0cde115d442f14380c365796feff3437b
This change splits the LOCAL_SOONG_RRO_DIRS into two,
representing RRO dirs that originated from device and
product overlay configs, respectively.
Also plumb the device/product configs in separately.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Iddee1b4d7303b7ecaeced91216ea82fe29123770
Add 32BIT and 16BIT compile time flag for nanopb library to support
16BIT or 32BIT size, default is 8BIT. User need to use the corresponding
library when define the PB_FIELD_* flag during compilation.
Change-Id: I0d25bcdf62d6b47733e1ad4bddbd4dfce2192b5d
Test: None
Bug: 122292884
Instead of passing both the module and global dexpreopt image
selection into dexpreopt_gen, determine the correct dexpreopt
image in Make. This allows the Make dexpreopt rule to only
depend on the necessary boot images, preventing an order-only
dependency on the 32-bit boot image for a 64-bit only module.
Also stop using the boot image "location" as an input, only
track the real path, which will be converted to the "location"
that dex2oat expects when constructing the command line in
dexpreopt_gen.
Removes support for the unused LOCAL_DEX_PREOPT_IMAGE_LOCATION
variable.
Test: m checkbuild
Change-Id: I2e3e1d30fdfed92fb08e6cc1c9515edf8d99c7f0
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.
Bug: 117618214
Test: m checkbuild
Change-Id: Iae26e4676c29c68fa3f76187512c82786bfa0522
These now must be defined in Android.bp files.
Bug: 122618577
Test: compare build-aosp_arm.ninja before/after
Test: codesearch for LOCAL_MODULE_HOST_OS.*windows
Change-Id: I14451c7753299692940e026f85687b4c3331bb07
Adding an intermediate file to LOCAL_ADDITIONAL_CHECKED_MODULE will
cause the file to be built for m <module name>, mma, or m checkbuild.
Test: m checkbuild
Change-Id: I2b7c3c8f01960ce2f9176c8a2108f759fd8fc704
This commit introduces a prebuilt ELF binaries checker. The checker
will check:
1. Whether all DT_NEEDED shared libraries are specified in
`shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).
2. Whether all undefined symbols in the prebuilt binary can be resolved
to defined symbols exported by its dependencies.
This ensures that prebuilt binaries won't silently become ABI
incompatible.
To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).
If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:
check_elf_files: false,
Or, add the following setting to Android.mk:
LOCAL_CHECK_ELF_FILES := false
Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
Define non_system_module in base_rules.mk when the module is product, vendor,
product_services or proprietary module.
Bug: 74699609
Test: m -j
Change-Id: Iebdd3ec8c643be3d9877b7a96cbdd83465fa3878
Data Binding only works as part of tools. It also only builds there
(in studio-master-dev branch). This CL removes references to the data
binding checkout which will be followed by removal of data binding
from master manifest.
Bug: 122478832
Change-Id: I338cc1aa10a5ad39114bc0ed14a529365016e9a4
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
Add a LOCAL_SANITIZE_NO_RECOVER variable that allows specifying which
sanitizers running in diagnostics mode shouldn't recover. This can help
debugging as we test enabling sanitizers in new libraries since it'll
cause tombstones to be generated along with the diagnostics information.
Bug: 80195448
Bug: 110791537
Test: Compiled test module with this flag, checked compiler command.
Test: Test module crashed, tombstone contained diagnostics information.
Change-Id: I441b9c873e54bf6404325f4d0ac59835350c2889
Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new LOCAL_XOM property. Also adds
support for an ENABLE_XOM build flag for global builds.
Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: I6af9e3615d0a9fdff802eae50e6ad94311ec8046
Some projects can't be built with libcrt_builtins yet.
Bug: 29275768
Test: m checkbuild
Change-Id: I52805f5dece6395024683d07809c4b8905dab631
Merged-In: I52805f5dece6395024683d07809c4b8905dab631
(cherry picked from commit 2a401bea9e)
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.
Bug: 29275768
Bug: 119007754
Test: m checkbuild
Change-Id: Ifb16ed87afc3391f8830d771971315515f929235
Merged-In: Ifb16ed87afc3391f8830d771971315515f929235
(cherry picked from commit b9d8932279)
Store the path to the AAR file from Soong so that it will be picked
up by dist if requested in TARGET_BUILD_APPS.
Test: m checkbuild
Change-Id: Ifeaf2b5ca3f405fbe79a966ceee9989a38d77f6e