Commit graph

17055 commits

Author SHA1 Message Date
Colin Cross
7b21221d2a Merge changes from topic "manifest_fixer_targetSdkVersion"
* changes:
  Pass --library to manifest_fixer.py for android libraries
  Fix dependencies for obfuscated instrumentation tests
  Move manifest fixing to a separate rule
2018-07-26 22:02:36 +00:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +00:00
Treehugger Robot
aa2abc3324 Merge "Add a version.txt file to compatibility suite zips" 2018-07-26 21:30:51 +00:00
Julien Desprez
64d524ec44 Merge "Update default template for suites native tests"
am: 8e472bc42e

Change-Id: I4de3729d2ee6f86f498d24692cc577529ed5d4c1
2018-07-26 13:47:48 -07:00
Treehugger Robot
8e472bc42e Merge "Update default template for suites native tests" 2018-07-26 20:38:11 +00:00
Julien Desprez
7a10601e7c Add a version.txt file to compatibility suite zips
This will avoid having to tag jar file with a manifest
implementation version.

Test: make cts, check the zip
Bug: 111834256
Change-Id: Id809217cefb36b4779fdf41c02f5809ba22d03a1
2018-07-26 11:47:46 -07:00
Yifan Hong
78ae26132d BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk
... because variable checks should go there.

Test: pass
Change-Id: I484f928d848fd4f3b3936d1c7fd03976ee64feb2
2018-07-26 10:50:45 -07:00
David Srbecky
49eae5a99e Merge "Generate unstripped .oat files in the symbols directory."
am: d453f6245d

Change-Id: I4406a0b602514cadaa856cb3d682707fd186dc7b
2018-07-26 05:17:17 -07:00
Treehugger Robot
d453f6245d Merge "Generate unstripped .oat files in the symbols directory." 2018-07-26 12:10:53 +00:00
Anton Hansson
b682674226 Merge "Don't apply path enforcements for non-full builds."
am: 362fff4fcd

Change-Id: I8578f069aa8b032832ef35dd78b973b517e6b547
2018-07-26 03:10:49 -07:00
Anton Hansson
362fff4fcd Merge "Don't apply path enforcements for non-full builds." 2018-07-26 10:02:44 +00:00
Hung-ying Tyan
c565f5c2ed Add more ro.vendor.build.*
to facilitate independent updates of vendor/odm images.

Bug: 78600951 (#56,#57)
Bug: 111491184
Test: build aosp_marlin-userdebug and check vendor/build.prop

Change-Id: I798c13822695259375fbc8d5c7fe08d43a540e46
2018-07-26 17:39:47 +08:00
Mathew Inwood
50f59655ba Merge "Build rules to derive greylists from annotations."
am: 48a7929962

Change-Id: I029776a9e31923b87e125ab0054b398d9c935bce
2018-07-26 01:37:29 -07:00
Mathew Inwood
48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Max Bires
b64277de4c Adding VENDOR_SECURITY_PATCH to vendor partition build.prop
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device

Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop

Change-Id: I3d3ec2d0e76fc5e62cd283ed4bce3894423cabdd
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from 56d444b98f)
2018-07-26 14:35:32 +08:00
yangbill
86f441d899 ATest: Sync auto_test_config for multilib modules
auto_test_config will only be set once for the same
$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)
ATest should also treat the multilib variant modules as testable.

Fix auto_generated config may have chance to be set as 2nd_arch name

BUG: 111397357
BUG: 110820867
BUG: 80298359

Test: . build/envseup.sh
      lunch aosp_x86_64-eng
      make -j out/target/product/generic_x86_64/module-info.json
      (check module-info.json for hello_world_test)
      make -j hello_world_test
      cat out/target/product/generic_x86_64/testcases/hello_world_test/hello_world_test.config

Change-Id: I69895b6373476c0053f2c6e657770d606ccfbcd1
2018-07-26 14:00:55 +08:00
Jae Shin
4b6ba7e0df Remove workaround for libclang_rt.ubsan* vndk libs
libclang_rt.ubsan* VNDK core libraries are no longer built
for all arch flavors. Now, only the TARGET[_2ND]_ARCH-specific
libs are builts. Therefore no need to filter-out and re-add
libclang_rt.ubsan* VNDK core libraries.

Test: m -j vndk
Change-Id: I48080c1cd546cfc9f14313a3c9559d5c1bb2fdbe
2018-07-26 12:14:12 +09:00
Nan Zhang
8d4b4ba885 Change timestamp to -stubs.srcjar
Test: m clean && m -j docs
Bug: b/70351683

Change-Id: Id036e203bbfd81a9a3c089f21d0832495027447a
Merged-In: Id036e203bbfd81a9a3c089f21d0832495027447a
2018-07-25 17:42:24 -07:00
Colin Cross
acebb3266f Pass --library to manifest_fixer.py for android libraries
manifest_fixer.py needs to know the difference between apps
and android libraries in order to change its behavior around
inserting targetSdkVersion.

