Commit graph

18462 commits

Author SHA1 Message Date
Dan Willemsen
3d05a08a6f Reland "First pass at creating PRODUCT_HOST_PACKAGES"
Adds icu-data_host_runtime_apex to fix unbundled builds which pull it in
via PRODUCT_PACKAGES, but are missing packages that would pull it in via
PRODUCT_HOST_PACKAGES.

Test: build/soong/build_test.bash
Test: in ub-timezonedata-master; tapas TimeZoneData; m
Change-Id: I1583c7582b386c3e8478711cb1df340518d763c1
Merged-In: I1583c7582b386c3e8478711cb1df340518d763c1
2019-03-06 14:46:06 -08:00
Colin Cross
e34ff5ca5d Merge "Update manifest merger to use binary" 2019-03-04 22:02:09 +00:00
Nicolas Geoffray
53cfd9275b Merge "Pass the --api-flags to appcompat explicitly." 2019-03-04 14:14:39 +00:00
Julien Desprez
4e9a9485f4 Add a placeholder EXTRA_OPTIONS to inject more tradefed options
Simply remove the placeholder in makefiles, for now I am
not sure we need to support this in makefiles at all.

Test: call the sed method
Bug: 124024827
Change-Id: Iae78ae86c20c5da6b7314b749f54983a312c4a7d
2019-03-01 11:36:36 -08:00
Yifan Hong
5a4696e460 Merge "Build ODM manifests and fragments for each SKU." 2019-03-01 18:32:32 +00:00
Anton Hansson
e0ce6ca8a5 Merge "Move BoardConfig strip / READONLY marking" 2019-03-01 15:34:36 +00:00
Anton Hansson
451951c139 Merge "Move combo makefile parsing" 2019-03-01 15:34:19 +00:00
Colin Cross
5852c93585 Merge "Use flags from Soong for d8 and r8" 2019-03-01 15:28:29 +00:00
Anton Hansson
d488d2d7d7 Move BoardConfig strip / READONLY marking
This moves the BoardConfig READONLY marking being product.mk's
responsibility to board_config.mk.

Also unify it with the BUILD_BROKEN_* setting handling, and
READONLY a few additional variables.

Test: build_test
Change-Id: Ifcfef588aa459223d6d7f017413d1681f341297f
2019-03-01 10:04:18 +00:00
Anton Hansson
192798513e Move combo makefile parsing
These files may be setting variables usually defined in the
BoardConfig. This moves that setting into board_config.mk so
that the relevant variables can be made readonly.

Test: build_test
Test: diff presubmit target_files vs base cl
Change-Id: I4dab09fa67c0f2e88a8ce1402a35b4ef5f8a0560
2019-03-01 09:54:33 +00:00
Logan Chien
b1c11de3c1 Fix check_elf_file with LOCAL_SDK_VERSION and NDK libs
This commit fixes prebuilt ELF checker for modules with
LOCAL_SDK_VERSIONS and depend on NDK shared libraries. This fix is
required because dynamic_binary.mk filters out NDK libraries thus those
libraries do not show up in DEPENDENCIES_ON_SHARED_LIBRARIES.

Bug: 119084334
Test: Create a prebuilt module with LOCAL_SDK_VERSION and check whether
      the NDK libs in LOCAL_SHARED_LIBRARIES are passed to
      check_elf_file.py.
Change-Id: I0f72ae1b0edc3e8d7e43eb70829e74d606564966
2019-03-01 10:25:25 +08:00
Nicolas Geoffray
ac1f90c39c Pass the --api-flags to appcompat explicitly.
Bug: 125794065
Test: m && appcompat logs contain data
Change-Id: Idef875138d6670efc9ed7b9c63f653229b173d3e
2019-02-28 13:51:14 +00:00
Anton Hansson
c651ef8529 Merge "Make it an error to specify the wrong ARCH_VARIANT" 2019-02-28 10:29:05 +00:00
Anton Hansson
67d3081d3f Merge "Move WITH_DEXPREOPT default value" 2019-02-28 10:26:31 +00:00
Anton Hansson
2507ce486d Merge "Modify INTERNAL_KERNEL_CMDLINE instead of BOARD_ variant" 2019-02-28 10:26:18 +00:00
Anton Hansson
d265f52005 Merge "Consolidate some BoardConfig variable checks" 2019-02-28 09:21:41 +00:00
Anton Hansson
be1f9cb2fa Make it an error to specify the wrong ARCH_VARIANT
It was previously a warning to set an incorrect ARCH_VARIANT
when CPU_VARIANT was set to a cpu for which we knew the arch.

Make it an error, as there are no offenders in the tree.

Re-structure the code to make it a little clearer when you get
a default and when you get an error.

Test: build_test
Change-Id: I5821a8162a59e8c2aed2370068f9eb656ced9d99
2019-02-27 17:27:16 +00:00
Anton Hansson
74dc00b88f Move WITH_DEXPREOPT default value
This allows setting the variable READONLY after reading the BoardConfig.

This is safe to do because this flag is only set in BoardConfig.mk
files. The same is not true for many of the other default preopt flags,
like DEX_PREOPT_DEFAULT or WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
which are set in mixture of product / board config files.

Test: boot blueline
Change-Id: I961ba581f9790bcdc7cf6b36d8b53bcdb8861a92
2019-02-27 15:03:23 +00:00
Anton Hansson
72e36f0278 Modify INTERNAL_KERNEL_CMDLINE instead of BOARD_ variant
The current modification of the variable within the build system
prohibits making the variable readonly.

Test: build_test
Test: boot blueline
Change-Id: Iec6058a163b5951db389d4adc0d9d0397431efb1
2019-02-27 14:29:01 +00:00
Anton Hansson
b9544694a5 Consolidate some BoardConfig variable checks
Move a few more variable stripping/sanity checking from
config.mk to board_config.mk

Test: build_test
Change-Id: I93fde7293de38398039dbb679b2399c8a68c190d
2019-02-27 14:07:43 +00:00
Anton Hansson
45747a037a Merge "Split out board_config.mk" 2019-02-27 13:21:17 +00:00
Colin Cross
7293c1e4b9 Update manifest merger to use binary
Manifest merger is now a java_binary instead of a collection of jars,
it can use the single binary as the dependency.

Bug: 112607039
Test: m checkbuild
Change-Id: Id97b01542314cb165ebf7c90409a09482d8c53bc
2019-02-27 06:18:35 +00:00
Treehugger Robot
55ebd61486 Merge "Fix dynamic partition size check for devices with recovery" 2019-02-27 01:58:58 +00:00
Anton Hansson
bb76ce825c Split out board_config.mk
Similar to product_config.mk, this contains the logic for reading
BoardConfig.mk, and will be expanded to sanity-check variables
set in the BoardConfig etc.

Test: build_test
Change-Id: I4f8d7cfbf1506ae4268c82c9554680259958b313
2019-02-26 16:27:48 +00:00
Yifan Hong
accf09b2e0 Fix dynamic partition size check for devices with recovery
Devices with TARGET_NO_RECOVERY unset will contain a patch
of the recovery image in the system image. Fix
corresponding size checks.

Fixes: 120043292
Bug: 124489494
Test: build cuttlefish with DAP

Change-Id: I508881f421672180ab852c0f9216184b925d83ad
2019-02-25 16:10:43 -08:00
Dan Willemsen
fb8c9673e7 Merge "Deprecate *.c[pp].arm" 2019-02-25 21:28:31 +00:00
Nicolas Geoffray
3b813d10bb Merge "Support for install multiple boot images." 2019-02-24 13:37:01 +00:00
Paul Duffin
a0d31e733b Remove usages of legacy-test and legacy-android-test
Bug: 63127064
Test: TH
Change-Id: I2f71b8dab6a5303cae24e36d6519a4001af66063
2019-02-22 15:45:03 +00:00
Nicolas Geoffray
269bc741a5 Support for install multiple boot images.
Bug: 119800099
Test: m && /system/framework/arm/apex*.art files exist
Change-Id: I78023f1086446c2c44ff6b282993537b053c0588
2019-02-22 15:33:23 +00:00
Anton Hansson
4208c81ab9 Merge "Add support for *_CPU_VARIANT_RUNTIME flags" 2019-02-22 12:34:02 +00:00
Anton Hansson
b5312392a0 Merge "Move ART cpu properties to /vendor" 2019-02-22 12:14:49 +00:00
Anton Hansson
299ffb7870 Merge "Add more BoardConfig variables to stash list" 2019-02-22 10:21:07 +00:00
Logan Chien
7d35910451 Merge "Refine lsdump_paths.txt dependencies" 2019-02-22 09:08:03 +00:00
Logan Chien
5f4e29b090 Refine lsdump_paths.txt dependencies
This commit moves $(LSDUMP_PATHS) from the prerequisite of
lsdump_paths.txt to the prerequisite of findlsdumps. This change makes
it possible to dump the list of lsdump files without actually building
all lsdump files.

Bug: 124829578
Test: make out/target/product/generic/lsdump_paths.txt
      # does not build the actual lsdump files
