Commit graph

18462 commits

Author SHA1 Message Date
Colin Cross
e6210f6eb2 Remove AAPT1 support
AAPT2 is used everywhere now, remove support for AAPT1.  Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).

Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
2019-04-17 16:50:30 -07:00
Tom Cherry
c9bb097bee Merge "Remove TARGET_ROOT_OUT_SBIN / TARGET_ROOT_OUT_SBIN_UNSTRIPPED" 2019-04-17 23:26:13 +00:00
Dan Willemsen
bed1918841 Mark BUILD_* as readonly
Test: treehugger (build_test)
Change-Id: I2fddd43ebeaffd48246ab2fa289a19131094a1ac
2019-04-17 12:35:41 -07:00
Treehugger Robot
843f666adf Merge "Exclude lib/arm(64) from the library absence check." 2019-04-17 18:16:35 +00:00
Tom Cherry
6b28af30fb Remove TARGET_ROOT_OUT_SBIN / TARGET_ROOT_OUT_SBIN_UNSTRIPPED
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: Ia82d892adfffb6fa325d0c570ae7999e7bb28dc2
2019-04-17 11:12:32 -07:00
Bill Peckham
953ec4cd70 Merge "Optimize build for PRODUCT_BUILD_SYSTEM_IMAGE := false case." 2019-04-17 17:11:10 +00:00
Treehugger Robot
bbfcef3fb7 Merge "Always use aapt2 for prebuilt appcompat" 2019-04-17 01:20:13 +00:00
Bill Peckham
d52fd9b016 Optimize build for PRODUCT_BUILD_SYSTEM_IMAGE := false case.
When PRODUCT_BUILD_SYSTEM_IMAGE is false, avoid building artifacts and
intermediates that will not be used. This speeds up the build for these cases.

Bug: 123427297
Test: No change when building system image, smaller build when not
Change-Id: I438e4794af5376c897ffcc1d795a1e114dccd351
2019-04-16 16:42:26 -07:00
Colin Cross
727ef10366 Merge "Add default proguard flags from guava" 2019-04-16 23:14:12 +00:00
Colin Cross
a0d89b994f Always use aapt2 for prebuilt appcompat
Running appcompat is missing a dependency on aapt/aapt2.  There
is no need to switch between aapt and aapt2, so always use aapt2
and add the missing dependency.

Fixes: 130575935
Test: treehugger
Change-Id: If32c03410fbdb3945bf20f7405de13dc8cd83038
2019-04-16 22:40:25 +00:00
Martin Stjernholm
5c5d59ba8f Exclude lib/arm(64) from the library absence check.
Test: m systemimage on cf_x86_phone-userdebug (in internal and AOSP).
Test: Check that the generated find command works on MacOS
Bug: 124293228
Change-Id: I5dfb534aa2bc24a8d0a75fde31b139a6ed86e6a5
2019-04-16 16:21:31 +01:00
Cyan Hsieh
4d5f5ff943 Revert "Add the entire boot image to boot.zip"
This reverts commit c0ed5e7c56.

Reason for revert: this patch cause build breakage on aosp-master-throttled (aosp_qemu_trusty-userdebug)

Bug: 130376456
Change-Id: Iab03d21219674691bd8bf6b2e5004508ebb862b9
2019-04-16 09:10:11 +00:00
Colin Cross
e75840fe4d Add default proguard flags from guava
Guava 27.1 causes some warnings in R8, silence them.

Bug: 130306229
Test: m checkbuild
Change-Id: Ia9948d597538a16c5b7ab26a2e41eebde52e7427
Merged-In: Ia9948d597538a16c5b7ab26a2e41eebde52e7427
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit b4917146aa)
2019-04-15 21:44:50 -07:00
Calin Juravle
c0ed5e7c56 Add the entire boot image to boot.zip
Add all the boot image files necessary of offline inspection and
compilation in a single zip file (boot.zip).

This replaces the previous boot_profiles_jars.zip which contained only the
jar files.

Bug: 130376456
Test: m dist
Change-Id: I7e711369e7d56630c168c01df60a8c2672d60927
2019-04-16 01:07:52 +00:00
David Brazdil
f5b3fc854f Enable core platform API warnings on non-user builds
Core platform API violation reporting is disabled by default and can be
enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy
property. Set it to "just-warn" for non-user builds and leave disabled
on user builds.