Bug: 111347801
Test: m checkbuild
Change-Id: Ic21f1b98e3bcbd782612370c46134fc9dd157512
2018-07-25 16:21:41 -07:00
Colin Cross
fcb441b2b7 Fix dependencies for obfuscated instrumentation tests
This path is never used, otherwise the dependency on
proguard.classes.jar would have triggered the checkbuild
dangling rules errors.  Remove the dependency on the
proguarded classes, which don't exist any more, and depend
on the proguard_options and proguard_dictionary files
instead.

Test: none
Change-Id: Ia3ebc3bc71f0d6fdfa4a7a6850e2f7021adfdd1a
2018-07-25 14:30:10 -07:00
Colin Cross
a90b6070c7 Move manifest fixing to a separate rule
Manifest fixing is getting complicated, move it to a separate rule
so that it doesn't have to be a function in definitions.mk.

Bug: 111347801
Test: m checkbuild
Change-Id: Ibc60ad79c9c4f4a63a0e1c8f7779534954fb6585
2018-07-25 14:30:05 -07:00
Nan Zhang
ba000ad893 Merge "Fix the broken build: aosp-master/sdk_x86-sdk"
am: 6ac13c77c7

Change-Id: Ieef26247ee369ecd652db1c16cc27e0461185143
2018-07-24 18:38:40 -07:00
Nan Zhang
527c295cf5 Fix the broken build: aosp-master/sdk_x86-sdk
metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.

Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
2018-07-24 17:15:54 -07:00
Nan Zhang
e98baf0e4a Merge "Copy annotations.zip to out/target/common/obj/PACKAGING/"
am: 28af1e7484

Change-Id: I869c2977e9d366523e9042155173677f4e9efb42
2018-07-24 17:05:37 -07:00
Nan Zhang
28af1e7484 Merge "Copy annotations.zip to out/target/common/obj/PACKAGING/" 2018-07-24 22:44:12 +00:00
Dan Willemsen
76f0441dc0 Merge "Mark more targets as PHONY"
am: 6708f9507b

Change-Id: I4a23ba6f0043cef1406e40752d40b1228d0c8774
2018-07-24 15:37:00 -07:00
Treehugger Robot
6708f9507b Merge "Mark more targets as PHONY" 2018-07-24 22:24:37 +00:00
Dan Willemsen
fe677e27f0 Merge "Remove LOCAL_CLANG := false support" into stage-aosp-master 2018-07-24 19:29:39 +00:00
Mathew Inwood
04c58dea0b Build rules to derive greylists from annotations.
Uses the new class2greylist tool to extract API descriptors from .class
files.

Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.

Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
2018-07-24 15:48:42 +01:00
Anton Hansson
a5fa898189 Don't apply path enforcements for non-full builds.
The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.

Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
2018-07-24 13:52:55 +01:00
Anton Hansson
a94ba25840 Merge "Dump artifacts offending path reqs into a file"
am: 7b4b1b1548

Change-Id: Id661c2785ffddb053499cbfa3e0dd281cb609907
2018-07-24 02:20:02 -07:00
Jae Shin
0b3a91c19d Merge "Additionally check TARGET_IS_64_BIT for binder bitness"
am: bd74c0cb0e

Change-Id: Id56ca32e6a810cacdc71776abfda69e9f76edaed
2018-07-24 02:18:19 -07:00
Anton Hansson
7b4b1b1548 Merge "Dump artifacts offending path reqs into a file" 2018-07-24 09:09:17 +00:00
Treehugger Robot
bd74c0cb0e Merge "Additionally check TARGET_IS_64_BIT for binder bitness" 2018-07-24 09:09:06 +00:00
Dario Freni
bf01d8301a Merge "Generate a zipfile with appcompat logs during dist."
am: 4abd9488ce

Change-Id: Ibdabbe448ef64634eb36de3f24d720efafaa440f
2018-07-24 01:51:04 -07:00
Dario Freni
4abd9488ce Merge "Generate a zipfile with appcompat logs during dist." 2018-07-24 08:45:36 +00:00
Dan Willemsen
7a1da0e43e Mark more targets as PHONY
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.

Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
2018-07-24 01:21:12 -07:00
Jae Shin
f1e9d4f62f Additionally check TARGET_IS_64_BIT for binder bitness
Since TARGET_USES_64_BIT_BINDER could be not set, first check
TARGET_IS_64_BIT when determining binder bitness.

Test: lunch aosp_walleye-userdebug && m -j vndk, then check
directory structure
Bug: 111773572

Change-Id: If75d5946b38d7b5bc15798b273e0450035c8c43a
2018-07-24 16:12:42 +09:00
Dan Willemsen
e303480584 Remove LOCAL_CLANG := false support
Only clang is supported now.

