Commit graph

17885 commits

Author SHA1 Message Date
Dan Willemsen
a9cb7e3392 Fix dep filename for rs.srcjar
Caught by https://android-review.googlesource.com/861510

Bug: 121058584
Test: m out/target/common/obj/APPS/Gallery2_intermediates/renderscript/rs.srcjar
Test: NINJA_ARGS="-t deps out/target/common/obj/APPS/Gallery2_intermediates/renderscript/rs.srcjar" m
Change-Id: I92a803963f4431e8506b1f2517a7186d16667709
2019-01-03 22:14:56 -08:00
Treehugger Robot
28bad7a498 Merge "Pack libsquashfs_utils.so into otatools.zip." 2019-01-04 00:32:06 +00:00
Treehugger Robot
6fee1039af Merge "Rename to LOCAL_PREFER_CODE_INTEGRITY" 2019-01-03 22:22:26 +00:00
Tao Bao
beea6c0828 Pack libsquashfs_utils.so into otatools.zip.
Overlooked the transitive dependency on this lib in my previous CL that
packs libfec.so.

Bug: 122280472
Test: Build `otatools.zip`. Unzip and check that
      `ldd bin/delta_generator` no longer shows any missing lib.
Change-Id: I7b633ea870f05b86ee7760c736dac7c74dee5dc2
2019-01-03 12:34:40 -08:00
Jiyong Park
b6c095ff4d Read all product makefiles even when TARGET_BUILD_APPS is set
This allows us to have vendor-specific product makefiles for building
unbundled artifacts. The makefile could be used to specify path to the
keystore used to sign the artifacts for the vendor.

Bug: 121224311
Test: m
Change-Id: I260bfddc5fc438fc0986b39d9010087bf758c7ca
2019-01-04 04:04:38 +09:00
Victor Hsieh
330d21d53b Rename to LOCAL_PREFER_CODE_INTEGRITY
During code review, the name change was suggested.

Test: local CTS passed
Bug: 112037137
Change-Id: I1782c532ad6dd36ee8aad7987e47a14f5c1895ee
2019-01-03 09:48:39 -08:00
Tao Bao
a19f8e993b Pack libfec.so into otatools.zip.
delta_generator now has a dependency on libfec.so [1], for generating
A/B incrementals.

[1] https://android-review.googlesource.com/c/platform/system/update_engine/+/854154

Bug: 122280472
Test: `m -j otatools-package` with aosp_marlin-userdebug. Check that
      `otatools.zip` contains libfec.so.
Change-Id: Ia6642bb2c7ccb0f89ad3079bdf65e4dbffee13f5
2019-01-02 23:24:51 -08:00
Dan Willemsen
ad6a15433e Produce ro.build.version.preview_sdk_fingerprint
This is just a hash of the current.txt and system-current.txt right now,
though it may expand to include other API surfaces in the future.

Once prebuilts/sdk/current is populated with api_fingerprint.txt files,
we can use those for unbundled builds, but until then, just use the
PLATFORM_PREVIEW_SDK_VERSION as a placeholder.

MD5 was just the most convenient, since we don't have a sha tool that we
can use on Mac currently. I'm hoping we can get a toybox-based tool in
the future that standardizes that, but we aren't currently using sha*sum
from toybox on Linux, much less on Darwin yet.

Test: m dist out/dist/api_fingerprint.txt
Test: m out/target/product/.../system/build.prop
Change-Id: If69f270560d05135cb81a9bb2d1b208ea78f86df
2018-12-27 12:30:05 -08:00
Mikhail Naganov
aa73cefbc4 Use ASAN linker for native tests
Native tests (BUILD_NATIVE_TEST) use their own MODULE_CLASS.
Check for it when selecting the linker for ASAN.

Test: build a native test, readelf -l <test> | grep linker
Change-Id: I34ca8c443c792bdf8b4b1fa812806c56f13a72d0
2018-12-20 16:15:54 -08:00
Treehugger Robot
92b623259b Merge "Don't write vendor to dynamic_partitions_info.txt if it's unavailable." 2018-12-20 20:45:40 +00:00
Colin Cross
059edc0a96 Merge "Add a flag to allow unbundled builds to build SDKs from source" 2018-12-20 00:35:59 +00:00
Colin Cross
cff1cee3f1 Hide unzip warning when zip file is empty
unzip prints a warning and exits with code 1 when a zip file is empty.
Pipe the output of unzip through grep -v to hide the warning,
using PIPESTATUS to preserve the exit code of unzip, and then
filter out exit codes that are not 0 or 1.

Test: m
Change-Id: If2cf725fc3315d5996d5a7190288df46d84a59e2
2018-12-19 23:47:10 +00:00
Treehugger Robot
17e9a79fb0 Merge "Log only errors when invoking veridex." 2018-12-19 23:46:04 +00:00
Tao Bao
943fa4c523 Don't write vendor to dynamic_partitions_info.txt if it's unavailable.
If an AOSP target is built with dynamic partitions support but without
vendor.img available at build time, don't write 'vendor' to
dynamic_partitions_info.txt that will be used for building OTA packages.