Test: builds, boots
Bug: 125701194
Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a
2019-04-15 16:12:59 +01:00
Treehugger Robot
74a2572b99 Merge "Convert oemaids_headers / passwd / group to Soong" 2019-04-11 23:36:09 +00:00
Tao Bao
f1a8e74991 Merge "Allow building generic OTA packages." 2019-04-11 15:51:46 +00:00
Dan Willemsen
d32e6d1314 Convert oemaids_headers / passwd / group to Soong
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers passwd group
Change-Id: Ie3b92a499b44391e0692da5d9ad067089a62aabb
2019-04-10 20:46:33 -07:00
Tao Bao
9be20c7650 Allow building generic OTA packages.
We already have targets that build generic system images, which can be
applied (flashed) onto matching devices to replace their target-specific
system images. This CL adds PRODUCT_BUILD_GENERIC_OTA_PACKAGE that
allows building generic OTA packages to be installed over-the-air.

Since A/B and non-A/B OTAs have different package formats, currently the
support is limited to targets that use A/B OTAs. Note that this CL only
allows _building_ the package - will need additional changes for the
actual package install as well as targeting matching devices.

Bug: 122851610
Test: `m otapackage` on a target that sets
      `PRODUCT_BUILD_GENERIC_OTA_PACKAGE := true`.
Test: TreeHugger
Change-Id: If6fd2da15d24c5aaee09618efe94514c6d83292d
2019-04-10 14:29:50 -07:00
Dan Willemsen
8e96a794ac Split ALL_MODULES.*.REQUIRED and friends between target/host
So that we actually respect different LOCAL_REQUIRED_MODULES for the
host and device versions instead of unioning them. That got particularly
problematic when LOCAL_SHARED_LIBRARIES is implicitly added to
LOCAL_REQUIRED_MODULES. We also used to walk through device-only modules
when filling out the list of required modules, which triggered even more
extra installations.

This also changes the requirements for PRODUCT_HOST_PACKAGES so that it
no longer accepts target-only phony modules (since we can now
differentiate them). They were all removed in previous patches.

Test: treehugger; diff resulting builds
Test: diff list of product_target_FILES and product_host_FILES
Change-Id: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
2019-04-10 13:22:23 -07:00
Treehugger Robot
d72873dc41 Merge "Reland "Only assert-max-image-size for static partitions."" 2019-04-10 20:09:00 +00:00
Treehugger Robot
e3ef041244 Merge "Stop using build/target -> build/make/target symlink" 2019-04-10 19:17:25 +00:00
Treehugger Robot
7b136fae8c Merge "Q Branch prefix is QP1A" 2019-04-10 14:18:02 +00:00
Anton Hansson
983c756920 Merge "Move board-info props to vendor/build.prop" 2019-04-10 10:41:03 +00:00
Anton Hansson
c65ebaf611 Move board-info props to vendor/build.prop
This change moves the ro.build.require.* props extracted from
TARGET_BOARD_INFO_FILE to vendor/build.prop as opposed to
system/build.prop. These typically contain what bootloader and
baseband the build requires, which are very device-specific.

Bug: 130025216
Test: make, inspect props
Test: flash blueline
Change-Id: I48642485bdc853884d465d1fe00f2ceae69a4736
Merged-In: I48642485bdc853884d465d1fe00f2ceae69a4736
2019-04-10 10:40:47 +00:00
Dan Willemsen
0ab1be6fe2 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: Idf89b2e6a0b777adbfb6370ea34f35faee6d4965
2019-04-09 21:35:37 -07:00
Ian Pedowitz
0604ae4881 Q Branch prefix is QP1A
Bug: 128934651
Bug: 129683166
Bug: 129943426
Test: source build/envsetup.sh && lunch aosp_blueline-userdebug
Test: m -j cts docs tests
Change-Id: I34c360a68c6721e8fef9e39be30c8af7bca90c39
Merged-In: I34c360a68c6721e8fef9e39be30c8af7bca90c39
2019-04-09 13:00:09 -07:00
Yifan Hong
8c3dce0c56 Reland "Only assert-max-image-size for static partitions."
This reverts commit 6e099095d1.

Reason for revert: reland the CL

Bug: 122377935
Test: build blueline_mainline