Test: build/soong/build_test.bash in all downstream branches
Change-Id: Ie8ad009625ddd7d5c38a6276b631bc889974fda3
2018-07-24 04:44:09 +00:00
Yifan Hong
68ab6aeb52 Merge "Fix check on BOARD_SUPER_PARTITION_SIZE."
am: c4ae41b251

Change-Id: I23620bd45292e8cea385c2a2fa6322aa8f2e00c3
2018-07-23 15:57:33 -07:00
Yifan Hong
17dd45d689 Fix check on BOARD_SUPER_PARTITION_SIZE.
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.

Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices

Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf
2018-07-23 13:13:50 -07:00
Dario Freni
d10112751a Generate a zipfile with appcompat logs during dist.
Test: m dist
Bug: 110073830
Bug: 78924201
Change-Id: I052034ab35365e7add9a9992a51022c20aa50718
2018-07-23 20:20:15 +01:00
Yifan Hong
fe421ed263 Merge changes from topic "board_partition_reserved_size"
am: 2d90c246a9

Change-Id: I460ea917b47a61acb0cbb0f17a867d15f61c7d6d
2018-07-23 11:58:52 -07:00
Yifan Hong
2d90c246a9 Merge changes from topic "board_partition_reserved_size"
* changes:
  build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
  build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
2018-07-23 18:38:24 +00:00
Tao Bao
f87ea90d76 Merge "releasetools: Rename the ramdisk_dir in prop dict to root_dir."
am: d094713952

Change-Id: I013c82846a143c5eac050325e66092afc66c958f
2018-07-23 09:41:25 -07:00
Anton Hansson
8c3d79dd37 Dump artifacts offending path reqs into a file
Dump offending artifacts into a file that can be inspected after a
build regardless of whether path requirements are enforced or not.

This makes it easier to track progress for products not yet ready
to enable enforcement.

Bug: 80410283
Test: lunch mainline_arm64; m out/target/product/generic_arm64/offending_artifacts.txt
Change-Id: Id05fbf256edf3689ab0b9851b34658d6d84939b2
2018-07-23 09:51:52 +00:00
Yifan Hong
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07:00
Tao Bao
8bfd3c7483 releasetools: Rename the ramdisk_dir in prop dict to root_dir.
This property indicates the path to the root directory (i.e.
TARGET_ROOT_OUT at build time, or ROOT/ in a target_files.zip).
build_image.py will only use this property when building a target using
system_root_image. Under such a configuration, files under this dir
never land into a ramdisk, but as part of system.img. This CL renames
the property name to avoid confusion.

Note that with this change releasetools keeps working with older
target_files zips that contain 'ramdisk_dir'. Because common.py doesn't
read the value of that property, but sets it to ROOT/ directly.

Test: `m dist` on aosp_marlin-userdebug.
Test: `m dist` on aosp_angler-userdebug.
Test: Run add_img_to_target_files.py with a new target_files.zip and an
      old target_files.zip respectively.
Change-Id: Ie9e19dd17d8c2abb4c4a97449e436774d5dd2a36
2018-07-20 16:05:36 -07:00
Sharif Elcott
c1c8ec7a39 Merge "Added Address Sanitizer clang config for x86_64."
am: f6658018f6

Change-Id: I2612e483e2144309c82faeb37b8ebac9f23786dc
2018-07-20 04:11:08 -07:00
Sharif Elcott
f6658018f6 Merge "Added Address Sanitizer clang config for x86_64." 2018-07-20 10:59:39 +00:00
Anton Hansson
78e36736fe Merge "Move dep on PRODUCT_COPY_FILES to main.mk" 2018-07-20 10:12:37 +00:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
1aef906c01 Merge "Run appcompat on all /product modules."
am: 88858574b0

Change-Id: I4af0e942659b9a6b7a0ee091af679b15517a8a7e
2018-07-20 02:08:20 -07:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Dario Freni
88858574b0 Merge "Run appcompat on all /product modules." 2018-07-20 08:59:35 +00:00
Anton Hansson
eccff5a946 Merge "Skip auto-gen rro packages for path requirements."
am: 5558838be1

Change-Id: I7335715433a80a79f02d0979290d1270d6d08403
2018-07-20 01:20:32 -07:00
Anton Hansson
5558838be1 Merge "Skip auto-gen rro packages for path requirements." 2018-07-20 08:10:50 +00:00
Sharif Elcott
b71c33fbdc Added Address Sanitizer clang config for x86_64.
Without this, binaries built for an x64 target with Address Sanitizer enabled
fail to execute at runtime, failing with the error message "No such file or
directory".

Test: 1) Build any Android target that has asan enabled, such as statsd, on
any lunch target with suffix "_x86_64-eng". 2) Run 'file' on the generated
executable. 3) You should see "interpreter /system/bin/linker_asan64" rather
than "interpreter --gc-sections"