Test: make findlsdumps  # builds lsdump_paths.txt and all lsdump files
Change-Id: I924f1c0c61391e958521c376a061651f2a301adb
2019-02-22 10:55:44 +08:00
Dan Willemsen
46267cb4d8 Deprecate *.c[pp].arm
There never were too many users of this, and I've just converted the
last ones to Soong.

Test: diff build-aosp_arm.ninja
Test: treehugger
Change-Id: Ida6d486a62d0b521c1cd67f5f18c0ad0dbe957e3
2019-02-21 18:02:13 -08:00
Treehugger Robot
f97ed91448 Merge "Add a wrapper file for the vts_config module." 2019-02-22 00:19:27 +00:00
Colin Cross
17ea341950 Use flags from Soong for d8 and r8
Use the flags provided by Soong when running d8 and r8.

Bug: 119270658
Test: m checkbuild
Change-Id: I9459ded386effc27c4c96f1e94f9ea2f8ed19319
2019-02-21 15:04:37 -08:00
Colin Cross
6128b1e8d6 Merge "Get DEXPREOPT_BOOT_JARS_MODULES from Soong" 2019-02-21 21:32:03 +00:00
Tianjie Xu
df5978803d Merge "Dump a copy of metadata file for full OTA" 2019-02-21 18:00:55 +00:00
Anton Hansson
71b7f7fbd0 Add support for *_CPU_VARIANT_RUNTIME flags
Specified in the BoardConfig, and default to the value of the non
_RUNTIME variants.

These flags do not modify build-time compilation, but get written to
system properties on /vendor and can be inspected at runtime to
run/compile code for the specified cpu.

Migrate the bionic and ART cpu variant flags to use the new variables,
but leave the ART preopting using the non-_RUNTIME variants.

Bug: 120773446
Test: boot downstream device specifying CPU_VARIANT_RUNTIME flags
Test: grep dalvik.vm vendor/default.prop
Change-Id: Idc81110172582f38f84cca87f2eff140c5b5f9ac
2019-02-21 14:32:13 +00:00
Anton Hansson
30851f2540 Move ART cpu properties to /vendor
System properties relating to the physical hardware belong
on the vendor partition. Move the ART-related cpu variant
sysprops there.

This also brings the ART sysprops in line with the equivalent
bionic sysprops.

Bug: 120773446
Test: make, boot
Test: grep dalvik.vm vendor/default.prop
Change-Id: I3f843a7070dd0d9148737e040fe87d6461977d09
2019-02-21 14:13:44 +00:00
Anton Hansson
70222b21ee Add more BoardConfig variables to stash list
I would like to centralize/standardize the BoardConfig
variable sanity checking in a file similar to product_config.mk,
but for now just add a few more standard BoardConfig
variables to the .KATI_READONLY list.

Also fix the inconsistent indentation in this file.

Test: make
Change-Id: I2a878b95ffc07e3f5bc4eb4970775bdef347e094
2019-02-21 14:02:15 +00:00
Colin Cross
187c1b0741 Get DEXPREOPT_BOOT_JARS_MODULES from Soong
DEXPREOPT_BOOT_JARS_MODULES is not set any more in Make, stop
trying to pass it to Soong and let Soong export the value to Make.

Test: m checkbuild
Change-Id: I64de10236cbebc92c62fca137ae684e55cad1625
2019-02-20 21:46:31 -08:00
Colin Cross
36b5d1cd47 Update calls to dexpreopt_gen
dexpreopt_gen now requires a -out_dir argument, and does not need
DexPath, StripInputPath and StripOutputPath set.

Also use paths to Soong binaries for dex2oat, profman and aapt
so that they can be loaded as Path objects in Soong, and let
Soong handle the default for BootImageProfiles.

This reapplies I97b1865fd98d5108d9c63ff7a90a5591c7622526 with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.

Test: m checkbuild
Change-Id: I5af9b749235823b7e1cfcfc55e121bfec413fb2f
2019-02-20 21:46:15 -08:00
Colin Cross
5b8e3837d2 Merge "Revert "Update calls to dexpreopt_gen"" 2019-02-21 05:03:41 +00:00
Colin Cross
862ab81669 Revert "Update calls to dexpreopt_gen"
This reverts commit 1d8df4a97f.

Reason for revert: broke ndk build

Change-Id: I99ab62653fc15b985edd42301ec085ba68389f51
2019-02-21 05:03:11 +00:00
Bill Peckham
30ee35f908 Merge "Include merge_target_files.py deps in otatools.zip, use common argv processing." 2019-02-21 04:13:23 +00:00
Colin Cross
bcc341e5b0 Merge "Update calls to dexpreopt_gen" 2019-02-21 04:06:18 +00:00
Bill Peckham
f753e15791 Include merge_target_files.py deps in otatools.zip, use common argv processing.
The merge_target_files.py script needs fc_sort and sefcontext_compile, so
include these tools into otatools.zip via core/Makefile.

Modify tools/releasetools/merge_target_files.py to use the otatools common argv
processing to take advantage of the '--path' option so that we add point the
'--path' option to an extracted otatools.zip package to gain access to fc_sort,
sefcontext_compile, and soong_zip (previously included in otatools.zip).

Bug: 123600124
Test: extract otatools.zip, use --path option to point to it, verify result
Change-Id: I7d84525981b8741c6bdbcac9984256920fc7f417
2019-02-21 00:50:54 +00:00
xunchang
3b548b0302 Dump a copy of metadata file for full OTA
When building the full OTA file, write a copy of the metadata to the
dist dir. Then it will show up in the artifact of the build page for
users to parse.

Bug: 124783265
Test: make dist and check the output metadata
Change-Id: I2eb06bbf3cbb9f3653ca3352f3d601b09403d59d
2019-02-20 15:32:28 -08:00
Colin Cross
d8badf5b8b Fix boot_profile_jars.zip
Some of the inputs to boot_profile_jars.zip have moved outside
of $(PRODUCT_OUT), update the -C argument to soong_zip to point
to the right directory.

Also make the rule to build the zip always present, and only gate
the dist command behind PRODUCT_DIST_BOOT_AND_SYSTEM_JARS.

Test: m out/target/product/blueline/boot_profile_jars.zip
Change-Id: Iaa72be955edda445f3eab041a63f79c9055d6b33
2019-02-20 20:44:58 +00:00
Colin Cross
1d8df4a97f Update calls to dexpreopt_gen
dexpreopt_gen now requires a -out_dir argument, and does not need
DexPath, StripInputPath and StripOutputPath set.

Also use paths to Soong binaries for dex2oat, profman and aapt
so that they can be loaded as Path objects in Soong, and let
Soong handle the default for BootImageProfiles.

Test: m checkbuild
Change-Id: I97b1865fd98d5108d9c63ff7a90a5591c7622526
2019-02-20 11:14:14 -08:00
Nicolas Geoffray
5fa7e2fa2c Merge "Set a dedicated variable for the runtime apex libs." 2019-02-20 18:42:46 +00:00
Nicolas Geoffray
cffe5bb1f3 Merge "Remove obsolete rule." 2019-02-20 18:32:10 +00:00
Yu Shan
a83858dc37 Merge "Add 32BIT and 16BIT nanopb library." 2019-02-20 18:23:29 +00:00
Xin Li
747bbbe163 Merge "DO NOT MERGE - Merge PPRL.190205.001 into master" 2019-02-20 16:26:00 +00:00
Nicolas Geoffray
02c6848b1a Remove obsolete rule.
We don't strip boot classpath anymore.

Test: m
Change-Id: I516bbac92d896c9e00a634a33f2856bd18fc75d5
2019-02-20 10:15:24 +00:00
Nicolas Geoffray
f026d899f4 Set a dedicated variable for the runtime apex libs.
Bug: 124789867
Test: build with coverage, the boot classpath has jacoco.jar in /system/framework, not the apex
Change-Id: I2529f8fcb4ef30454a9e5fc95d58d31bef83ec6f
2019-02-20 10:05:17 +00:00
Tri Vo
62d51b65aa recovery: install product_file_contexts and product_property_contexts
Product partition is not mounted in recovery mode. Install
product_file_contexts and product_property_contexts into rootdir for
recovery. This is similar to how we deal with system, vendor, and odm
*_contexts files.

And remove unnecessary ifdefs.

Test: m bootimage for pixel 3, product_file_contexts and
product_property_contexts appear in $OUT/recovery/root/
Change-Id: I416d9e6ea742e67a6fe294f1ad8b78fb9b844260
2019-02-19 18:32:55 -08:00
Treehugger Robot
eb0bbdc89a Merge "Install apexkeys.txt into the target-files package" 2019-02-20 01:53:44 +00:00
Yifan Hong
b321665b9d Build ODM manifests and fragments for each SKU.
In BoardConfig.mk, ODM manifests can be specify as follows:

    # installed to /odm/etc/vintf/manifest.xml
    ODM_MANIFEST_FILES := device/foo/bar/odm_manifest.xml

    # installed to /odm/etc/vintf/manifest_baz.xml
    ODM_MANIFEST_SKUS := baz
    ODM_MANIFEST_BAZ_FILES := device/foo/bar/odm_manifest_baz.xml

This is preferred over PRODUCT_COPY_FILES because it uses
assemble_vintf to check manifest at build time.

