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
This reverts commit fab820c5f1.
Reason for revert: sed -i requires an argument on mac, break build on mac.
Change-Id: I0b72e28968072afbbb862bd827ee59764dd8a0be
The option will:
- Produce APK with uncompressed dex
- Declare to prefer integrity in manifest
Test: unzip -vl, dex compression looks correct with the option provided
or not.
Test: similarly, aapt dump correct attribute
Bug: None
Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.
Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
Feature request from developer, support setting uid in makefile.
Bug: 113359343
Test: apply aosp/757329
make -j hello_world_test_mk (w/ UID setting in config)
make -j hello_world_test_mk2 (w/o UID setting in config)
check test config of host's hello_world_test_mk (w/o UID setting in config)
Change-Id: I167c737098fa906e401769c6a8838f46b03bd33c
Use install_jni_libs_internal.mk to install JNI libraries alongside
preinstalled APKs. APKs with embedded JNI libraries are handled
within Soong.
Bug: 80095087
Test: m checkbuild
Change-Id: I2ecf10b6771dff14c940cc6e6442eb2ae43a75b0
Also remove the msg.mk files used for old apicheck.
And export jdiff-doc.zip generated by Soong.
Test: api-stubs-docs-diff
Bug: b/78245848
Change-Id: I329aa375623a7b7a121d58314dab694a326c9f0f
Add soong_cc_prebuilt.mk for Soong modules to use so they can avoid
going through all of prebuilt_internal.mk, dynamic_binary.mk and
binary.mk. Also moves stripping support into Soong.
Relands I8b37dda2b449b6b5d48d5b983f43de452f494a1e with fixes for
builds with GENERATE_BREAKPAD_SYMBOLS=true
Bug: 113936524
Test: m checkbuild
Change-Id: Id41cd76ccb1b5bb6ac43b41ae3e8f1ce46d7ad7e
Add soong_cc_prebuilt.mk for Soong modules to use so they can avoid
going through all of prebuilt_internal.mk, dynamic_binary.mk and
binary.mk. Also moves stripping support into Soong.
Bug: 113936524
Test: m checkbuild
Change-Id: I8b37dda2b449b6b5d48d5b983f43de452f494a1e
Move the configuration for autogenerating test configs into Soong,
and add LOCAL_FULL_TEST_CONFIG so that Soong can specify the full
path to a generated test config.
Also add a java junit test config template.
Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Test: atest junit-params-test
Change-Id: I2e64bc33c949ab7b342be518f94a81a186fe9c07
If LOCAL_TEST_CONFIG is set, it will be the default test config
and ignore the local AndroidTest.xml.
BUG: 110982517
Test: vi art/tools/ahat/Android.mk
set LOCAL_TEST_CONFIG := ahat_test.xml
add ahat_test.xml in local
m -j ahat;
Then, out/host/linux-x86/testcases/ahat/ahat.config
and ahat_test.xml should be the same.
Change-Id: I2f4ef735fca7d523bb637a18075512bdebf9826f
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432
It adds the following variables:
- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*
Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.
The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.
Bug: 77575606
Test: m -j
Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
Some modules have manifests that ManifestMerger doesn't like, and
don't need manifest merging. Skip manifest merger if
LOCAL_DONT_MERGE_MANIFESTS is set.
Bug: 78447299
Test: m checkbuild
Change-Id: If1a58253c62e0194a6acfd79930b9bb10978abe5
The location of AndroidManifest.xml has already been computed
by android_manifest.mk, don't duplicate the logic. Fixes an
extra regeneration triggered by $(wildcard $(my_android_manifest))
when LOCAL_FULL_MANIFEST_FILE points to a generated file, which
will not exist on the first run of kati.
Test: m
Change-Id: Ia56693a4dbbc7d78900019b887f766938dc55dab
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES
The make rule cross references the libraries against what's stored
in the manifest.
Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.
Bug: 70934104
Bug: 67345922
Test: manual
(cherry picked from commit 09f3b97f4b)
Merged-In: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
Change-Id: I670431f938c31115a7812c1857c31b9f71675632
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES
The make rule cross references the libraries against what's stored
in the manifest.
Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.
Bug: 70934104
Bug: 67345922
Test: manual
Change-Id: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
If a static android library lib1 has LOCAL_STATIC_ANDROID_LIBRARIES
lib2, then the R.class files for packages in lib2 will be merged
into the jar for lib1. If an app has lib1 in its
LOCAL_STATIC_ANDROID_LIBRARIES it will get the R.class files from
lib2 through lib1, instead of regenerating the R.java files with
numbering that matches the resource table of the app.
This was worked around for support libraries by keeping a
fix_dependencies.mk that added transitive static support libraries
to the direct static dependencies of apps. Instead, propagate
the packages that aapt2 generated R.java files for up as
--extra-packages arguments to the next aapt2 invocation, which
will force aapt2 to regenerate the R.java files for those packages.
Bug: 78300023
Test: m checkbuild
Change-Id: I7375e13241b4c4f2933032409fb7935abe133bfc
Merged-In: I7375e13241b4c4f2933032409fb7935abe133bfc
(cherry picked from commit 43c247e181)