Bug: 111667639

Change-Id: I5d7e7f307d954d4cd48ff88a7d9d6a5732276296
2018-07-20 16:10:51 +09:00
Tri Vo
60b687383d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
am: 3e583e0b3d

Change-Id: I297a53cd1acd73250967c6a9669f876d68694354
2018-07-19 18:02:51 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Tri Vo
047c4d544c Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 72458734
Test: m selinux_policy
Change-Id: I5104c14bcc45067723080c229895c9a7771b2651
2018-07-18 13:24:43 -07:00
Anton Hansson
c62d15f077 Skip auto-gen rro packages for path requirements.
The way these packages are currently added to the build is via
modifications in product makefiles inheriting from mainline_system,
but with have the side effect of changing the REQURIED modules for
the source of the auto-gen RRO package.

Whitelist auto-generated RRO packages from the path requirement checks
for now.

Bug: 80410283
Test: make
Change-Id: Ib070e28e0ef87a57adfaedf6456585e8bfa29dd3
2018-07-18 15:52:57 +01:00
Anton Hansson
404d33c578 Move dep on PRODUCT_COPY_FILES to main.mk
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.

Leave the declaration in Makefile for now.

Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Merged-In: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
2018-07-18 14:05:20 +01:00
Dario Freni
1ecc925995 Run appcompat on all /product modules.
The output of the appcompat tool is store on $(PRODUCT_OUT)/appcompat.

Bug: 110073830
Bug: 78924201
Test: m
Change-Id: Ia77cc53fc241a048958cf243ba298298f800f933
2018-07-18 12:18:49 +01:00
Anton Hansson
e640df81d2 Merge "Move dep on PRODUCT_COPY_FILES to main.mk" into stage-aosp-master 2018-07-18 09:48:43 +00:00
Mathieu Chartier
7ae8bb5efa Merge "Revert "Revert "Default to nostripping for non /system preopt"""
am: 401fada3f5

Change-Id: I36025bea5e3c69e72d3dcdaa50649c73cfaf0d28
2018-07-17 11:28:04 -07:00
Mathieu Chartier
401fada3f5 Merge "Revert "Revert "Default to nostripping for non /system preopt""" 2018-07-17 18:13:20 +00:00
David Srbecky
a21fdb55b2 Generate unstripped .oat files in the symbols directory.
Test: Check the generated files with readelf.
Bug: 70512966
Change-Id: Iee70c5cc6f5a3d12e0f1e87c983e5487e415acff
2018-07-17 17:04:20 +01:00
Dan Willemsen
f32fa7ca45 Merge "Remove '=' from the valid module/stem names"
am: 45819baa42

Change-Id: I6da2cdf86fd13c7d694913912b3c02da1e859ef0
2018-07-16 20:02:01 -07:00
Mathieu Chartier
fd5dfb817c Revert "Revert "Default to nostripping for non /system preopt""
Added logic to not preopt tests. Re-enabled usage of
my_module_multilib since this is referenced in setup_one_odex.

Bug: 110156979
Test: make
Test: forrest first boot tests

This reverts commit 9234def313.

Change-Id: I6a6ea2cd0024c33c0cfbd60f3a1f4ad5b1609dc8
2018-07-16 19:36:24 -07:00
Dan Willemsen
f012af1aab Remove '=' from the valid module/stem names
Kati produces errors when a variable containing '=' is used as a
dependency:

https://github.com/google/kati/issues/138

So provide a better error message instead.

Test: Add a module with an '=', see new error
Change-Id: I09d570a8d19abb067621af9983a9d568b643dfb0
2018-07-16 13:57:52 -07:00
Dan Willemsen
bd75f03293 Merge "Remove showcommands from docs"
am: 25e4495de1

Change-Id: I6bc0933317901f9c3b060f98fd20f258d10006c8
2018-07-14 11:40:09 -07:00
Dan Willemsen
0ae41f2e79 Remove showcommands from docs
Test: none
Change-Id: Ia0be98049710175a0f3276841ef0c0bd2ccb60b6
2018-07-14 09:32:13 -07:00
Jiyong Park
129a6e9da2 Merge "fix typo"
am: 0e4c76743a

Change-Id: I3300c9ac28a00ce98c29f34bb654a3860e9e1b5f
2018-07-14 07:22:57 -07:00
Treehugger Robot
0e4c76743a Merge "fix typo" 2018-07-14 14:16:46 +00:00
Jiyong Park
be4910a0de fix typo
PRIATE -> PRIVATE

Test: m -j
Change-Id: I33bbdcefee8acb16e9d8fcdb4c86ce294b3c1762
2018-07-14 15:06:48 +09:00
Anton Hansson
9fbe84ceee Move dep on PRODUCT_COPY_FILES to main.mk
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.

