metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.
Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
Uses the new class2greylist tool to extract API descriptors from .class
files.
Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.
Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.
Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.
Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
Since TARGET_USES_64_BIT_BINDER could be not set, first check
TARGET_IS_64_BIT when determining binder bitness.
Test: lunch aosp_walleye-userdebug && m -j vndk, then check
directory structure
Bug: 111773572
Change-Id: If75d5946b38d7b5bc15798b273e0450035c8c43a
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.
Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices
Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf
Dump offending artifacts into a file that can be inspected after a
build regardless of whether path requirements are enforced or not.
This makes it easier to track progress for products not yet ready
to enable enforcement.
Bug: 80410283
Test: lunch mainline_arm64; m out/target/product/generic_arm64/offending_artifacts.txt
Change-Id: Id05fbf256edf3689ab0b9851b34658d6d84939b2
This property indicates the path to the root directory (i.e.
TARGET_ROOT_OUT at build time, or ROOT/ in a target_files.zip).
build_image.py will only use this property when building a target using
system_root_image. Under such a configuration, files under this dir
never land into a ramdisk, but as part of system.img. This CL renames
the property name to avoid confusion.
Note that with this change releasetools keeps working with older
target_files zips that contain 'ramdisk_dir'. Because common.py doesn't
read the value of that property, but sets it to ROOT/ directly.
Test: `m dist` on aosp_marlin-userdebug.
Test: `m dist` on aosp_angler-userdebug.
Test: Run add_img_to_target_files.py with a new target_files.zip and an
old target_files.zip respectively.
Change-Id: Ie9e19dd17d8c2abb4c4a97449e436774d5dd2a36
Without this, binaries built for an x64 target with Address Sanitizer enabled
fail to execute at runtime, failing with the error message "No such file or
directory".
Test: 1) Build any Android target that has asan enabled, such as statsd, on
any lunch target with suffix "_x86_64-eng". 2) Run 'file' on the generated
executable. 3) You should see "interpreter /system/bin/linker_asan64" rather
than "interpreter --gc-sections"
Bug: 111667639
Change-Id: I5d7e7f307d954d4cd48ff88a7d9d6a5732276296
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
The way these packages are currently added to the build is via
modifications in product makefiles inheriting from mainline_system,
but with have the side effect of changing the REQURIED modules for
the source of the auto-gen RRO package.
Whitelist auto-generated RRO packages from the path requirement checks
for now.
Bug: 80410283
Test: make
Change-Id: Ib070e28e0ef87a57adfaedf6456585e8bfa29dd3
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.
Leave the declaration in Makefile for now.
Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Merged-In: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
The output of the appcompat tool is store on $(PRODUCT_OUT)/appcompat.
Bug: 110073830
Bug: 78924201
Test: m
Change-Id: Ia77cc53fc241a048958cf243ba298298f800f933
Added logic to not preopt tests. Re-enabled usage of
my_module_multilib since this is referenced in setup_one_odex.
Bug: 110156979
Test: make
Test: forrest first boot tests
This reverts commit 9234def313.
Change-Id: I6a6ea2cd0024c33c0cfbd60f3a1f4ad5b1609dc8
Kati produces errors when a variable containing '=' is used as a
dependency:
https://github.com/google/kati/issues/138
So provide a better error message instead.
Test: Add a module with an '=', see new error
Change-Id: I09d570a8d19abb067621af9983a9d568b643dfb0
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.
Leave the declaration in Makefile for now.
Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.
This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.
Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
This reverts commit 25f9aa8c4b.
Reason for revert: This CL is likely to break several targets in pi-dev-plus-aosp and oc-mr1-dev-plus-aosp.
Change-Id: I3b29cbdf54007d2043ea1d2e4fe8d56d45eced9e
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.
This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.
Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
Enables preopting of product partition apps.
Disabled secondary arch preopt for TARGET_TRANSLATE_2ND_ARCH to fix
preopt errors for some tests.
Test: test-art-host
Bug: 110156979
Change-Id: I0370a309913c8a516e01563aef451e7ab5819129
soong_ui now parses the output from kati into "actions" to feed into the
unified status system. It also looks for errors and marks the enclosing
section as failed.
This adds a few more states so that error messages can be more
appropriately attributed - so that all errors at the end of the buid
aren't attributed to the last makefile read.
Test: m
Test: add some errors
Change-Id: I3abdb004c82e2b99822906910cd66123c11a5099
When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, there is no direct dependency
on the files that get typically added to the ramdisk.img apart from the
NOTICE.html dependency that some files have. This change explicitly adds
the ramdisk/root files as a dependencies of system.img so that the image
is recreated any time a file in the ramdisk changes. It also creates the
installed-files-root.txt file.
Bug: 62387674
Test: /init.rc is present in system.img's dependencies
Change-Id: I234cb8d8a648f8963610be519de1b70b7efe1fd7
Update stale PRODUCT_SYSTEM_SERVER_JARS list since
com.android.location.provider was renamed to
com.android.location.provider.impl.
Added logic to preopt both archs for SDK libs that are also system
server JARS.
Bug: 110780021
Test: manual and verify speed compiled
(cherry picked from commit 4568c2d908)
Merged-In: I34e728444ffda6db3375b638028d54b6ab623209
Change-Id: If0cb68ba4808aa8716099c5447645f4baac63f30
Building a 32-bit-app-only product on a 64-bit capable device is likely
to be unintentional. Print a warning if this is done implicitly,
e.g. via forgetting to define the TARGET_SUPPORTS_64_BIT_APPS variable.
Also change existing references to only treat 'true' as a positive
value, rather than all non-empty ones.
Bug: 110918674
Test: lunched 64-bit-device product that does and doesn't set this var
Change-Id: I021157c94ec3ac1c690547c8992768e58c89c287
Only enable it for the core build files rolling up to generic.mk
for now, and whitelist a couple of modules that are conditionally
defined.
Bug: 7456955
Bug: 80410283
Test: lunch generic; m
Test: lunch full; m
Change-Id: I5448769433d09eaf970c4231874ced3261a5c66b
I found this in the CL description of
I5fda1a77f58814097b10b5ad2743ee25adfaecc4, and modified it slightly.
Bug: 111154853
Test: No
Change-Id: I984ac1a9521357af6b54340939dcde36988fc634
Extend PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION such that
multiple text-based profiles can be fed to profman to be included
in boot.prof
BUG: 70292748
Test: profman with --dump-only option shows that additional
text-based profiles are also being read if they have
been added to PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
Change-Id: I8a6437a323e43b61612c67038abdde200607c513
This will cause odex/vdex files for apps installed under
/system/product/{priv-,}app to be installed in system-other image, under
/system/product/{priv-,}app as well.
Test: m on marlin-userdebug target, analyzed
installed-files{,-system-other}.txt
Bug: 110072687
Change-Id: I63406f91acc3de4b4f142767e28d45308706c7da
The soong_java_prebuilt.mk file used to assume that if a Soong module
defines a dex jar, it is the output of the module and the module is
installable. This may now not be true if the module uses 'compile_dex'
to define a secondary build rule for a dex jar. If the module is not
installable (LOCAL_UNINSTALLABLE_MODULE=true), do not attempt to preopt
and copy classes.jar to the modules output destination.
Bug: 79409988
Test: on related CL
Change-Id: Ica958ac793e09a0e52125448b44e7cd36e7f35d5
Recent CL added a flag to an unzip command which does not restore
the timestamps of extracted files. This is necessary because the
extracted files are the output of the rule and thus the timestamp
must be newer than the timestamp of the inputs.
Unfortunately, the sdk_mac build has an old version of UnZip (5.52
vs 6.0) which does not support the flag. Replace it with find|touch.
Test: m
Change-Id: Ib1f218af4547a1d604b46e68b6ef50d45cb91ee9
Java modules built with make and Soong currently invoke `hiddenapi`
with their own rules. Refactor the definitions so that Soong uses
make's definition. This will be useful for a subsequent CL which
needs to invoke `hiddenapi` on all boot dex files simultaneously.
Bug: 79409988
Test: m
Change-Id: I85105e650605d37c3ee8200d7f0d40c297756fcb
The `hiddenapi` build tool now expects the first argument to be
a command name. Change its build rule accordingly.
Bug: 79409988
Test: make
Change-Id: I7e34331c487f490d1de6a10c4139768e9774f03e
Some code needs to behave differently for Android Things
systems. PRODUCT_IOT tracks Android Things products.
This change exposes this variable into the soong system.
Bug: 110494430
Test: aosp_angler builds
Change-Id: Id9c27e4fe70957f217cfbdc019e8a37532bafac2
Bug: http://b/62424007
This breaks 64-bit Windows executables. Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.
Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start. (There are some failed tests, though).
Change-Id: I1dea9137c79c5f26b493640cfae0856c1a7ea301
The latter is not module-specific and affects all host modules. Also
remove the check for LOCAL_IS_HOST_MODULE and use $(my_prefix)OS.
This should be future-proof, where may use different configurations of
cross-compilations across Linux, Darwin, Windows.
Test: m native
Change-Id: I0a6255a8b83960ffb543b593d4a50d963be1de88
The latter is not module-specific and prevents santizer configuration
for all host modules.
Test: mma HOST_SANITIZE=address hardware/google/apf
Change-Id: I62a448973c1d6526e4b475f3288996e44c88fbc9
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer. Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.
This will also prevent relocation packing on prebuilt shared
libraries.
Also enables relocation packing on Darwin since lld will work on
Darwin.
Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
Confusion between LOCAL_USE_R8 and USE_R8 caused USE_R8 := false
to be set in an Android.mk file, which changed the behavior of
half of the build. Make USE_R8 and USE_D8 read-only to prevent
it from happening again.
Test: m checkbuild
Bug: 110033958
Change-Id: I09a8fbf3d7f8e4b3f0cb3de538870f925d5d0abe
The product-installed-files macro is not really thorough - it only
includes packages, but not other files which are included as part of
the build. Extend it to also include PRODUCT_COPY_FILES.
Bug: 80410283
Test: downstream CL
Change-Id: I803c7a59e695c226fa413fa1602ec315ef9886a8
This reverts commit 054f210fd5.
Reason for revert: Revert it again since BUG of 109736180 already be fixed.
Local verified for different build targets of
walleye_coverage-userdebug, marlin_coverage-userdebug
and make sure they can build pass.
BUG: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test
BUG: 73082610
Test: cd packages/apps/DocumentsUI/tests/; mma
Modify AndroidTest.xml to a not well-formed xml; mma
Then, it should build fail.
atest -v DocumentsUITests
Change-Id: Iadfcb28a4e3f685a66697de21f57ca5bdb8b7c9e
Build system will install binaries to product partition path when build
scripts specify module's install path to product partition.
To supports that, TARGET_OUT_PRODUCT_EXECUTABLES for primary and
secondary ABI path should be declared.
Bug: 110745956
Test: Set LOCAL_PRODUCT_MODULE to true in Android.mk or set product to
true in Android.bp file.
Change-Id: Ib8a491364ee30e49bb327163974661915e183608
Test: builds
Test: build with BOARD_SUPER_PARTITION_SIZE and
BOARD_SUPER_PARTITION_PARTITION_LIST defined
Bug: 79106666
Change-Id: Ifcd50ecab22ef096ff1eb386f8d87e16fffdcf5e
Test: `make vendorimage`
Test: `make vendorimage` with the following:
- install a large file to vendor image
fails as expected (because _PARTITION_SIZE is exceeded)
Test: `make vendorimage` with the following:
- set PRODUCT_USE_LOGICAL_PARTITIONS to true
- set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
to be undefined)
Test: `make vendorimage` with the following:
- install a large file to vendor image
- set PRODUCT_USE_LOGICAL_PARTIIONS to true
- add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
- remove BOARD_VENDORIMAGE_PARTITION_SIZE
build succeeds.
Bug: 79106666
Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
- Copy "use_logical_partitions" to *_image_info.txt before sending
it to build_image.py, so that the script can use this variable.
- build_image.py emits an additional properties file to inform
the build system about the system image size.
Test: `make systemimage`
Test: `make systemimage` with the following:
- install a large file to system image
fails as expected (because _PARTITION_SIZE is exceeded)
Test: `make systemimage` with the following:
- set PRODUCT_USE_LOGICAL_PARTITIONS to true
- set BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
fails as expected (BOARD_SYSTEMIMAGE_PARTITION_SIZE needs
to be undefined)
Test: `make systemimage` with the following:
- install a large file to system image
- set PRODUCT_USE_LOGICAL_PARTIIONS to true
- add a small BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
- remove BOARD_SYSTEMIMAGE_PARTITION_SIZE
build succeeds.
Test: same for systemotherimage
Bug: 79106666
Change-Id: I574062882acd1ecd633ac38c5a8c5351b90a32d8
Remove support for compiling with javac from OpenJDK8.
We still target 1.8 by default, and OpenJDK8 prebuilts are still
required for the bootclasspath and running robolectric.
Bug: 38418220
Test: m java
Change-Id: I6f178f73b42331494fadcc25a62a5475656b873e
Relanding with change to not run on the darwin build since host init
verifier is not possible there.
Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
PRODUCT_COPY_FILES, or TARGET_PREBUILT
Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442
Make it so that `export`/`unexport` are deprecated during product
configuration, but obsolete during Android.mk parsing (and later in the
build, since we can't un-obsolete it).
Remove some ccache / goma exports, those don't need to be exports, since
soong_ui asks about them explicitly. They also only run doing the
initial project configuration, so we don't run anything with that
environment.
Bug: 73959648
Test: m nothing
Test: build_test on all downstream branches
Change-Id: I55a749f46775660439ae57e881a02c914e83de16
Make the values tristate, so that we can differentiate set vs not in
scripts that parse the logs.
Also add some placeholders for warnings that I expect to turn into
errors.
Test: Set BUILD_BROKEN_PHONY_TARGETS to "foo"
Change-Id: I3f7e1e0f85dcef84d6461fc40bdd83dc5bf75ff7
Instead of $(LOCAL_MODULE)-docs, use $(call
doc-timestamp-for,$(LOCAL_MODULE)), which is how the *-docs targets are
generated in droiddoc.mk
Test: m offline-sdk-referenceonly-diff
Change-Id: I1e5ee3b819c0e836089fac236e977642067d148a
Run ErrorProne as a processor in javac from OpenJDK9.
Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
Pass LOCAL_STATIC_ANDROID_LIBRARIES to ManifestMerger, and copy
manifests for prebuilts AARs and static android libraries to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.
Bug: 78447299
Test: m java
Change-Id: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: I02ac29d3445fcd591101ff0ce215e60dd0997224
(cherry picked from commit 1c87e71e84)
If there aren't any boot dex files, we can't generate a boot image
profile.
Test: lunch uml-eng; m
Test: diff build-aosp_arm.ninja
Change-Id: I09cc1ef37379d9d353958c8aa75731f3d29df759
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
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.
This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.
Test: aosp compiled with m -j
Test: local experiment with LOCAL_SANITIZE := scudo to ensure that a test
target (mediaserver) could be linked with scudo.
Change-Id: I462843b9d5512fba2c4a3ac1a0c356ca90bce4e5
Switch a use of `ndk` to the timestamp file that `ndk` depends on
itself.
Mark more module-specific rules as PHONY.
Test: diff build-aosp_arm.ninja (stripping _kati_always_build_)
Test: Turn on --warn_real_to_phony for Kati, see fewer warnings
Change-Id: I101ced4067780e38d18820f5d916596429087e49
These had been depending on the phony target for the library
(liblz4.vendor), not the actual built file and notice file.
Since we hadn't been saving the NOTICE file, and were only assuming the
installed notice file path. save that away for use during packaging.
Test: m vndk; diff out/target/product/generic/android-vndk-aosp_arm.zip
Test: m vndk; diff out/target/product/generic_arm64/android-vndk-aosp_arm64.zip
Change-Id: If9a4bed27030b7bd464cd3987739df94d32a0037
Sdk addon has been allowed for libraries built with Android.mk. But some
of the libraries included in the Sdk addon should be built with
java_sdk_library. module-stubs-files function is modified for supporting
java_sdk_library modules.
Bug:77577799
Test: make -j
Change-Id: If289e5aa5b5016901ff9b69da8fc7f7d8138a456