Test: builds

Change-Id: I18517b8ba09d3271627d6f21b8250b1bfc9e5db3
2019-02-19 12:37:50 -08:00
Yu Shan
655f17cf88 Add 32BIT and 16BIT nanopb library.
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
2019-02-19 12:01:43 -08:00
Jiyong Park
bcc8d8a2d4 Install apexkeys.txt into the target-files package
The file contains information about apex-to-keys mappings.

Bug: 124406181
Test: m dist and check if META/apexkeys.txt file exist in the
target-files package.

Change-Id: If8da917a8b4d4e8326614b34067c14ed0df59cb3
2019-02-19 14:18:46 +09:00
Colin Cross
dd025116cd Merge "Remove dexpreopting of boot jars from Make" 2019-02-19 02:55:16 +00:00
Bowgo Tsai
f509e54bd0 Merge "Support verifying system_other"
am: 01a05483ed

Change-Id: I343ac68c70195d2c9e035b92ef44f196fe731deb
2019-02-17 21:34:32 -08:00
Treehugger Robot
01a05483ed Merge "Support verifying system_other" 2019-02-18 05:21:27 +00:00
Jeongik Cha
d9182b546c Merge "Clean up noisy error log in find-shareduid-violation.py"
am: 50b4b395bc

Change-Id: I643ffdb62536e48c288ab6cfe902e081908213d1
2019-02-16 20:29:46 -08:00
Treehugger Robot
50b4b395bc Merge "Clean up noisy error log in find-shareduid-violation.py" 2019-02-17 04:19:41 +00:00
Roman Kiryanov
af38e1765f Merge "Use predefined macros instead of hardcoding the path"
am: 06ec0577b6

Change-Id: I96baf1b12e11d7e7a4c4863dc9ed3c22c97c0568
2019-02-16 15:07:43 -08:00
Treehugger Robot
06ec0577b6 Merge "Use predefined macros instead of hardcoding the path" 2019-02-16 22:56:47 +00:00
Jeongik Cha
b806c44326 Clean up noisy error log in find-shareduid-violation.py
The script makes noisy error although fallback cmd succeed.

So make the script writes error log only if both of commands fail.

Bug: 124470143
Bug: 123664116
Test: m -j out/target/product/$(get_build_var TARGET_DEVICE)/shareduid_violation_modules.json
Test: And there is no error log in stderr
Change-Id: I3d4756066ee6904826c18754969fd4190bd02e1e
2019-02-16 10:50:56 +09:00
Bill Peckham
19d6b0fbe5 Merge "Include soong_zip in OTA tools package."
am: f3c50438c3

Change-Id: Ice539fef08bd66a82cb6b2ba60d4c7da617fc9eb
2019-02-15 16:45:54 -08:00
Bill Peckham
f3c50438c3 Merge "Include soong_zip in OTA tools package." 2019-02-16 00:38:07 +00:00
Roman Kiryanov
27a67bac5c Merge "Check INSTALLED_SYSTEMIMAGE_TARGET to build INSTALLED_QEMU_SYSTEMIMAGE"
am: 7848e3cfef

Change-Id: Icf2c7e630bd5009b78015ef6aa275e7c199cd5eb
2019-02-15 16:12:21 -08:00
Treehugger Robot
7848e3cfef Merge "Check INSTALLED_SYSTEMIMAGE_TARGET to build INSTALLED_QEMU_SYSTEMIMAGE" 2019-02-15 23:53:03 +00:00
Colin Cross
47e384c3d6 Remove dexpreopting of boot jars from Make
Dexpreopting of boot jars is now implemented in
build/soong/java/dexpreopt_bootjars.go.

Test: m checkbuild
Change-Id: I036510e7674b876976ce191c5b18bf0b7a15c6ee
2019-02-15 13:00:14 -08:00
Bill Peckham
eabb713f15 Include soong_zip in OTA tools package.
Including soong_zip in the OTA tools package enables its use in target files
repackaging scripts.

Bug: 124468071
Test: Generate build, verify that soong_zip exists in otatools.zip at bin/soong_zip
Change-Id: Iee0d9dba73a66de4d1aa6970dd8fb8debb723660
2019-02-15 11:25:34 -08:00
Colin Cross
a78af927a9 Merge "Fix resource overlay order for static libraries"
am: dba735e9a5

Change-Id: Ibeb88897c5b532fb4c3cb2935641fe555f05dc46
2019-02-15 11:10:36 -08:00
Colin Cross
dba735e9a5 Merge "Fix resource overlay order for static libraries" 2019-02-15 18:54:49 +00:00
Roman Kiryanov
4985cc829d Use predefined macros instead of hardcoding the path
There are predefined macros image targets that are
already checked in dependencies, use them instead
of hardcoding the same path again.

Bug: 79601115
Test: make -j
Change-Id: I12b64a646df038de017ba2ef18f3d0e4274f7caa
Signed-off-by: Roman Kiryanov <rkir@google.com>
2019-02-15 10:38:02 -08:00
Roman Kiryanov
e64998fe3b Check INSTALLED_SYSTEMIMAGE_TARGET to build INSTALLED_QEMU_SYSTEMIMAGE
This change checks if INSTALLED_SYSTEMIMAGE_TARGET
is defined to generate INSTALLED_QEMU_SYSTEMIMAGE
to improve debugging.

Bug: 79601115
Test: make -j
Change-Id: Ia1aad7dbaab1d2de11a1bc3ffe7c7ae714f5f6eb
Signed-off-by: Roman Kiryanov <rkir@google.com>
2019-02-15 10:37:54 -08:00
Colin Cross
3b6b01b04a Merge "Add missing hiddenapi product variables to Soong config"
am: 569478f046

Change-Id: I0c9cd744aeb06aa87b87631b636362cd069eca18
2019-02-14 20:05:11 -08:00
Treehugger Robot
569478f046 Merge "Add missing hiddenapi product variables to Soong config" 2019-02-15 03:47:31 +00:00
Sasha Smundak
f897629a58 Add a wrapper file for the vts_config module.
See https://android-review.googlesource.com/c/platform/build/soong/+/905013

Bug: 122617100
Test: treehugger
Change-Id: I3e1614bc9009c00132d0fc3500bdd4491055320a
2019-02-14 18:13:36 -08:00
Xin Li
673fa32bc7 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:35 +00:00
Colin Cross
36f79c4be6 Add missing hiddenapi product variables to Soong config
If72bd1c20b2014d0a3d400624d37fdb0a3052245 failed to propagate
PRODUCT_HIDDENAPI_STUBS* to Soong.

Bug: 124316921
Test: m out/soong/hiddenapi/hiddenapi-flags.csv, check previously
      blacklisted classes are now whitelisted.

Change-Id: I9b4a364654bad77b38ceb7062dafaeeab5f49517
2019-02-14 11:22:02 -08:00
Benjamin Gordon
b8bf92e6b8 Add stoney ridge x86 variant
Bug: 124445930
Test: compile and deploy to grunt
Change-Id: Ia73c27f7ce9ca9031e733a3754ffbb2fabeae4d0
2019-02-14 11:03:00 -07:00
android-build-team Robot
de4669b4a2 Make change and version bump to PQ2A.190405.003
Change-Id: Ieff87cfad4da8e42b43b98b0e819fbdefbab56c2
2019-02-14 16:27:06 +00:00
Elisa Pascual Trevino
4e41f65503 Update Security String to 2019-04-05
Bug: 124119313
(cherry picked from commit 0b5a344dc3)

Change-Id: I1a68d374fd1935e7b37b9665dfca7d782055b4c8
2019-02-14 16:24:14 +00:00
android-build-team Robot
cbe4d3231a Version bump to PQ2A.190405.002
Change-Id: I317fd68333a1b5923ae9b30b200f523fe50d508f
2019-02-14 14:38:20 +00:00
android-build-team Robot
9886f404c2 Version bump to PQ2A.190405.001
Change-Id: Iddf273fbbb2ff7efabdf298e29ce100247f89f24
2019-02-14 14:04:31 +00:00
Logan Chien
87ec538ef1 Merge "Strip LOCAL_CHECK_ELF_FILES" 2019-02-14 10:20:28 +00:00
Logan Chien
e87ff2d85f Strip LOCAL_CHECK_ELF_FILES
This commit strips LOCAL_CHECK_ELF_FILES before comparing it with
`false` so that developers can add comments after LOCAL_CHECK_ELF_FILES.
For example:

    LOCAL_CHECK_ELF_FILES := false  # disable checks due to ...

Bug: 119084334
Test: Add some spaces after LOCAL_CHECK_ELF_FILES and run
      CHECK_ELF_FILES=true make check-elf-files
Change-Id: I2bfaff4807aeeea6c7af0b9d7d716742b6764cd0
2019-02-14 14:30:09 +08:00
Treehugger Robot
6eeef21b9d Merge "Drop /root when installing symbols" 2019-02-14 05:27:44 +00:00
Treehugger Robot
07603d63f6 Merge "Generate API XML files from android stub targets instead of text input." 2019-02-14 05:19:34 +00:00
Colin Cross
b11fc29b13 Fix resource overlay order for static libraries
If a static library has static library dependencies then all resources
need to be moved to an overlay to maintain the correct ordering so
that a static library resource overlays the same resource in a
dependency.