Leave the declaration in Makefile for now.

Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
2018-07-13 17:16:22 +01:00
Dan Willemsen
468206e4cd Merge "Add more status output"
am: 5787711e75

Change-Id: I0f6ee9a8ac4c04ed8effd2a2962503462954c360
2018-07-12 21:06:51 -07:00
David Brazdil
467a10c261 Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-13 00:52:05 +00:00
Treehugger Robot
5787711e75 Merge "Add more status output" 2018-07-12 23:14:44 +00:00
David Brazdil
dc39f73d5b Merge "Add singleton rule for hiddenapi list generation" 2018-07-12 21:34:54 +00:00
Yueming Wang
32ae3af7f5 Merge "Revert "Default to nostripping for non /system preopt""
am: 901d05469e

Change-Id: I56fa81942ef48580b503f47fd790ab4f5436b790
2018-07-12 09:42:17 -07:00
Treehugger Robot
901d05469e Merge "Revert "Default to nostripping for non /system preopt"" 2018-07-12 16:32:46 +00:00
Yueming Wang
9234def313 Revert "Default to nostripping for non /system preopt"
This reverts commit 25f9aa8c4b.

Reason for revert: This CL is likely to break several targets in pi-dev-plus-aosp and oc-mr1-dev-plus-aosp.

Change-Id: I3b29cbdf54007d2043ea1d2e4fe8d56d45eced9e
2018-07-12 14:38:59 +00:00
David Brazdil
ab501e0d8b Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-12 08:58:14 +00:00
Mathieu Chartier
69a009fd11 Merge "Default to nostripping for non /system preopt"
am: f37c37bac8

Change-Id: I3b89ee79d25a4815b2668243b4bb8abbf8ae5e56
2018-07-11 17:05:37 -07:00
Mathieu Chartier
f37c37bac8 Merge "Default to nostripping for non /system preopt" 2018-07-11 23:43:58 +00:00
Mathieu Chartier
25f9aa8c4b Default to nostripping for non /system preopt
Enables preopting of product partition apps.

Disabled secondary arch preopt for TARGET_TRANSLATE_2ND_ARCH to fix
preopt errors for some tests.

Test: test-art-host
Bug: 110156979
Change-Id: I0370a309913c8a516e01563aef451e7ab5819129
2018-07-11 14:29:16 -07:00
Dan Willemsen
518373f8af Add more status output
soong_ui now parses the output from kati into "actions" to feed into the
unified status system. It also looks for errors and marks the enclosing
section as failed.

This adds a few more states so that error messages can be more
appropriately attributed - so that all errors at the end of the buid
aren't attributed to the last makefile read.

Test: m
Test: add some errors
Change-Id: I3abdb004c82e2b99822906910cd66123c11a5099
2018-07-11 12:00:56 -07:00
Colin Cross
5bcb2fc9a9 Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Ib20aa4849978283f1da1ce601b28199fc0183e05
2018-07-11 09:43:04 -07:00
Colin Cross
4871e77f0a Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
2018-07-10 22:49:15 -07:00
Tao Bao
a81bd16fa4 Merge "Group the generic props together in generate-image-prop-dictionary."
am: 8f48f18f69

Change-Id: I6d3efecbb1c7c2f7722673d71dbcbae0d40e6483
2018-07-10 13:12:57 -07:00
Tao Bao
8f48f18f69 Merge "Group the generic props together in generate-image-prop-dictionary." 2018-07-10 20:02:40 +00:00
Tao Bao
3602eca6d6 Group the generic props together in generate-image-prop-dictionary.
Test: m dist
Change-Id: Iedb62c246e9ae8c88ff7822122d6c182aa925738
2018-07-10 10:54:11 -07:00
Colin Cross
357bed2f65 Merge "Make USE_D8 and USE_R8 read-only"
am: 670dd68705

Change-Id: I04e82b076c3669fa3a3ce73e2012c9c430ce47eb
2018-07-10 09:51:05 -07:00
Treehugger Robot
670dd68705 Merge "Make USE_D8 and USE_R8 read-only" 2018-07-10 16:38:44 +00:00
Dario Freni
8a599e54a2 Merge "Generate a NOTICE xml file for /product partition."
am: bd64cd3fe8

Change-Id: I3a8ab1d4bc4f034c7646d31182bbe01814797b8d
2018-07-10 09:27:36 -07:00
Dario Freni
adc972d7bb Generate a NOTICE xml file for /product partition.
Bug: 111179267
Test: tested on a device with /product partition enabled.
Change-Id: I333f916da214c71e04ebd3fe3bf4dac1e341b098
2018-07-10 11:54:56 +01:00
Anton Hansson
bfc78def01 Merge "Warn when defining a 32-bit product on a 64-bit device."
am: 4788f5b094

Change-Id: I705ee5fb954c156e7e57dda684ce5d45b23ffb97
2018-07-09 23:39:11 -07:00
Anton Hansson
0b14a57aaf Merge "Make including missing modules an error."
am: 65dc646c76