Change-Id: Iee594b64e687decff186c0fa60f82b88608febe9
2019-04-09 10:56:34 -07:00
Dan Willemsen
0586c65780 Add BUILD_BROKEN_USES_NETWORK
Some people apparently still talk to the network during their build.
Allow this temporarily with a BUILD_BROKEN_USES_NETWORK check.

Bug: 129992021
Test: attempt to talk to the network during the build with and without
      this flag
Change-Id: I45612ad6165f92f123847b4057338c0dfc3424ee
2019-04-09 09:59:31 -07:00
Anton Hansson
6b329bc60d Merge "Move bootimage props to vendor/build.prop" 2019-04-09 14:01:51 +00:00
Florian Mayer
1d26ca95c3 Merge "Revert "Only assert-max-image-size for static partitions."" 2019-04-09 13:21:23 +00:00
Florian Mayer
6e099095d1 Revert "Only assert-max-image-size for static partitions."
This reverts commit 67e4336912.

Reason for revert: Broke master

Change-Id: I8a5054a42f145881437e2cb5b372f276bfdaa3d2
2019-04-09 09:54:59 +00:00
Xin Li
a76f88be02 Merge "DO NOT MERGE -- Merge PPRL.190405.003 into master" 2019-04-09 04:29:23 +00:00
Treehugger Robot
3c4889fc79 Merge changes from topic "dap_size_check"
* changes:
  Only assert-max-image-size for static partitions.
  sparse_img.py --get_partition_size return size of partition
  Revert "Fix dynamic partition size check for devices with recovery"
2019-04-09 02:17:36 +00:00
Xin Li
8d900c6144 DO NOT MERGE -- Merge PPRL.190405.003 into master
Bug: 130175407
Change-Id: I677403b7e0038f4ba74270b4ce8553a360e46734
2019-04-08 18:56:51 -07:00
android-build-team Robot
505063f5ad Make change and version bump to PPRL.190405.003
Change-Id: I9a4ecf96a9bfac0eef95d5176cf05b4f84ec7699
2019-04-08 18:50:28 +00:00
android-build-team Robot
10d2ada411 Make change and version bump to PPRL.190405.001
Change-Id: I3f3474b30f18066560d8bd51dd72f183894918fe
2019-04-08 18:16:44 +00:00
Anton Hansson
15794ca03c Move bootimage props to vendor/build.prop
Prior to this change the properties were in system/etc/default.prop.
These properties are device-specific and don't really belong on the
/system partition.

I anticipate further change to these properties in the future:
- pruning down the set of properties, as the .product. props
  don't make much sense for the boot image
- moving them to the ramdisk instead

Bug: 130025216
Test: boot into recovery, observe title (shows bootimage fingerprint)
Change-Id: I9e92c1ec7068ae18fa0d709c77eac22a6b88c3d8
2019-04-08 17:47:35 +01:00
Nicolas Geoffray
6b529750c5 Merge "Move the profile rule out of dex_preopt_libart.mk." 2019-04-08 08:55:19 +00:00
Treehugger Robot
6afe016825 Merge "Remove our clang-tidy wrapper" 2019-04-05 21:58:36 +00:00
Nicolas Geoffray
7e8ca9a174 Move the profile rule out of dex_preopt_libart.mk.
We only need to define it once. dex_preopt_libart.mk can be read
multiple times if there are many boot image.

Test: m && no warning
Bug:119800099
Change-Id: If5b8fbb0c3310eb42f676d7b5267dcee679f7e19
2019-04-05 18:44:15 +01:00
Treehugger Robot
639861ab66 Merge "Don't feed framework.jar to proguard for vendor apks" 2019-04-05 12:40:18 +00:00
Nicolas Geoffray
39099e8498 Merge "Pass DEXPREOPT_USE_APEX_IMAGE to soong." 2019-04-05 09:34:34 +00:00
George Burgess IV
09e5d9b2ba Remove our clang-tidy wrapper
Looks like the reason for it existing has been fixed. It should probably
just be removed.

Bug: None
Test: WITH_TIDY=1 m
Change-Id: Ic001393da7211cd6ef2bbd5af6ef13c7fe8e00e7
2019-04-04 16:21:53 -07:00
Treehugger Robot
405d3a4ade Merge "Build non-sparse super image if necessary." 2019-04-04 23:16:06 +00:00
Yifan Hong
67e4336912 Only assert-max-image-size for static partitions.
assert-max-image-size doesn't make sense for
dynamic partitions, as build_image.py always find the
right size for the output image. Hence:

- build_image.py no longer need to write generated_*_info.txt
  (which contains the size of the image).
- assert-max-image-size on the static BOARD_*IMAGE_PARTITION_SIZE. If
  a partition is dynamic, that variable isn't set, and
  assert-max-image-size becomes a no-op. If the partition is static,
  assert-max-image-size checks the static partition size as it used
  to be.
- Fix read-size-of-partitions to use the size of the partition by
  reading the image directly (instead of using generated_*_info.txt).

For devices without AVB, with DAP enabled, and does not have
RESERVED_SIZE for partitions, because of right sizing, the original
code always warns about approaching size limits. Since such checks
doesn't make sense for dynamic partitions, remove them.

Test: builds on device with dynamic partitions
Test: builds on cuttlefish with DAP enabled (without AVB), no
      more size limit warnings:
WARNING: out/target/product/vsoc_x86/vendor.img approaching size limit (X now; limit X)

Fixes: 122377935
Change-Id: I75e1b8322197cb18cf397d02aefd49d777bb6405
2019-04-04 15:09:51 -07:00
Jaewoong Jung
15d56810ca Merge "prebuilt_internal.mk refactoring." 2019-04-04 21:52:47 +00:00
Elliott Hughes
24e47858f2 Merge "Remove 'column' from modules target" 2019-04-04 20:17:05 +00:00
Yifan Hong
bd4301e190 Revert "Fix dynamic partition size check for devices with recovery"
Reason for revert: size check is removed for devices
with dynamic partitions because it doesn't make sense.

Bug: 122377935
Bug: 120043292
Bug: 124489494
Test: build cuttlefish

This reverts commit accf09b2e0.

Change-Id: I289faf11a08acbcef36924eb747a15f55124ce79
2019-04-04 12:48:14 -07:00
Nicolas Geoffray
0639b7de03 Pass DEXPREOPT_USE_APEX_IMAGE to soong.
Test: lunch walleye_jitzygote-userdebug m && all odex file use the apex image
Bug: 119800099
Change-Id: Ieb8f36b94264496a41998d4ceca30e1f41a98ebe
2019-04-04 18:51:32 +01:00
David Sehr
9dd7ee7ce1 Merge "Remove dalvik/dexdump and rename dexdump2" 2019-04-04 15:28:51 +00:00
Anton Hansson
6de8abc920 Merge "Indent the install_jni_libs makefiles" 2019-04-04 10:33:59 +00:00
Colin Cross
f78f0ce542 Merge "Export more config values to Soong" 2019-04-04 04:00:13 +00:00
Treehugger Robot
3fb753c0a2 Merge "supernod: make intermediates directory." 2019-04-04 00:31:26 +00:00
Treehugger Robot
a05dbdd6dc Merge "Skip checking ELF files for uninstallable soong modules" 2019-04-04 00:00:10 +00:00
Yifan Hong
cb35bd9e51 Build non-sparse super image if necessary.
If TARGET_USERIMAGES_SPARSE_EXT_DISABLED is set, don't provide
--sparse to lpmake, so that a non-sparse super image is built.

Test: build with the flag set.
Fixes: 120041578
Change-Id: I5a26e4c793b0e2ddc89e9c38c8828ac21044e78a
2019-04-03 10:58:25 -07:00
Yifan Hong
438175e7de supernod: make intermediates directory.
Test: delete the directory, then `m supernod`
Change-Id: If2f153fc8815b1bbf77774849be9cc2cdb5fd913
2019-04-03 10:58:09 -07:00
David Sehr
976c3c3651 Remove dalvik/dexdump and rename dexdump2
Complete the migration to use art/dexdump.

Bug: 22322814
Test: make -j 50 checkbuild test-art-host-dexdump
Change-Id: Ie69bed375dff79f66add5bdb6a8b1b7e14d8a173
2019-04-03 09:30:06 -07:00
Treehugger Robot
78ec599720 Merge "Statements in build system such as ifeq (true,$(LOCAL_VENDOR_MODULE)) has a poor compatibility" 2019-04-03 15:27:21 +00:00
Johan Harvyl
7005d4f4cc Remove 'column' from modules target
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.

Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.