Bug: 124108931
Test: m checkbuild
Change-Id: I6be9a80c53e6247a6589272ab0e653a9a0ded814
2019-02-14 03:34:57 +00:00
Treehugger Robot
bee89836c7 Merge "DAP: system_as_root can't be true." 2019-02-14 02:09:20 +00:00
Logan Chien
e083c26a19 Merge changes I2f2a7df5,I84ff9f61
* changes:
  Check ELF files in both paths
  Add system shared libs to a prebuilt_internal.mk path
2019-02-14 01:53:27 +00:00
Allen Hair
191f0e5b60 Generate API XML files from android stub targets instead of text input.
The resulting XMLs will contain more complete information (such as
whether or not a method is native) than is available in current.txt.

Bug: 124335876
Test: make PRODUCT-cf_x86_phone-userdebug showcommands dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests

Change-Id: Icb8999bcd6be28f3ec8ff6bffa33b261f0d20606
2019-02-13 17:48:00 -08:00
Pirama Arumuga Nainar
5aab10f40d Merge "Enable coverage only when LOCAL_SDK_VERSION > 23" 2019-02-14 00:05:57 +00:00
Yifan Hong
f84c7e5c8f DAP: system_as_root can't be true.
Test: builds
Change-Id: I3e47e9717c983703494abc8417526caf5955d2e4
Fixes: 124274480
2019-02-13 15:08:33 -08:00
android-build-team Robot
af2091dc1b Version bump to PQ2A.190401.002
Change-Id: I18282ec17af9201d2a169b9300cb3b64de51c745
2019-02-13 19:16:40 +00:00
Colin Cross
dc53f450af Make copy-many-files take an optional destination directory
Test: m checkbuild
Change-Id: I777952d27bd1a0cf2608e080a0f46e39268784ce
2019-02-13 08:03:25 -08:00
Nicolas Geoffray
cd75414f1e Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" 2019-02-13 11:59:39 +00:00
Anton Hansson
2582554c42 Merge "Move dump-products back to the config stage" 2019-02-13 09:12:30 +00:00
Bowgo Tsai
45db7cefb3 Support verifying system_other
This commit extracts the AVB key used to sign system_other.img into
system.img, for init to verify system_other's AVB metadata.

The extracted key will locate in:
    /system/etc/security/avb/system_other.avbpubkey

Bug: 123611926
Test: build and checks the following is generated
      $OUT/system/etc/security/avb/system_other.avbpubkey

Change-Id: Icdc703ff5a0d50f8140bb652507b9b4cbc8a2118
2019-02-13 17:00:49 +08:00
Colin Cross
8f4e0f2939 Merge "Move dexpreopt image selection out of dexpreopt_gen" 2019-02-13 01:00:49 +00:00
Treehugger Robot
cb52058f8f Merge "Adding per-partition SPL into AVB prop descriptors" 2019-02-12 23:30:13 +00:00
Treehugger Robot
5afd3dc00e Merge "Obsolete add_lunch_combo" 2019-02-12 23:22:50 +00:00
Tom Cherry
8bca10ade4 Merge "Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H" 2019-02-12 21:10:41 +00:00
Xin Li
798d2a795e DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master
Bug: 124234733
Change-Id: Iade9f985e598b9c83746c8250eb88831626c9da5
2019-02-12 10:12:55 -08:00
Steven Laver
0cf76f544b Merge "Allow properties to be derived from partition-specific properties" 2019-02-12 16:44:57 +00:00
Nicolas Geoffray
98f5e86660 Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
This reverts commit a81dad1bc4.

Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Change-Id: Ie3c43830fc9a994ed35883abb8ca71d97bd5c44d
2019-02-12 14:00:38 +00:00
Dan Willemsen
5436c7e583 Obsolete add_lunch_combo
Bug: 77599627
Test: source build/envsetup.sh with add_lunch_combo calls in bash & zsh
Change-Id: If12b41d8f9a2f56efdb64ad0dccc25a1e342fdd1
2019-02-11 21:36:25 -08:00
Treehugger Robot
1b082c3e05 Merge "Detect shareduid between different partitions" 2019-02-12 00:55:08 +00:00
Colin Cross
87378f1888 Move dexpreopt image selection out of dexpreopt_gen
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
2019-02-11 15:25:07 -08:00
Steven Laver
9e73e82a12 Allow properties to be derived from partition-specific properties
This change allows ro.product.[brand|device|manufacturer|model|name] and
ro.build.fingerprint to be derived at boot time (and in the OTA
generation scripts) from partition-specific properties.

Test: booted system image, verified properties
Test: booted recovery image, verified properties
Test: unpacked OTA package, verified build fingerprint
Bug: 120123525
Change-Id: Iadd230a0577f35c7c37b0f911e91a5c2863ed1fe
2019-02-11 23:03:00 +00:00
Tom Cherry
e0f3ed5cd0 Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H
TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.

Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
2019-02-11 13:45:01 -08:00
Anton Hansson
dce3f920f2 Move dump-products back to the config stage
It's unnecessary to run all the make file parsing to dump product
configs. Move the dumping to product_config.mk instead, but switch
the output to $(warnings) as stdout is a bit sensitive during
the config stage.

Test: multiproduct_kati -only-config dump-products
Change-Id: I8c7365c9f90ea2bf152b82dfb983bfb0cdcb1697
2019-02-11 21:19:54 +00:00
Colin Cross
05ef66fc0b Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system."" 2019-02-11 19:31:31 +00:00
Colin Cross
a81dad1bc4 Revert "Never strip and store dex files uncompressed when they are preopted on system."
This reverts commit 9cdc3beb3d.

Reason for revert: b/123436620

Change-Id: I45fa9236e37c3b7e2d44ede62a2701db2bc8a20d
2019-02-11 19:30:39 +00:00
android-build-team Robot
d3ffeda728 Version bump to PQ2A.190401.001
Change-Id: I0cfe4c7c8cf78f747974f8ce4fd56061a26fb707
2019-02-11 17:10:13 +00:00
android-build-team Robot
b6c85ea972 Make change and version bump to PQ2A.190305.003
Change-Id: Ibd37aaf3af2604430effb59a690e44e888f4e8d4
2019-02-11 17:09:15 +00:00
Elisa Pascual Trevino
a9da159ce1 Update Security String to 2019-04-01
Bug: 124119313
(cherry picked from commit f9835d9f4d)

Change-Id: I1a808f7c7ebaa29fcfae46f9225d5f385e9877dd
2019-02-11 17:08:57 +00:00
Nicolas Geoffray
f07d63390c Merge "Never strip and store dex files uncompressed when they are preopted on system." 2019-02-11 10:31:12 +00:00
Jiyong Park
744fd5698f Drop /root when installing symbols
This change fixes a problem that if a module is installed to the root
partition, its symbol file appears at under symbols/root, which is an
non-existing path at runtime. Since the symbol paths should match with
the runtime path, drop /root when installing symbols.

Bug: 123985838
Test: m libc.mountpoint
libc.so is found under symbols/bionic/lib[64]

Change-Id: I38bd226c3ec758d69902f4f288c83f68170c4068
2019-02-11 16:16:18 +09:00
android-build-team Robot
641da2907b Make change and version bump to PPRL.190205.001
Change-Id: I66d528f1b45c68eac151c9c56b91c522e4674dab
2019-02-09 02:40:54 +00:00
Treehugger Robot
010df4b471 Merge "Make manifest and APK agree on uncompressed native libs" 2019-02-09 02:25:32 +00:00
Nicolas Geoffray
9cdc3beb3d Never strip and store dex files uncompressed when they are preopted on system.
In order for the runtime module to always be able to compile apps,
make sure we keep a copy of the dex files optimally.

Gated by a product flag if a product doesn't include the module yet.

Test: build
Change-Id: Ia9bba7f6f12f3400078a43d39ba4134cf8818399
2019-02-08 22:45:48 +00:00
Treehugger Robot
143ff1ff9a Merge "Only pick DTBs from BOARD_PREBUILT_DTBIMAGE_DIR" 2019-02-08 22:02:05 +00:00
Dan Willemsen
78e94a46c9 Default to erroring when eng/debug tags are used
Some devices opt out of the warning with `BUILD_BROKEN_ENG_DEBUG_TAGS :=
true` still, but the rest have no more warnings left.

Test: build_test in treehugger
Change-Id: I1534a0db006d72c7921a20ab793586ef1c7bdb21
Merged-In: I1534a0db006d72c7921a20ab793586ef1c7bdb21
2019-02-08 13:03:23 -08:00
Hridya Valsaraju
c63a74474b Only pick DTBs from BOARD_PREBUILT_DTBIMAGE_DIR
This change is required to prevent the build system
from picking up DTB files from subdirectories to
BOARD_PREBUILT_DTBIMAGE_DIR.

Test: make bootimage
Bug: 123648105

Change-Id: Ibc2a133f3c9be6362579dc9bf9ca399912b9d8a2
2019-02-08 09:36:44 -08:00
Jeongik Cha
ef26afdc27 Detect shareduid between different partitions
Find shareduid usage between the partitions(system, vendor, product).