We can't remove the partition from BoardConfig file, because the name
will be still needed in other places, such as generating the partition
metadata (super_empty.img). Otherwise manually flashing vendor.img at a
later point would require additional steps (e.g. `fastboot
create-logical-partition`).

Bug: 120852744
Test: `m -j dist` with and without vendor projects.
Change-Id: Ia1c3ed5bbea0255f1908958140dac97a1597586d
2018-12-19 14:17:55 -08:00
Dario Freni
ee835c736b Log only errors when invoking veridex.
Test: m
Bug: 121225084
Change-Id: I7e8cfbb7b0bcdb3f8d941086ce920da38d558145
2018-12-19 18:24:53 +00:00
Nicolas Geoffray
c857ed2acd Merge "Fix build time preopt with shared library uses." 2018-12-19 08:37:01 +00:00
Colin Cross
8e0ff1c370 Add a flag to allow unbundled builds to build SDKs from source
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.

Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
2018-12-18 22:43:16 -08:00
Treehugger Robot
81e29e0969 Merge "Add missing dependency on common javalib.jar" 2018-12-18 21:17:07 +00:00
Colin Cross
54a71e229b Add missing dependency on common javalib.jar
Building $OUT/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
is no longer updating the common intermediates:
out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar
after I25163e91886cea6941afa25cdb529ed053278dcb.  Add the missing
dependency on common javalib.jar, which already depends on common
classes.jar.

Bug: 119412419
Bug: 121194944
Test: rm out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar &&
      m core-tests &&
      ls out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar

Change-Id: Id463d159e46c82656c364fdb2dbe53f33ee1a103
2018-12-18 11:06:25 -08:00
Nicolas Geoffray
c04f3126f4 Fix build time preopt with shared library uses.
- Handle hidl libraries.
- Handle new shared library encoding.

Test: no mismatch preopt during boot.
bug: 117845483
bug: 111174995
Change-Id: Ie4bca653594c72df2eb2fdd827bc73cfcb76b1d7
2018-12-18 17:33:02 +00:00
Colin Cross
19fbc1b9e9 Don't install boot.art when WITH_DEXPREOPT is false
Don't create the install rules for boot.art when WITH_DEXPREOPT
is not set to true, which will ensure there is no dependency on
boot.art in a normal build, which matches the behavior before
I25163e91886cea6941afa25cdb529ed053278dcb.

This should fix the Mac build, which never sets WITH_DEXPREOPT
and does not support running dex2oat.

Bug: 119412419
Bug: 121130576
Bug: 121183382
Test: lunch aosp_sailfish-eng && m WITH_DEXPREOPT=false
      files does not depend on out/target/product/sailfish/dex_bootjars/system/framework/arm/boot.art
Change-Id: I39e96b1f35f6808d3007cf1785ec3db89e0decb6
2018-12-18 15:36:36 +00:00
Colin Cross
6db5b0ea9a Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
2018-12-17 13:46:17 -08:00
Colin Cross
b8901d7fb8 Revert "Move dexpreopting to Soong"
This reverts commit e736c58043.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
7f9ccd53d7 Revert "Add missing dependency on zip2zip"
This reverts commit e373b3f08b.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
24258b1fb1 Revert "Create directories before unzipping dexpreopt zip"
This reverts commit 9eaeb56c24.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
10846f99fb Revert "Correctly create directories before unzipping dexpreopt zip"
This reverts commit 2bb1f518fd.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Treehugger Robot
cb4d613e53 Merge "Correctly create directories before unzipping dexpreopt zip" 2018-12-14 10:45:18 +00:00
Colin Cross
2bb1f518fd Correctly create directories before unzipping dexpreopt zip
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 attempted to pre-create
the directories that unzip would unzip into, but incorrectly
created them in the top of the source tree instead of in
$(PRODUCT_OUT).  Fix the directory location and add a cleanspec
to clean up the incorrect directories in the source tree.

Bug: 119412419
Test: m correctly cleans up incorrect directories in source tree
Test: extract unzip command from out/verbose.log.gz and add bash -x
Change-Id: Ica006a007d112c232311435aaac0c0e476232b67
2018-12-13 23:32:06 -08:00
Treehugger Robot
06c8df1ccd Merge "Add missing dependency on zip2zip" 2018-12-14 06:18:01 +00:00
Treehugger Robot
49448d5bc5 Merge "Create directories before unzipping dexpreopt zip" 2018-12-14 05:59:32 +00:00
Tao Bao
7732b434e9 Merge "Set PATH when calling build_super_image.py." 2018-12-14 04:23:01 +00:00
Colin Cross
9eaeb56c24 Create directories before unzipping dexpreopt zip
unzip sometimes fails with:
checkdir error: cannot create out/target/product/.../system/framework/oat
File exists

I think this happens when two unzips run in parallel, see that the
parent directory is missing, race to create it, and then one of them
treats the EEXIST when creating it as an error instead of continuing.
Work around this by creating the directories with mkdir -p before
running unzip.