Change-Id: I7cf277de314e06d84cc19c0def52cd035bbae51a
2018-07-09 23:37:57 -07:00
Anton Hansson
4788f5b094 Merge "Warn when defining a 32-bit product on a 64-bit device." 2018-07-10 06:29:44 +00:00
Anton Hansson
65dc646c76 Merge "Make including missing modules an error." 2018-07-10 06:28:41 +00:00
Luis Hector Chavez
930ceb30b9 Merge "Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE"
am: b676d6d609

Change-Id: I0e13f4327ce066a56f856985c07f1e8f4c373d24
2018-07-09 16:13:08 -07:00
Treehugger Robot
b676d6d609 Merge "Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE" 2018-07-09 23:04:32 +00:00
Mathieu Chartier
cab7408131 Merge "Add logic to preopt both archs for SDK libs"
am: f3c54cfa78

Change-Id: I1f0336118e71c7da5fa5526425121811c0faace6
2018-07-09 12:58:13 -07:00
Luis Hector Chavez
ff48993ca6 Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE
When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, there is no direct dependency
on the files that get typically added to the ramdisk.img apart from the
NOTICE.html dependency that some files have. This change explicitly adds
the ramdisk/root files as a dependencies of system.img so that the image
is recreated any time a file in the ramdisk changes. It also creates the
installed-files-root.txt file.

Bug: 62387674
Test: /init.rc is present in system.img's dependencies
Change-Id: I234cb8d8a648f8963610be519de1b70b7efe1fd7
2018-07-09 11:07:12 -07:00
Mathieu Chartier
502892a936 Add logic to preopt both archs for SDK libs
Update stale PRODUCT_SYSTEM_SERVER_JARS list since
com.android.location.provider was renamed to
com.android.location.provider.impl.

Added logic to preopt both archs for SDK libs that are also system
server JARS.

Bug: 110780021
Test: manual and verify speed compiled

(cherry picked from commit 4568c2d908)

Merged-In: I34e728444ffda6db3375b638028d54b6ab623209
Change-Id: If0cb68ba4808aa8716099c5447645f4baac63f30
2018-07-09 11:05:21 -07:00
David Brazdil
efc311b3ac Merge "Make classes.jar the output of uninstallable Soong Java modules"
am: cf91546456

Change-Id: Ic090bb36a6b6f12db2f5416a1c504dc6341eca4c
2018-07-09 09:34:24 -07:00
David Brazdil
cf91546456 Merge "Make classes.jar the output of uninstallable Soong Java modules" 2018-07-09 16:24:16 +00:00
Anton Hansson
133fcb2550 Warn when defining a 32-bit product on a 64-bit device.
Building a 32-bit-app-only product on a 64-bit capable device is likely
to be unintentional. Print a warning if this is done implicitly,
e.g. via forgetting to define the TARGET_SUPPORTS_64_BIT_APPS variable.

Also change existing references to only treat 'true' as a positive
value, rather than all non-empty ones.

Bug: 110918674
Test: lunched 64-bit-device product that does and doesn't set this var
Change-Id: I021157c94ec3ac1c690547c8992768e58c89c287
2018-07-09 13:17:52 +01:00
Anton Hansson
1ebcbd51ee Make including missing modules an error.
Only enable it for the core build files rolling up to generic.mk
for now, and whitelist a couple of modules that are conditionally
defined.

Bug: 7456955
Bug: 80410283
Test: lunch generic; m
Test: lunch full; m
Change-Id: I5448769433d09eaf970c4231874ced3261a5c66b
2018-07-09 11:00:24 +01:00
Steven Moreland
e2c90abd90 Merge "aidl: -ninja -> --ninja"
am: 9721ee965e

Change-Id: I9ac08d786f2055810f2fd8fef33139c9b49154b7
2018-07-06 17:24:51 -07:00
Treehugger Robot
9721ee965e Merge "aidl: -ninja -> --ninja" 2018-07-07 00:19:45 +00:00
Mathieu Chartier
f604a3d1cf Merge "Allow multiple profiles to be added as part of boot.prof"
am: a3010c60fe

Change-Id: I7a0c4770e1cd8fa94971bc3982f2b14cf1a1c553
2018-07-06 16:14:53 -07:00
Mathieu Chartier
a3010c60fe Merge "Allow multiple profiles to be added as part of boot.prof" 2018-07-06 23:03:23 +00:00
Steven Moreland
385442d399 aidl: -ninja -> --ninja
Bug: 110967839
Test: AIDL's runtests.sh
Change-Id: I785d39846a477c7edb91db477a0dfa046d823cbf
2018-07-06 11:35:09 -07:00
Anton Hansson
e5a5f00b9e Merge "Add documentation for module resolution."
am: ce0d4aa328