Here is sample output

{
  "android.uid.system": {
    "product": [
      "Settings.apk"
    ],
    "system": [
      "framework-res.apk",
      "FusedLocation.apk",
      "Telecom.apk",
      "InputDevices.apk",
      "SettingsProvider.apk",
      "WallpaperBackup.apk",
      "KeyChain.apk"
    ]
  }
}

Bug: 123664116
Test: m -j out/target/product/$(get_build_var TARGET_DEVICE)/shareduid_violation_modules.txt
Change-Id: If2a75bf66b369cd3fad1744d08b6bfbfc624979c
2019-02-08 22:41:30 +09:00
Treehugger Robot
86c26860be Merge "Make the duplicate header copy warning more explicit" 2019-02-08 09:15:38 +00:00
Treehugger Robot
34121e8cc9 Merge "Remove unused dexpreopt UseEmbeddedDex" 2019-02-08 07:19:33 +00:00
Colin Cross
ead7b66590 Make manifest and APK agree on uncompressed native libs
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
2019-02-07 21:44:12 -08:00
Dan Willemsen
f4249d1052 Make the duplicate header copy warning more explicit
So that it's easier to understand which makefile is actually being used,
and which ones are being ignored.

Test: manually check the warnings on a device that sets BUILD_BROKEN_DUP_COPY_HEADERS
Change-Id: If9e29458eaa655b28e6b770d194d1da867cb8d16
2019-02-07 18:43:53 -08:00
Colin Cross
2b526bf7f3 Merge "Consolidate sdk version handling" 2019-02-08 02:30:16 +00:00
Colin Cross
33f245a209 Add DEXPREOPT_BOOTCLASSPATH_DEX_FILES to DEXPREOPT_GEN_DEPS
Anything that might be used by dexpreopt.sh needs to be listed
in DEXPREOPT_GEN_DEPS to make sure it is up to date if
dexpreopt.sh has never run before and generated its .d file.

Bug: 124062553
Test: lunch aosp_blueline-userdebug
      m out/target/product/blueline/obj/APPS/Gallery2_intermediates/dexpreopt.zip
      lunch aosp_sailfish-userdebug
      m out/target/product/sailfish/obj/APPS/Gallery2_intermediates/dexpreopt.zip
Change-Id: I2608f68d1a2157f9c95bd136eb82010aceed1c59
2019-02-07 22:29:55 +00:00
Colin Cross
fceb298ff7 Remove unused dexpreopt UseEmbeddedDex
dexpreopt doesn't need to know about UseEmbeddedDex, it has
already been taken into account for UncompressedDex.

Test: m checkbuild
Change-Id: I546bdaf604552792a2ac9b3557811da7418b37d1
2019-02-07 22:29:45 +00:00
Colin Cross
a56dede4d8 Merge "Remove extra $ in soong_app_prebuilt" 2019-02-07 21:18:32 +00:00
Colin Cross
a27f42aa5d Consolidate sdk version handling
Share the logic that converts LOCAL_SDK_VERSION, LOCAL_MIN_SDK_VERSION
and the global config values into minSdkVersion, targetSdkVersion,
and compileSdkVersion.

Test: m checkbuild
Change-Id: Id038673662b23cffc9e57978ac55a3f35ef8237a
2019-02-07 08:55:48 -08:00
Anton Hansson
95958eefa9 Change RRO default location to /product
This changes the default location of RRO packages that don't
specify where they should be installed to /product instead of
/vendor.

Also change the auto-generated "enforced RRO" packages to install
on /product, and be explicit about that in the mk to make it
independent of the RRO default.

The reasoning for this change is that most overlays tend to be
for product level customizations, like themes and so on. RROs
for hardware related things can still be explicitly installed
on /vendor.

Bug: 123566903
Test: preubmit
Test: various internal tests
Change-Id: Ie7d5f19dc7ab421a7bcf584153f991e18e961cda
2019-02-07 13:06:18 +00:00
Treehugger Robot
6d1ae7a015 Merge "Move hiddenapi singleton rules to Soong" 2019-02-07 07:27:33 +00:00
Jaewoong Jung
664b72abfe Merge "Make side change for prod override vars support." 2019-02-07 01:50:59 +00:00
Treehugger Robot
689e71c3b6 Merge "Don't enable CFI diagnostics in include paths." 2019-02-07 01:23:46 +00:00
Treehugger Robot
7520513222 Merge "Allow for a separate recovery DTBO to be used for non-A/B devices." 2019-02-06 20:07:22 +00:00
Ivan Lozano
55220942ed Don't enable CFI diagnostics in include paths.
Don't enable CFI diagnostics by default when applying it in include
paths. Part of a broader effort to remove diagnostics mode from CFI
across the board.

This should reduce performance overhead and also allows the minimal
runtime to work when other ubsan sanitizers are enabled. CFI stack
dumps should include a CFI related function, so it should be apparent
when a crash is CFI-related.

Bug: 117417735
Test: make -j
Change-Id: I3d6326e06d7aa7d9c00382f336301ecb822ae7ec
2019-02-06 11:09:05 -08:00
Steven Moreland
6eadb628a1 Merge "Remove '-b' from AIDL." 2019-02-06 18:09:31 +00:00
Luca Stefani
fb3e985a5f Remove extra $ in soong_app_prebuilt
Change-Id: Ia21d8f7fb3fd5f9e3b8e764d42ebbc61be4226f7
2019-02-06 17:54:21 +01:00
Colin Cross
485c9cd400 Move hiddenapi singleton rules to Soong
Hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
This effectively requires any module in PRODUCT_BOOT_JARS to be
defined in Soong.

Bug: 123645297
Test: m checkbuild
Change-Id: If72bd1c20b2014d0a3d400624d37fdb0a3052245
2019-02-05 21:38:55 -08:00
Steven Moreland
e0c38893ff Remove '-b' from AIDL.
An empty file will be emitted for parcel declarations. Now sources may
include parcel definitions.

Bug: 70046217
Test: manual
Change-Id: Ib4bfaf52101956a543738d50ea699f9232f5bb91
2019-02-06 04:58:06 +00:00
Dan Willemsen
9a3ef57d99 Merge "Remove support for building Windows modules in Make" 2019-02-05 20:45:27 +00:00
Hridya Valsaraju
a941899906 Allow for a separate recovery DTBO to be used for non-A/B devices.
This CL allows for a separate recovery DTBO to be used by
specifying it with the board config variable
BOARD_PREBUILT_RECOVERY_DTBOIMAGE.

Bug: 123889996
Test: make recoveryimage and make dist on a target that builds
recovery.img and unpack_bootimg.py to test that BOARD_PREBUILT_RECOVERY_DTBOIMAGE
gets used as the recovery DTBO.

Change-Id: I6f83f37c3c894b2acddab1000224cd433649faa1
2019-02-05 18:19:39 +00:00
Kostya Kortchinsky
adcb1498c5 Merge "Add option to disable Scudo globally [Make]" 2019-02-05 14:45:39 +00:00
Anton Hansson
7d1e353834 Merge "Merge product_services into product by default" 2019-02-05 09:12:15 +00:00
Dan Willemsen
f264690860 Remove support for building Windows modules in Make
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
2019-02-05 00:19:41 -08:00
Dan Willemsen
fcdc0cb737 Fix aux_config warning
Don't declare targets during config files, as they're loaded in other
contexts as well. In this case, `droidcore` was not defined when we were
handling CleanSpec.mk files, leading to:

build/make/core/aux_config.mk:185: warning: real file "droidcore" depends on PHONY target "auxiliary"

Bug: 123583617
Test: m nothing; check for warnings
Change-Id: I71b8819deb81442810c7dd5c681ddb38a1171cff
2019-02-04 20:52:14 -08:00
Stephen Hines
c6dee37255 Merge "Use llvm-{strip,objcopy} by default" 2019-02-05 03:13:14 +00:00
Kostya Kortchinsky
027324099f Add option to disable Scudo globally [Make]
This adds an option to turn off Scudo globally, and use it for Go.

Bug: 123228023
Test: verify that Scudo is disabled for a Go build, eg:
lunch marlin_svelte-eng && m -j, check that Scudo is not linked in
out/target/product/marlin/system/bin/mediaextractor
Test: verify that Scudo is enabled otherwise, eg:
lunch marlin-eng && m -j, check that Scudo is linked in
out/target/product/marlin/system/bin/mediaextractor

Change-Id: Idc82d581fade544a474e6f2ff0b54dd191ba0818
Merged-In: Idc82d581fade544a474e6f2ff0b54dd191ba0818
2019-02-04 12:35:04 -08:00
Treehugger Robot
76f2628654 Merge "dynamic partitions: round partitions to BOARD_SUPER_PARTITION_ALIGNMENT" 2019-02-02 01:39:37 +00:00
Anton Hansson
80c80804f0 Merge product_services into product by default
Noone is intended to use product_services for now, so make
product_services modules merge in product by default.