Bug: 129800175
Test: make modules
Change-Id: I26040479a03916161fb5d072de1af640d8080c7f
2019-04-03 07:41:43 -07:00
Jiyong Park
eadd1bdb8e Don't feed framework.jar to proguard for vendor apks
We used to add framework.jar to proguard via -systemjars option even
for the apks building againsd SDK. This was because the app might have
references to hidden APIs via static libraries, etc.

However, for vendor apks, the use of hidden API is strictly prohibited.
So it is fine to not include framework.jar. Furthermore, including
framework.jar even causes problems in some cases; if a java library
(e.g., android.hidl.base-V1.0-java) is statically linked to both the app
and the framework.jar, -systemjars frameworks.jar forcibly removes
classes in the library from the app to have references to the non-public
classes in framework.jar. This could fail some compliance tests.

Fixing the problem by not raising SDK for apks located in vendor or odm
partitions.

Bug: 128574081
Test: m
Change-Id: If2b658fead5b4bb4d8c023a37eb57a37ad9b741d
2019-04-03 22:35:34 +09:00
Anton Hansson
74a36536c3 Indent the install_jni_libs makefiles
These files are pretty dense, and are difficult to read
without indentation.

Bug: 129323707
Test: noop on presubmits
Change-Id: I5fde5429120e80a8c6329ea43d32b3ee324a2632
2019-04-03 14:24:43 +01:00
Colin Cross
e257b26059 Export more config values to Soong
Export more config values to Soong that will be use dto generate
robolectric's build.prop.

Bug: 122331577
Test: m checkbuild
Change-Id: I1e9dd165772a071cf78927b3bf1e29e01290a42e
2019-04-02 22:57:43 -07:00
joker.yang
a75c9a5079 Statements in build system such as ifeq (true,$(LOCAL_VENDOR_MODULE)) has a poor compatibility
We have developed a vendor module and set LOCAL_VENDOR_MODULE := true<space> (Added a space character at the end)
The android build system then can't installed it in the right partition until we removed the extra space character.

bug: 129725067

Change-Id: I081ffe7f39a9c850007ba304c815436500be694c
2019-04-03 01:31:43 +00:00
Vic Yang
841ab06af1 Skip checking ELF files for uninstallable soong modules
If a module is uninstallable, the shared library dependencies are not
set up and thus the ELF file check may fail incorrectly.  In this case,
there is no need to check ELF files anyway.

Test: Build walleye with no-vendor-variant VNDK enabled and does not
      see erroneous failure anymore.

Change-Id: Icd115fc82daedf11795800de5cbe87c87073586a
2019-04-02 14:06:22 -07:00
Martin Stjernholm
c712ac1001 Merge "Drop libsigchain from the system image." 2019-04-01 19:15:25 +00:00
Martin Stjernholm
f8b6fefcd1 Drop libsigchain from the system image.
It is now in the Runtime APEX and considered internal there.

Test: Flash and boot
Test: atest CtsCompilationTestCases CtsBionicTestCases
Bug: 118374951
Bug: 124293228
Change-Id: I33bb9c238d7db46795deb592c9d20fe6591c1654
2019-04-01 18:37:06 +01:00
Treehugger Robot
c2fe916233 Merge "Move super.img to obj/PACKAGING" 2019-04-01 16:21:07 +00:00
Yifan Hong
5478754cd6 Move super.img to obj/PACKAGING
To avoid the confusion. super.img isn't intended to be flashed
during day-to-day development.

Test: m superimage
Bug: 128891161
Change-Id: I9d62e5929b415343b2d890ab21e6ae51175af2ae
2019-03-29 14:47:28 -07:00
Anton Hansson
8adf501905 Merge "Access PRODUCT_ variables directly" 2019-03-29 16:54:47 +00:00
Anton Hansson
b5cec0d792 Merge "Automate the strip and assignment of PRODUCT_ vars" 2019-03-29 16:54:25 +00:00
Treehugger Robot
20ac920654 Merge "Make the APEX lib absence check optional, for local use." 2019-03-29 13:43:32 +00:00
Dan Willemsen
672e98fac8 Merge "Stop installing host packages via PRODUCT_PACKAGES" 2019-03-29 03:20:52 +00:00
Treehugger Robot
5d225276ca Merge "Fix build error on empty ramdisk" 2019-03-29 03:03:00 +00:00
Anton Hansson
8dab0a6f50 Access PRODUCT_ variables directly
This CL simplifies the PRODUCTS.$(INTERNAL_PRODUCT).X accesses of
product variables, and removes unnecessary stripping of them.