Change-Id: I85aa55b9985e91001e56088579a376f46d9d03e5
2018-07-05 09:43:36 -07:00
Anton Hansson
ce0d4aa328 Merge "Add documentation for module resolution." 2018-07-05 16:38:31 +00:00
Anton Hansson
eb3358cfa7 Add documentation for module resolution.
I found this in the CL description of
I5fda1a77f58814097b10b5ad2743ee25adfaecc4, and modified it slightly.

Bug: 111154853
Test: No
Change-Id: I984ac1a9521357af6b54340939dcde36988fc634
2018-07-05 16:31:33 +01:00
Dario Freni
37333682da Merge "Install /system/product apps odex in system-other."
am: 12e0e51116

Change-Id: I557c83122eb3d0bc894e479d645d353630075bb8
2018-07-05 05:30:18 -07:00
Shibin George
9dd9e680b9 Allow multiple profiles to be added as part of boot.prof
Extend PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION such that
multiple text-based profiles can be fed to profman to be included
in boot.prof

BUG: 70292748
Test: profman with --dump-only option shows that additional
      text-based profiles are also being read if they have
      been added to PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION

Change-Id: I8a6437a323e43b61612c67038abdde200607c513
2018-07-04 18:05:07 +00:00
Dario Freni
aa45068cc7 Install /system/product apps odex in system-other.
This will cause odex/vdex files for apps installed under
/system/product/{priv-,}app to be installed in system-other image, under
/system/product/{priv-,}app as well.

Test: m on marlin-userdebug target, analyzed
installed-files{,-system-other}.txt
Bug: 110072687

Change-Id: I63406f91acc3de4b4f142767e28d45308706c7da
2018-07-04 16:28:18 +01:00
David Brazdil
a94e4ca2c6 Make classes.jar the output of uninstallable Soong Java modules
The soong_java_prebuilt.mk file used to assume that if a Soong module
defines a dex jar, it is the output of the module and the module is
installable. This may now not be true if the module uses 'compile_dex'
to define a secondary build rule for a dex jar. If the module is not
installable (LOCAL_UNINSTALLABLE_MODULE=true), do not attempt to preopt
and copy classes.jar to the modules output destination.

Bug: 79409988
Test: on related CL
Change-Id: Ica958ac793e09a0e52125448b44e7cd36e7f35d5
2018-07-03 17:10:54 +01:00
David Brazdil
afb4d4cf8c Merge "Fix unzip on sdk_mac build"
am: 2986542f65

Change-Id: I422250d37866c56fed294a288bb1b7a8084372e8
2018-07-02 06:20:16 -07:00
David Brazdil
c06f48a21d Fix unzip on sdk_mac build
Recent CL added a flag to an unzip command which does not restore
the timestamps of extracted files. This is necessary because the
extracted files are the output of the rule and thus the timestamp
must be newer than the timestamp of the inputs.

Unfortunately, the sdk_mac build has an old version of UnZip (5.52
vs 6.0) which does not support the flag. Replace it with find|touch.

Test: m
Change-Id: Ib1f218af4547a1d604b46e68b6ef50d45cb91ee9
2018-07-02 11:19:53 +01:00
David Brazdil
dfd096870d Merge "Refactor hiddenapi rules to share common code"
am: 9b53066762

Change-Id: I2fc45e8d861aff3a2e4ab5ca6ccf1ba44bb29c6c
2018-06-29 04:40:17 -07:00
David Brazdil
9b53066762 Merge "Refactor hiddenapi rules to share common code" 2018-06-29 11:33:09 +00:00
David Brazdil
d9a9e981ce Merge "Adjust arguments of hiddenapi tool"
am: dadcb9ced2

Change-Id: I952877c22a547aacbe248e2411f5b2628a164133
2018-06-29 01:46:18 -07:00
David Brazdil
dadcb9ced2 Merge "Adjust arguments of hiddenapi tool" 2018-06-29 08:40:55 +00:00
Sundong Ahn
04d7ae2ff5 Merge "Support java sdk libraries"
am: 3dbb886cda

Change-Id: I7e61484fd12db60a7a18a4559b8ae38cb463eeef
2018-06-28 20:31:17 -07:00
Treehugger Robot
3dbb886cda Merge "Support java sdk libraries" 2018-06-29 02:51:43 +00:00
Ari Hausman-Cohen
eb5fccc98c Merge "Add PRODUCT_IOT support to soong."
am: 0d2436e372

Change-Id: I86fc1b9d5b92c713f93bb0efbfd0a6f556d8e9e4
2018-06-28 13:25:09 -07:00
Ari Hausman-Cohen
0d2436e372 Merge "Add PRODUCT_IOT support to soong." 2018-06-28 20:13:54 +00:00
David Brazdil
6b60b2151e Refactor hiddenapi rules to share common code
Java modules built with make and Soong currently invoke `hiddenapi`
with their own rules. Refactor the definitions so that Soong uses
make's definition. This will be useful for a subsequent CL which
needs to invoke `hiddenapi` on all boot dex files simultaneously.