Bug: 113098451
Test: boot blueline
Test: boot walleye
Change-Id: Id13487e40afe4ae581fac027c8c075798c26c7e8
2019-02-01 15:04:44 +00:00
Treehugger Robot
61ae763ec4 Merge "Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" 2019-01-31 19:25:59 +00:00
Yifan Hong
5cc9230914 Merge "Add kernel info to compatibility.zip" 2019-01-31 19:06:19 +00:00
Colin Cross
ca8ec381a0 Merge "Fix linker_asan[64] apex bootstrap build error" 2019-01-31 19:05:59 +00:00
Dan Willemsen
a734907705 Merge "Deprecate LOCAL_MODULE_TAGS := eng/debug" 2019-01-31 18:32:16 +00:00
Logan Chien
c6d2cf86d1 Fix linker_asan[64] apex bootstrap build error
This commit fixes `linker_asan[64]` apex bootstrap build errors.
Without this change, `make -j SANITIZE_TARGET=address` results in:

  FAILED: ninja: 'out/target/product/walleye/system/bin/linker_asan64',
  needed by 'out/target/product/walleye/system/bin/app_process64',
  missing and no known rule to make it

Test: lunch aosp_walleye-userdebug && make SANITIZE_TARGET=address
Change-Id: I980a36499cd327db307321fc8e4548925e7d56bf
2019-01-31 17:07:50 +08:00
Logan Chien
6549cd0255 Check ELF files in both paths
This commit moves prebuilt ELF file checks out of the ifeq statement so
that both modules with and without LOCAL_STRIP_MODULE can be checked.

Bug: 123670683
Test: Add `LOCAL_STRIP_MODULE := keep_symbols` to some modules and check
      whether `check_elf_files.timestamp` is generated.
Change-Id: I2f2a7df501910d31621da025ce34101f0d358dc2
2019-01-31 14:28:11 +08:00
Logan Chien
3291184ab6 Add system shared libs to a prebuilt_internal.mk path
This commit adds LOCAL_SYSTEM_SHARED_LIBRARIES to a
`prebuilt_internal.mk` path.

Before this commit, LOCAL_SYSTEM_SHARED_LIBRARIES is only supported when
LOCAL_STRIP_MODULE is specified. If LOCAL_STRIP_MODULE is not specified,
default system shared libs (libc, libdl, and libm) are not added
implicitly. This commit makes both paths have the same behavior.

See also. https://android-review.googlesource.com/814993

Bug: 119086738
Test: CHECK_ELF_FILES=true make -j check-elf-files
Change-Id: I84ff9f6157ad6e5ee26234133fb7148a3e2b9551
2019-01-31 14:18:03 +08:00
Treehugger Robot
aa615a1b2d Merge "DAP: building system_other.img for retrofit devices" 2019-01-30 22:52:35 +00:00
Jaewoong Jung
7dfae5023a Make side change for prod override vars support.
For the new override vars, we don't support make-based overrides because
their primary purpose is to enable Soong migrations for the ones that
use inherit-package.

Bug: 122957760
Test: Manual build tests with Browser2, BrowserGoogle, and Chrome
Change-Id: Ia685511391f61fe143774e12b3b67b526049962a
2019-01-30 14:48:50 -08:00
Anton Hansson
bb83cc2689 Merge "Fix RRO when LOCAL_EXPORT_PACKAGE_RESOURCES is unset" 2019-01-30 22:19:25 +00:00
Anton Hansson
9a50c1f438 Merge "Exempt some RROs from building against SDK" 2019-01-30 22:17:25 +00:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.

Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
      Android P (kernel version 4.9.96)
      to ToT build:
      device kernel version = (manually modified) framework requirement = latest,
      PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true

Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
2019-01-30 13:28:03 -08:00
Treehugger Robot
badde7ced7 Merge changes I0bee792d,I2b7c3c8f
* changes:
  Build aar files for m <module name>
  Add LOCAL_ADDITIONAL_CHECKED_MODULE
2019-01-30 18:26:24 +00:00
Treehugger Robot
ea976a2780 Merge "Reland "Add $(PRODUCT_OUT)/apex to the artifact path whitelist"" 2019-01-30 16:57:11 +00:00
Colin Cross
89d3d2ae3b Fix RRO when LOCAL_EXPORT_PACKAGE_RESOURCES is unset
If LOCAL_EXPORT_PACKAGE_RESOURCES is unset then
append_enforce_rro_sources was inserting a blank entry into
the 4th.  When converting the || separator back to space that
resulted in a two sequential spaces, which is treated as a
single word separator, causing the 5th field to be treated
as the 4th field.

Put "false" into the 4th field in soong_app_prebuilt.mk to match
package_internal.mk.

Bug: 123510624
Test: m SystemUIGoogle
Change-Id: I794c413e33df2020d0dc43379cfb017e7e09baa1
2019-01-30 16:09:41 +00:00
Bowgo Tsai
cca76ddc1b Adding per-partition SPL into AVB prop descriptors
Bug: 119549677
Test: build and avbtool info_image
Change-Id: I0726d740c532ffd70beb09f98e088abcdfa110ef
2019-01-30 21:54:54 +08:00
Yi Kong
9e86573fd1 Use llvm-{strip,objcopy} by default
... except for Darwin Mach-O, as it is not supported by llvm-strip.

Test: m checkbuild
Bug: 119221035
Change-Id: I492853486e49dd0e82abe60cbf354d79b760b9a7
2019-01-30 13:40:44 +00:00
Treehugger Robot
423be675eb Merge "Rename preferCodeIntegrity to useEmbeddedDex" 2019-01-30 05:07:22 +00:00
Treehugger Robot
246e728614 Merge "Use DEXPREOPT_BOOTCLASSPATH_DEX_FILES to build boot_profile_jars.zip" 2019-01-30 04:26:04 +00:00
Jiyong Park
1ba4c7f11e Reland "Add $(PRODUCT_OUT)/apex to the artifact path whitelist"
This reverts commit 4cf7cde9aa.

Bug: 120846816
Test: build/soong/build_test.bash -dist -products mainline_system_arm64
Test: lunch aosp_cf_x86_pasan-userdebug; m && SANITIZE_TARGET=address m

Change-Id: I6fbf23dcef450da17fafafa78def3816792d83c8
2019-01-30 12:32:49 +09:00
Shalini Salomi Bodapati
0b33968b31 Add x86 AVX2 and AVX512 supported architectures
Bug: 123376719
Test: m checkbuild
Change-Id: I74c7a63bbaba993eeb8bdd8c663ffa142c908279
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
(cherry picked from commit f327f5f3f5d03471d69e757fe33899a7fd653f18)
2019-01-30 02:34:05 +00:00
Bowgo Tsai
867ab6606e DAP: building system_other.img for retrofit devices
For dynamic partitions in retrofit devices, system partition will be
a logical partition but system_other is not. However, current
build system use the same settings (logical) for both system.img and
system_other.img, leading AVB unable to locate the footer from the end
of system_other partition.

This commit support building system_other.img with correct partition size
while building system.img as a dynamic image.

Bug: 123506156
Test: check there is "system_other_size=2952790016" in file
      $OUT/obj/PACKAGING/system_other_intermediates/system_other_image_info.txt
Test: build system_other.img, then
      `simg2img $OUT/system_other.img system_other.img.raw`, checks the
      raw image size.

Change-Id: I748320a7770c694d06f06f4a35bfceb622849aa8
2019-01-30 09:58:07 +08:00
Calin Juravle
9e1fb1b3bd Use DEXPREOPT_BOOTCLASSPATH_DEX_FILES to build boot_profile_jars.zip
The core libraries are no longer put in /system/framework. Replace the
system path with the dexpreopt input path.

Test: launch taimen_nopreload-userdebug; m
Bug: 123313750
Change-Id: I6232c36d39fb818a302cb4b6cb61e91b44b28da1
2019-01-29 16:43:21 -08:00
Colin Cross
cd6622e832 Build soong odex files for mma
Add the LOCAL_SOONG_BUILD_INSTALLED files as dependencies of
$(my_all_targets) instead of $(my_register_name) so they are built
for mma and mmma as well as m <module name>.

Fixes: 123262430
Test: mmma packages/apps/Gallery2
Change-Id: I0d55beccf9385144c190ea4bf099fb267ac6db1c
2019-01-30 00:35:34 +00:00
Colin Cross
bd2287b846 Build aar files for m <module name>
Test: m SystemUI-core
Change-Id: I0bee792d1af80abb3e74c278db488bd668bd1fb4
2019-01-29 15:12:17 -08:00
Colin Cross
0162cc8bea Add LOCAL_ADDITIONAL_CHECKED_MODULE
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
2019-01-29 15:04:39 -08:00
Mark Salyzyn
1d8d3bef47 dynamic partitions: round partitions to BOARD_SUPER_PARTITION_ALIGNMENT
For the worst minimum_io_size for the BOM for the flash device on
the products, set BOARD_SUPER_PARTITION_ALIGNMENT so that we can
in advance get a summary from the build that the update may fail.