Test: m installclean && m
Bug: 119412419
Change-Id: Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2
2018-12-13 18:32:57 -08:00
Colin Cross
e373b3f08b Add missing dependency on zip2zip
uncompress-prebuilt-embedded-jni-libs uses zip2zip, add a dependency
to the rule that calls it.

Test: treehugger
Change-Id: I39d580999947ee54cfefe875b57a028be5333bd7
2018-12-13 15:52:09 -08:00
Ivan Lozano
00997c2ac2 Merge "Add make var to avoid recovering with diagnostics." 2018-12-13 20:56:18 +00:00
Colin Cross
3b1d5a1538 Merge "Move dexpreopting to Soong" 2018-12-13 20:23:11 +00:00
Tao Bao
403a2f9051 Set PATH when calling build_super_image.py.
build_super_image.py calls `lpmake` and expects that (i.e.
HOST_OUT_EXECUTABLES) in PATH. However, we have to explicitly set up
that inside the build.

Bug: 120553014
Test: Set OUR_DIR and build blueline-userdebug.
Change-Id: I000f9d069902a902c9504a2ba31dba6dbc6917a2
2018-12-13 10:53:12 -08:00
Treehugger Robot
93e6c59784 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:21 +00:00
Colin Cross
e736c58043 Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
2018-12-12 17:21:22 -08:00
Mathieu Chartier
cc4ca50cfb Change profman logging to only be for errors
Move profman logging to only be for errors. Avoids build spam.

Bug: 120907449
Test: make
Change-Id: I0707dc5c8d6516cbf95d263864bdddaf5a5990c9
2018-12-12 10:28:02 -08:00
Ivan Lozano
5fb2de7086 Add make var to avoid recovering with diagnostics.
Add a LOCAL_SANITIZE_NO_RECOVER variable that allows specifying which
sanitizers running in diagnostics mode shouldn't recover. This can help
debugging as we test enabling sanitizers in new libraries since it'll
cause tombstones to be generated along with the diagnostics information.

Bug: 80195448
Bug: 110791537
Test: Compiled test module with this flag, checked compiler command.
Test: Test module crashed, tombstone contained diagnostics information.
Change-Id: I441b9c873e54bf6404325f4d0ac59835350c2889
2018-12-12 10:22:30 -08:00
Treehugger Robot
53de7a71f6 Merge "Add recovery_acpio option to make recovery image" 2018-12-12 08:13:46 +00:00
Xin Li
3449df5704 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Ib1b590fc605b17e3a3901e65f62d5f7ad2257f6a
2018-12-11 14:03:11 -08:00
Tianjie Xu
b38ae44d1e Merge "recovery text image: use zopflipng to compress the generated images" 2018-12-11 18:56:20 +00:00
Chen, ZhiminX
752439b321 Add recovery_acpio option to make recovery image
Test: can generate recovery image with recovery_acpio
Fixes: 111871613

Change-Id: I9174a4741f571a00bcadc548cd9e1316b4175132
2018-12-11 15:23:28 +08:00
xunchang
cc57d31c91 recovery text image: use zopflipng to compress the generated images
Generate the images for recovery's wipe data menu. And use the lossless
tool zopflipng to compress the generated image. This saves space
in the boot image at the cost of the increase of build time. In practice,
it adds about ~20 seconds to build the bootimage with 32 threads.

zopflipng generally runs slower. Even with a predefined filters
strategy, it runs about 3 times slower than pngcrush, e.g. ~40s vs 15s
to compress a 1.8M png file. However, zopflipng also gives a better
compression: ~1.4M vs 1.6M for the same image. So I guess the time
consumption is a price worth paying.

Bug: 74397117
Test: build the bootimage and check the resource images
Change-Id: I3e71f8bedd3c183a3374b1a9464bf05500e1aa61
2018-12-10 19:53:38 -08:00
Jeff Sharkey
f7d482bd9a Bump PREVIEW_SDK_INT for Q builds.
We've already added new APIs in Q, so we shouldn't be claiming a
value of "0", which signals a production platform release.

Bug: 120797950
Test: manual
Change-Id: I6c9063ac4ace79b3ee6b1c67ccdf76f4063ad165
2018-12-10 17:13:24 -07:00
Tianjie Xu
19e6502884 Merge "Generate the recovery text images at build time" 2018-12-10 19:41:43 +00:00
Nicolas Geoffray
ed167cf814 Factor out common code.
Test: m
Change-Id: If718c281656a890fb5eba54eb290976c153e2bb6
2018-12-07 14:35:52 +00:00
Nicolas Geoffray
923f267bf6 Merge "Use the final APK for dexpreopt when it's not stripped." 2018-12-07 14:13:45 +00:00
android-build-team Robot
4a676aaa3a Version bump to PPRL.181205.001
Change-Id: I9174bab704afa3ff85be5236be16d15f66446bb4
2018-12-07 02:58:19 +00:00