Bug: 79409988
Test: m
Change-Id: I85105e650605d37c3ee8200d7f0d40c297756fcb
2018-06-28 18:14:30 +01:00
David Brazdil
57b1e546a0 Adjust arguments of hiddenapi tool
The `hiddenapi` build tool now expects the first argument to be
a command name. Change its build rule accordingly.

Bug: 79409988
Test: make
Change-Id: I7e34331c487f490d1de6a10c4139768e9774f03e
2018-06-28 18:14:30 +01:00
Ari Hausman-Cohen
271d861ab5 Add PRODUCT_IOT support to soong.
Some code needs to behave differently for Android Things
systems. PRODUCT_IOT tracks Android Things products.
This change exposes this variable into the soong system.

Bug: 110494430
Test: aosp_angler builds
Change-Id: Id9c27e4fe70957f217cfbdc019e8a37532bafac2
2018-06-27 16:52:51 -07:00
Pirama Arumuga Nainar
783c0bd833 Merge "Do not set entry-point for Windows"
am: 645b8db09a

Change-Id: Ia4982902151b800b58a3cfa488ccfddecb6aa662
2018-06-27 13:26:34 -07:00
Treehugger Robot
645b8db09a Merge "Do not set entry-point for Windows" 2018-06-27 20:22:23 +00:00
Pirama Arumuga Nainar
897b03f9ee Merge "Use $(my_prefix)OS instead of HOST_CROSS_OS"
am: 69af20f184

Change-Id: I9006ed1815f52f31a05ec9eb190672fc0d0b3da9
2018-06-27 13:14:30 -07:00
Pirama Arumuga Nainar
71b8769e5c Merge "Use $(my_prefix)OS instead of HOST_CROSS_OS"
am: 1caedd6bdc

Change-Id: Ic7d6fc7d44167e22c196de8275dc27c88e2f714a
2018-06-27 11:41:12 -07:00
Pirama Arumuga Nainar
b448834e96 Do not set entry-point for Windows
Bug: http://b/62424007

This breaks 64-bit Windows executables.  Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.

Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start.  (There are some failed tests, though).

Change-Id: I1dea9137c79c5f26b493640cfae0856c1a7ea301
2018-06-27 11:28:33 -07:00
Pirama Arumuga Nainar
060741e77d Use $(my_prefix)OS instead of HOST_CROSS_OS
The latter is not module-specific and affects all host modules.  Also
remove the check for LOCAL_IS_HOST_MODULE and use  $(my_prefix)OS.

This should be future-proof, where may use different configurations of
cross-compilations across Linux, Darwin, Windows.

Test: m native
Change-Id: I0a6255a8b83960ffb543b593d4a50d963be1de88
2018-06-27 10:37:54 -07:00
Pirama Arumuga Nainar
407b6aca28 Use $(my_prefix)OS instead of HOST_CROSS_OS
The latter is not module-specific and prevents santizer configuration
for all host modules.

Test: mma HOST_SANITIZE=address hardware/google/apf
Change-Id: I62a448973c1d6526e4b475f3288996e44c88fbc9
2018-06-27 09:42:33 -07:00
Pirama Arumuga Nainar
a743e206ef Merge "Do not enable sanitizers on Windows"
am: 0d53f4b12b

Change-Id: I96fde141a4d27c231947f65f3917da30a311b420
2018-06-26 17:05:24 -07:00
Pirama Arumuga Nainar
c6a3ddf834 Do not enable sanitizers on Windows
Bug: http://b/69933068

Test: m native-host-cross SANITIZE_HOST=address
Change-Id: I0b99797d218dc34d302906d704d991e59698c351
2018-06-26 14:18:14 -07:00
Nan Zhang
77a8b394ee Copy annotations.zip to out/target/common/obj/PACKAGING/
Test: m out/target/common/obj/PACKAGING/metalava-api-stubs-docs_annotations.zip
Bug: b/78245848
Change-Id: I283e046afb0c6e420d251e9c974835a4ec2fbad4
2018-06-26 13:25:18 -07:00
Pirama Arumuga Nainar
e1b1ea3d23 Merge "Disable lld for windows host modules"
am: 060c99c33e

Change-Id: I8f8ec58270d1f3e5eea596e379062c7fada802d7
2018-06-26 12:53:41 -07:00
Treehugger Robot
060c99c33e Merge "Disable lld for windows host modules" 2018-06-26 19:47:53 +00:00
Colin Cross
ce394e47fc Merge "Use pretty-error in prebuilt_internal.mk"
am: 7ef5d75009

Change-Id: I419950e64cee3baa24aba06a00affccd3d3b0567
2018-06-26 12:38:29 -07:00