Test: build
Bug: 122328872
Change-Id: I95515e58e5308b7a1e637fc8c8791c0fc61e81f2
2019-01-29 14:50:10 -08:00
Victor Hsieh
06769c7efb Rename preferCodeIntegrity to useEmbeddedDex
Test: build and run testing apps
Bug: 112037137
Change-Id: Ie8cd8e141df097095310ecc57b6460308210dea5
2019-01-29 13:03:22 -08:00
Tom Cherry
c683233b64 Merge "Remove ro.expect.recovery_id" 2019-01-29 17:07:51 +00:00
Anton Hansson
038177ba55 Exempt some RROs from building against SDK
If an RRO is depending on the source module to import its resources,
this trips up the link check because the source module may not be
building against the SDK. Exempt these RROs from the rule.

Bug: 123510624
Test: m
Change-Id: Ie0e05ce6d31dd3a0eafb14ace426da2bc15fb740
2019-01-29 15:21:25 +00:00
Anton Hansson
02d7d48d4a Merge "Allow merging product_services into /product" 2019-01-29 09:28:40 +00:00
Yifan Hong
ab1ec4dbe3 Enforce no unused HALs when product matrix exists.
Also, remove old TODO message because it cannot be fixed.

Bug: 120600021
Test: builds
Test: remove entry from product matrix, build fails.

Change-Id: I9a6e954a1003aa4ad1bbca184ad7041ffad6b99b
2019-01-28 15:09:54 -08:00
Anton Hansson
d26e4eeec8 Allow merging product_services into /product
Allow devices to specify TARGET_COPY_OUT_PRODUCT_SERVICES := product,
which in effect treats all product_services modules the same as product
modules.

Do not generate license and build props for product_services when
this settings is enabled.

Bug: 113098451
Test: boot downstream product
Change-Id: Id51230b969900bebcf19d0138dfd6187dfce25b1
2019-01-28 21:24:59 +00:00
Tom Cherry
56ff89a90a Remove ro.expect.recovery_id
This is not used by anyone and the other half of the code to compare
against it is already functionally dead, so remove this.

Test: build
Change-Id: I44ed087cb7735bbc23e30b6c310c80eb3b7b6488
2019-01-28 10:56:37 -08:00
Anton Hansson
096b88bf90 Merge "Auto-include device_manifest.xml when necessary" 2019-01-28 09:18:34 +00:00
Colin Cross
8a508cbc0b Merge "Remove obsolete proguard flags" 2019-01-26 02:30:55 +00:00
Treehugger Robot
c51c523b88 Merge "When using inherit-package for a test, also allow specifying a new test suite." 2019-01-26 00:57:14 +00:00
Colin Cross
2ac9c6219a Remove obsolete proguard flags
R8 now warns:
Warning in ./build/make/core/proguard_basic_keeps.flags:
  Ignoring option: -optimizations

Remove the flags, they are not used by R8.

Fixes: 123401079
Test: m checkbuild
Change-Id: I8b0c558be8bcf943652dddb71802ddc145ae42c1
2019-01-25 21:30:13 +00:00
Nicolas Geoffray
1174b010f6 Merge "Revert "Revert "Differentiate between runtime apex jars and framework jars.""" 2019-01-25 19:02:13 +00:00
Treehugger Robot
18977ff3a9 Merge "Fix typo of PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE" 2019-01-25 18:19:11 +00:00
Adrian Roos
21028b7ad6 Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
Fixes: 122957987
Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true make droid
Change-Id: Iafef8cc69971fd10718882326fbba99a6223d0f8
2019-01-25 17:35:25 +01:00
Anton Hansson
d5e069e405 Auto-include device_manifest.xml when necessary
It doesn't make sense to specify a DEVICE_MANIFEST_FILE but the
build not including it. The conditional definition of the module
makes it problematic to have it listed in the PRODUCT_PACKAGES
of a generic mk.

Test: build mainline_arm64 + mainline_system_arm64
Change-Id: I40e435ce114263ceabbd373d3d719318c592fc13
2019-01-25 13:50:47 +00:00
Anton Hansson
9bab4c2622 Fix typo of PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE
Test: treehugger
Change-Id: I087d865c12d9aff7bdc0018256c1a87657d8550c
2019-01-25 10:15:22 +00:00
Nicolas Geoffray
14c052ec9b Revert "Revert "Differentiate between runtime apex jars and framework jars.""
This reverts commit 12746221c2.

Reason for revert: Sailfish size issues resolved.

Change-Id: I59e3ebf67d89f25d84d65cbfbe2a69ba1d8c30a3
2019-01-25 09:40:21 +00:00
Dan Willemsen
1fdf5d789b Merge "Bump the remaining 32-bit arm configs to require neon" 2019-01-25 03:52:17 +00:00
Dan Albert
fc67ea8dd3 Merge "Revert "Differentiate between runtime apex jars and framework jars."" 2019-01-24 23:16:20 +00:00
Nicolas Geoffray
12746221c2 Revert "Differentiate between runtime apex jars and framework jars."
This reverts commit 6bcc93983b.

Reason for revert: Sailfish running out of space.

Change-Id: I2a82aa27bb4388a3cdb94f9271c712644064bfad
2019-01-24 20:37:37 +00:00
Treehugger Robot
8faac3669e Merge "Add security patch level to hashtree footer of system" 2019-01-24 19:28:29 +00:00
Paul Duffin
22efcc114e Merge "Remove REMOVE_OAHL_FROM_BCP flag" 2019-01-24 16:01:40 +00:00
Nicolas Geoffray
6bcc93983b Differentiate between runtime apex jars and framework jars.
And use the apex paths of runtime apex jars.

Test: m
Change-Id: I7bd6e6029c2d5d596d672545271b5ed9819090b6
2019-01-24 13:10:22 +00:00
Calin Juravle
ba3e26d5da Merge "Replace PRODUCT_BOOT_JARS with DEXPREOPT_BOOT_JARS_MODULES for nopreloads" 2019-01-24 07:56:37 +00:00
Treehugger Robot
b045705971 Merge "Build System: Add java lib header files to module dependency list im module-info.mk" 2019-01-24 06:50:33 +00:00
Nicolas Geoffray
3d54ce08fe Merge "Pass the right dex files to dex preopt." 2019-01-24 06:37:40 +00:00
Dan Willemsen
53d62fed72 Bump the remaining 32-bit arm configs to require neon
Stop using armv7-a without neon for 32-bit unbundled apps, and update
generic_x86_arm to match the cuttlefish configuration that includes
neon.

Test: treehugger
Change-Id: Ieb6a2106655803a8ca609907c12168e628ee1b85
2019-01-23 22:27:33 -08:00
Treehugger Robot
d2da2ce398 Merge "Sign system_other.img with AVB" 2019-01-24 05:31:37 +00:00
Calin Juravle
b741d1cfa9 Replace PRODUCT_BOOT_JARS with DEXPREOPT_BOOT_JARS_MODULES for nopreloads
boot_profile_jars.zip is used to process the boot image profile (by
filtering out data that does not belong to the boot classpath).
We only need the jars that are actually preloaded, and not the ones which
are updatable.

Test: launch taimen_nopreload-userdebug; m
Bug: 123313750
Change-Id: I630f78dda3d9b38aac04b0f364b25fbcda4e26a3
2019-01-23 18:06:50 -08:00
bralee
090336232e Build System: Add java lib header files to module dependency list im module-info.mk
To solve AIDEGen issue: DocumentsUI have no dependency libcore.

Bug: 122557164
Test: 1. m  `build/soong/soong_ui.bash --dumpvar-mode PRODUCT_OUT`/module-info.json
      2. open $ANDROID_PRODUCT_OUT/module-info.json
         "out/target/common/obj/JAVA_LIBRARIES/core-lambda-stubs_intermediates/classes-header.jar",
         "out/target/common/obj/JAVA_LIBRARIES/core.platform.api.stubs_intermediates/classes-header.jar",
	 "out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-header.jar",
	 "out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-header.jar"
	 will be added to DocumentsUI's dependencies.

Change-Id: I6b20c315f3367ff2a016d305ec6fe2a8de620a14
2019-01-24 09:27:48 +08:00
Joe Onorato
62472b676a When using inherit-package for a test, also allow specifying a new test suite.
Test: make
Change-Id: I2c9b5d998e6cc3159e4d23d7547bfd0b865f714c
2019-01-23 14:50:07 -08:00
Treehugger Robot
2463c3ab2a Merge "Support including DTB image" 2019-01-23 20:56:55 +00:00
Hridya Valsaraju
9683b2f136 Support including DTB image
Bug: 111136242
Test: When BOARD_PREBUILT_DTB_DIR is set correctly,
generated $OUT/boot.img contains the DTB image.

Change-Id: I282e31b04cc60383377b9e9b54f8fe64a8140242
2019-01-23 09:14:55 -08:00
Nicolas Geoffray
f084e7847e Pass the right dex files to dex preopt.
We currently pass the boot dex files installed on /system, but these
may be eg stripped. That's currently OK as dex2oat is looking
at the dex files in boot.oat, but dex2oat could look at them for
various reasons.

Test: m
Change-Id: I85915c979cf94ec29751b10a0d8a5957b6cea956
2019-01-23 16:07:02 +00:00
Bowgo Tsai
1e04bf7260 Sign system_other.img with AVB
Support signing system_other.img but shouldn't include it into the
top-level vbmeta.img. system_other verifiation will not be included
in /vbmeta chains and will be done separately.