Replace: '\$\(PRODUCTS\.\$\(INTERNAL_PRODUCT\)\.([^\)]*)\)' with '$(\1)'
Replace: '\$\(strip\s*\$\(PRODUCT_([^\)]*)\)\)' with '$(PRODUCT_\1)'

A few minor manual tweaks.

Bug: 116769560
Test: presubmit
Change-Id: I70c54f1582e3cc780028535960147d99ebc2e0e1
2019-03-28 15:54:25 +00:00
Anton Hansson
13ea2a6a7d Automate the strip and assignment of PRODUCT_ vars
With this change, all PRODUCT_ variables are treated the same
when it comes to stripping and assigning them to their final
variable name. In the past, all the PRODUCT variables needed
to be listed in two places to achieve this.

The documentation previously attached to the strip/assignment
is moved to the PRODUCT_ variable list in product.mk.

Also refactor some of the default value logic to cope with
the new automation.

Many places in the build system that currently refer to
$(PRODUCTS.$(INTERNAL_PRODUCT).X) can now be modified to
use $(X) directly.

Bug: 116769560
Test: verified noop on PRODUCT_ variables on all products in the tree
Change-Id: I5677c355e81359b1d3c0db2a2232941097a05047
2019-03-28 15:26:49 +00:00
Martin Stjernholm
c9d5858f58 Make the APEX lib absence check optional, for local use.
Test: m systemimage (with and without failure)
Bug: 124293228
Bug: 129466457
Change-Id: I8bf5ba51232bb9961bdedd56d0f17ee1d8698f54
2019-03-28 15:08:32 +00:00
SzuWei Lin
29770fa2bf Fix build error on empty ramdisk
package `init_vendor` is the only content of ramdisk so far.
We would get build error if we do not include init_vendor.
The patch fix the build error for the case that ramdisk is empty.

Bug: 129386309
Test: lunch aosp_arm64_ab-userdebug; make ramdisk -j
Test: Build pass
Change-Id: I7c7c828b5f29350268d4789393b90740dd68162d
2019-03-28 13:41:01 +00:00
Colin Cross
38b48debc5 Understand the support library/androidx @Keep annotations
Copied from tools/base/build-system/gradle-core/src/main/resources/com/android/build/gradle/proguard-common.txt.

Fixes: 129311848
Test: none
Change-Id: Ie8b40b416c8772a550bb4d1f7bd6e7e944cdd166
2019-03-26 23:44:01 +00:00
Jaewoong Jung
f22997ead4 prebuilt_internal.mk refactoring.
Add cc_prebuilt_internal.mk and java_prebuilt_internal.mk. Now all
buisiness logic lives in individual per-class prebuilt mk files.

Fixes: 128609813
Test: Built and flashed a Pixel device image + TreeHugger
Change-Id: I3827f990642bb7587dc682d1a382b3a1ce22fe66
2019-03-26 15:29:20 -07:00
Treehugger Robot
d7060a50f9 Merge "Eliminate ENABLE_DEFAULT_TEST_LOCATION as it is always true" 2019-03-26 20:22:37 +00:00
Sasha Smundak
da25b691d3 Eliminate ENABLE_DEFAULT_TEST_LOCATION as it is always true
Bug: 117224272
Test: treehugger
Change-Id: Idd47ead31fcd89dbf728f140dc3353e5013ba352
2019-03-25 13:26:03 -07:00
Daniel Norman
adf8096c77 Only call make_recovery_patch when BUILDING_SYSTEM_IMAGE.
The recovery patch gets put in the SYSTEM directory. Placing the
recovery patch here doesn't make sense when not building the system
image, as is the case for merged (system + vendor) builds.

Bug: 128838154
Test: Running make droid dist for a device target that sets PRODUCT_BUILD_SYSTEM_IMAGE to false.
Change-Id: Ib5ce8c8490024199f82d0c093e9a7ae2de5f71f5
2019-03-25 18:34:30 +00:00
Anton Hansson
94fa0e75cb Merge "Put DEVICE/PRODUCT overlays in different partitions" 2019-03-25 09:25:47 +00:00
Martin Stjernholm
c62e31242d Merge "Exclude libdexfile_external.so to fix aosp_marlin-userdebug builds." 2019-03-22 15:35:09 +00:00
Martin Stjernholm
d185bb29ce Exclude libdexfile_external.so to fix aosp_marlin-userdebug builds.
Test: m systemimage
Bug: 124293228
Change-Id: I7a4744457396084ef9fd78d9c2f1efdabe0f981d
2019-03-22 14:24:08 +00:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Treehugger Robot
02699e40ea Merge "Check that Runtime APEX libraries don't end up in /system/${LIB}." 2019-03-22 12:34:05 +00:00
Treehugger Robot
1d38fe98d1 Merge "Follow symlink when creating symbols.zip" 2019-03-21 22:19:49 +00:00
Martin Stjernholm
f1e7c7159b Check that Runtime APEX libraries don't end up in /system/${LIB}.
This is a stop-gap measure for a proper fix enforcing library "ownership" in
Soong: b/128708192

Test: m systemimage (with and without libs that exist in /system/lib)
Test: Check that this fails:
  m systemimage
  m out/target/product/taimen/system/lib/libjdwp.so
  m systemimage-nodeps
Bug: 124293228
Change-Id: Iac0d0cec7d9e216028a0caccfbb76838514d4a7b
2019-03-21 17:52:35 +00:00
Anton Hansson
cece1e03af Merge "Read product/device RRO dirs separately from soong" 2019-03-21 11:28:19 +00:00
Jiyong Park
88e0980ddf Follow symlink when creating symbols.zip
Due to the runtime APEX, the symbols directory now contains a symlink;
./apex/com.android.runtime -> com.android.runtime.debug (or .release).

Previously, this symlink itself was included in the symbols.zip file.
And this is causing problem to the online stack tool which does not
follow the symlink in the zip file. Instead of fixing the problem in the
stack tool side, this change let the packaging routine to follow the
symlink and copy the files behind the symlink as if they were under a
directory that isn't a symlink. (i.e.
./apex/com.android.runtime/bin/dex2oat is added)

Bug: 120846816
Test: m dist with marlin (flattened) and blueline (non-flattened)
examine symbols.zip file and check that unstripped shared libraries are
found under /apex/com.android.runtime directory
Change-Id: I1d1c787a2e8ab7209410dfa2cff749a7042e21b0
2019-03-21 18:48:16 +09:00
Bowgo Tsai
8802b7119d Only build system_other.avbpubkey when AVB is enabled
/product/etc/security/avb/system_other.avbpubkey is only needed
when BOARD_AVB_ENABLE is true. This fixes the build error of
Marlin/Sailfish.

Bug: 123611926
Bug: 129029207
Test: make
Change-Id: I73f948d84f91cd6fbe49a2de7bf12e46eebe6ede
2019-03-21 14:26:33 +08:00
Vic Yang
30dda1da5e Merge changes from topic "vndk-no-vendor-variant"
* changes:
  Add support for no-vendor-variant VNDK
  Add module-target-built-files function
2019-03-21 04:30:47 +00:00
Treehugger Robot
7e87c72fb0 Merge "Moving system_other key into product.img" 2019-03-21 04:26:21 +00:00
Anton Hansson
2cad3f68c2 Merge "Fix the product-graph target" 2019-03-20 17:31:41 +00:00
Dan Willemsen
2e79dafed1 Stop installing host packages via PRODUCT_PACKAGES
Test: treehugger
Change-Id: I24ac93f3558116f4ddd96d22ef9bbd47240fdd06
2019-03-20 10:29:42 -07:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Vic Yang
1b83413b5a Add module-target-built-files function
This is similar to module-built-files, except that it only returns
files built for the target, not the host.

Bug: 119423884
Test: Build with the no-vendor-variant VNDK change that uses this
      function.

Change-Id: I2a3d99003b05999eae01c0b90bb62b5263d65592
2019-03-20 10:22:21 -07:00
Anton Hansson
bec4aa868a Merge "Refactor generate_enforce_rro" 2019-03-20 15:18:19 +00:00