Bug: 112103720
Test: avbtool info_image --image $OUT/system_other.img
Test: avbtool info_image --image $OUT/vbmeta.img, checks 'system_other' is NOT included.
Test: Checks $OUT/obj/PACKAGING/system_other_intermediates/system_other_image_info.txt
      See the following:
        avb_system_other_hashtree_enable=true
        avb_system_other_add_hashtree_footer_args=--rollback_index 1551744000
        avb_system_other_key_path=external/avb/test/data/testkey_rsa4096.pem
        avb_system_other_algorithm=SHA256_RSA4096

Change-Id: Ia152aaab1387dcf556a42222adb39ea76881263a
2019-01-23 15:17:41 +00:00
Logan Chien
9779c57cd0 Merge "Add $(SOONG_OUT_DIR)/ndk/% to artifact whitelist" 2019-01-23 07:22:43 +00:00
Logan Chien
f42823aa7c Merge "Add prebuilt ELF binaries checker" 2019-01-23 07:21:17 +00:00
Dan Willemsen
9569ddd478 Deprecate LOCAL_MODULE_TAGS := eng/debug
Uses a new BUILD_BROKEN_ENG_DEBUG_TAGS variable that defaults to true
until we mark all of the broken targets, then we'll switch it to false.

These are fairly trivial to fix, so I don't expect to keep this flag
around for long.

Test: build_test on aosp and internal master; check logs
Change-Id: I6176fec265e78aecff965b7cf1636f831f68a140
2019-01-22 20:08:12 -08:00
Nicolas Geoffray
e5b368bfe6 Use the jars, not the classes.dex for passing to hiddenapi.
The instructions to look up for classes.dex don't work when looking
at different jar versions (aligned, unaligned, etc).

Test: m
Change-Id: I5f178ca0d00497edbab892722a5ee84f0c47d0a0
2019-01-22 14:28:12 +00:00
Paul Duffin
fd24c9fe1f Remove REMOVE_OAHL_FROM_BCP flag
The REMOVE_OAHL_FROM_BCP flag is always set to true and is no longer
necessary so this change removes any uses of the flag.

Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: Ied8c3315b29094ad6acee539520af3e4c9e79839
2019-01-22 14:16:12 +00:00
Hsin-Yi Chen
41319b3abc Add security patch level to hashtree footer of system
Test: avbtool info_image --image system.img
Bug: 122705329
Change-Id: I7b325a9a9aba2d98cb94c5fb8488b92f54e45dab
2019-01-22 17:11:15 +08:00
Colin Cross
b405fe3765 Don't depend on classes-header.jar when turbine is disabled
TARGET_BUILD_APPS sets TURBINE_ENABLED := false, which triggers
an issue where a dependency is added on classes-header.jar but
there is no rule to create it.  Skip creating the dependency
when TURBINE_ENABLED is false for now.

Bug: 123183568
Test: m TARGET_PRODUCT=mainline_modules_arm UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=com.android.media
Change-Id: I8ec3e244b8f9618c58f4ac57329a5a07f01dc797
2019-01-21 10:59:42 -08:00
Logan Chien
86eeedbcc7 Add $(SOONG_OUT_DIR)/ndk/% to artifact whitelist
This commit adds `$(SOONG_OUT_DIR)/ndk/%` to artifact whitelist so that
when NDK stub libraries won't be blocked by artifact path requirements.

This commit does not break the integrity of artifact path requirements
because they are not installed to devices.

Bug: 123053270
Bug: 119084334
Test: lunch aosp_crosshatch-userdebug
Change-Id: Ieea76a8126269f53b0a58bd069b449a9f9b1263a
2019-01-21 14:34:19 +00:00
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
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
2019-01-21 21:35:01 +08:00
David Brazdil
96e973b304 hiddenapi: Process core.platform.api.stubs
Pass @CorePlatformApi stubs to the `hiddenapi` singleton rule which
generate a CSV of all public or domain API flags.

Bug: 119068555
Test: m appcompat
Test: dexlayout <core-oj jar> | grep CORE-PLATFORM-API
Change-Id: I597ee330835e564d61cfac44497e762b552b901c
2019-01-19 15:57:35 +00:00
David Brazdil
fc274bab4d Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: If56c7ab8a4c3bbd33e447ef0dfd33f2c303a937c
2019-01-19 15:57:35 +00:00
Treehugger Robot
082fd2c5bc Merge "Move UPDATABLE_BOOT_(MODULES|JARS) to base_system.mk for further extension" 2019-01-19 04:37:13 +00:00
Colin Cross
3087d93cc6 Merge "Build docs zips with make docs" 2019-01-19 04:09:20 +00:00
Treehugger Robot
6bd6318880 Merge "Define non-system module as variable" 2019-01-19 01:48:39 +00:00
Evgenii Stepanov
ffaf4815fc Merge "Limit 2 uses of SANITIZE_TARGET to ASan." 2019-01-19 01:32:51 +00:00
Dongwon Kang
167758a153 Move UPDATABLE_BOOT_(MODULES|JARS) to base_system.mk for further extension
Test: build & boot
Bug: 112766913

Change-Id: I5af02d44c4b4163acdc4e3078dcebd84556ee049
2019-01-18 17:06:18 -08:00
Treehugger Robot
215e2c828c Merge changes I685ab841,I6ab7e488
* changes:
  Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
  Always package ext filesystem tools
2019-01-19 00:18:02 +00:00
Colin Cross
103d6e8856 Build docs zips with make docs
The docs zips were being built for make docs dist but not for
make docs.  Add them to ALL_DOCS and to the $(LOCAL_MODULE)
phony rule.

Bug: 123068677
Test: m docs
Test: m ds-docs
Change-Id: I32634c05e392f7a5483c81d59de35ca9bc4d4ad0
2019-01-18 16:08:14 -08:00
Treehugger Robot
5f93c3a929 Merge "Add PROGUARD_HOME and PROGUARD_DEPS" 2019-01-18 22:18:50 +00:00
Treehugger Robot
12e7e928a2 Merge "Move HIDDENAPI_FLAGS dependencies to frameworks/base" 2019-01-18 22:13:53 +00:00
Evgenii Stepanov
60beecc90c Limit 2 uses of SANITIZE_TARGET to ASan.
These two places are checking for ifdef(SANITIZE_TARGET) but what
they are really looking for is the second stage of ASan build.

Fix the checks so that they do not apply to HWASan.

I have not seen any change in behavior, but there are some new files
under /system in hwasan build that were not there before, and things
keep working in general, so this feels like the right move.

Bug: 112438058
Test: none; SANITIZE_TARGET=hwaddress keeps working
Change-Id: I4544f408263b908be6ef4a47dd2b5c937e0c1f33
2019-01-18 14:06:11 -08:00
Dan Willemsen
674952098b Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
These centralize the decisions on whether to build certain images or
not, and allow the product definition to override that choice.

There are a few use cases here:

 * For GSI-like cases, we only want to build the system image. This
   didn't really change, but it's somewhat simpler to configure, and
   easier to understand the build logic.

 * On the opposite side, when you're planning on using a GSI, the device
   specific build can only build the vendor images (or some other set).

 * Some cases (Fuchsia, etc) don't want to build any images, as they'll
   be distributing the build artifacts in their own packaging.

I suspect in the future, TARGET_BUILD_APPS may be able to be refactored
into the third use case.

Test: treehugger
Test: Create a product definition that includes nothing, try to build it.
Test: compare build-aosp_crosshatch.ninja and build-crosshatch.ninja before/after
Change-Id: I685ab841be3718d3dd7052c28ccd764bb6f1991a
2019-01-18 13:11:34 -08:00
Dan Willemsen
df0808331d Always package ext filesystem tools
Every target we have needs these now.

Test: treehugger; codesearch
Change-Id: I6ab7e48887b19f956b2a7aeac78169f0e2035c73
2019-01-18 10:44:34 -08:00
David Brazdil
38f19aac1f Move HIDDENAPI_FLAGS dependencies to frameworks/base
Recent move of hiddenapi rules to soong sets the dependencies of
the hiddenapi_flags.csv rule in dex_preopt.mk but doesn't check
for existence of "frameworks/base" as the hiddenapi-generate-csv
rule in frameworks/base. Solve this by removing the dependency
injection and using the SOONG_HIDDENAPI_FLAGS variable directly
in frameworks/base.

This is necessary because go/art-build creates a fake
hiddenapi_flags.csv and if there is a dependency injection rule,
a phony target is created and all dependencies of flags.csv need
to be satisfied.

Test: master-art compiles
Change-Id: I13ef5e7ec167f9372a5629fe1894c7acd4091d29
2019-01-18 15:11:01 +00:00
Jeongik Cha
83c50324ca Define non-system module as variable
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
2019-01-18 18:24:30 +09:00
Dan Willemsen
4a9a24481d Add PROGUARD_HOME and PROGUARD_DEPS
So that we can pass this into MAINDEXCLASSES.

Fixes: 122988865
Test: OUT_DIR=$HOME/out mmma frameworks/base/core/tests/hosttests/test-apps
Change-Id: I955d3de46d348e3573a6773f69149e7cabab8904
2019-01-17 23:04:27 -08:00