Commit graph

17084 commits

Author SHA1 Message Date
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
Treehugger Robot
7ef5d75009 Merge "Use pretty-error in prebuilt_internal.mk" 2018-06-26 19:28:24 +00:00
Colin Cross
bbbcf1c01e Merge "Disable standalone relocation packer"
am: effbc370dc

Change-Id: Ie72c24415f13f0960413f61d515b793ab780125a
2018-06-26 10:50:11 -07:00
Colin Cross
effbc370dc Merge "Disable standalone relocation packer" 2018-06-26 17:40:57 +00:00
Chih-hung Hsieh
fb21c07d84 Merge "Filter out clang-tidy unknown arguments."
am: 875691cf89

Change-Id: I213cba2633df3d5de2ecc072ca4569f894c64ee8
2018-06-26 10:03:15 -07:00
Chih-hung Hsieh
875691cf89 Merge "Filter out clang-tidy unknown arguments." 2018-06-26 16:51:40 +00:00
Anton Hansson
a85fbdb83d Merge "Include PRODUCT_COPY_FILES in artifact check."
am: 31cd1263d4

Change-Id: I51e0d60a634ddbf9597b9797e7d8208930908bfb
2018-06-26 02:55:12 -07:00
Anton Hansson
31cd1263d4 Merge "Include PRODUCT_COPY_FILES in artifact check." 2018-06-26 09:29:54 +00:00
Doheon Lee
deb5a29934 Merge "Declare install path for product partition binaries"
am: 39deff9e50

Change-Id: Iec7178f6ece015d33afbf28fa19ca92adbc5d2b8
2018-06-25 18:45:59 -07:00
Treehugger Robot
39deff9e50 Merge "Declare install path for product partition binaries" 2018-06-26 01:37:59 +00:00
Colin Cross
84667699f0 Use pretty-error in prebuilt_internal.mk
Test: none
Change-Id: I191515d90b8f0f1fe2ac382b857d47ebe98db0d3
2018-06-26 00:38:17 +00:00
Colin Cross
979f9f9b18 Disable standalone relocation packer
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer.  Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.

This will also prevent relocation packing on prebuilt shared
libraries.

Also enables relocation packing on Darwin since lld will work on
Darwin.

Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
2018-06-26 00:35:46 +00:00
Nelson Li
f6cfd5e360 Merge "Revert "Revert "Build System: Validate AndroidTest.xml Configs"""
am: d3ef2822cc

Change-Id: Id57e37bd69958c9e6cfc178414ef9a5a84842d25
2018-06-25 17:30:59 -07:00
Treehugger Robot
d3ef2822cc Merge "Revert "Revert "Build System: Validate AndroidTest.xml Configs""" 2018-06-26 00:24:50 +00:00
Pirama Arumuga Nainar
b66f9e6f91 Disable lld for windows host modules
Bug: http://b/69933068
Bug: http://b/110800681

lld cannot link Android's Windows modules yet

Test: m native-host-cross
Change-Id: I4945e5f84637443195294e575be8ebbe871d32b5
2018-06-25 16:02:08 -07:00
Colin Cross
e9381754b4 Make USE_D8 and USE_R8 read-only
Confusion between LOCAL_USE_R8 and USE_R8 caused USE_R8 := false
to be set in an Android.mk file, which changed the behavior of
half of the build.  Make USE_R8 and USE_D8 read-only to prevent
it from happening again.

Test: m checkbuild
Bug: 110033958
Change-Id: I09a8fbf3d7f8e4b3f0cb3de538870f925d5d0abe
2018-06-25 14:18:42 -07:00
Chih-Hung Hsieh
b02e447775 Filter out clang-tidy unknown arguments.
Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I77cd5dec834215fa22742eae6d96aabecadd11ab
2018-06-25 13:49:36 -07:00
Anton Hansson
c0655eb042 Include PRODUCT_COPY_FILES in artifact check.
The product-installed-files macro is not really thorough - it only
includes packages, but not other files which are included as part of
the build. Extend it to also include PRODUCT_COPY_FILES.

Bug: 80410283
Test: downstream CL
Change-Id: I803c7a59e695c226fa413fa1602ec315ef9886a8
2018-06-25 19:17:42 +01:00
Nelson Li
a2a8b9ba11 Revert "Revert "Build System: Validate AndroidTest.xml Configs""
This reverts commit 054f210fd5.

Reason for revert: Revert it again since BUG of 109736180 already be fixed.
                   Local verified for different build targets of
                   walleye_coverage-userdebug, marlin_coverage-userdebug
                   and make sure they can build pass.
BUG: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test

BUG: 73082610
Test: cd packages/apps/DocumentsUI/tests/; mma
      Modify AndroidTest.xml to a not well-formed xml; mma
      Then, it should build fail.
      atest -v DocumentsUITests

Change-Id: Iadfcb28a4e3f685a66697de21f57ca5bdb8b7c9e
2018-06-25 06:03:41 +00:00
Doheon Lee
09d9b90625 Declare install path for product partition binaries
Build system will install binaries to product partition path when build
scripts specify module's install path to product partition.
To supports that, TARGET_OUT_PRODUCT_EXECUTABLES for primary and
secondary ABI path should be declared.

Bug: 110745956
Test: Set LOCAL_PRODUCT_MODULE to true in Android.mk or set product to
true in Android.bp file.

Change-Id: Ib8a491364ee30e49bb327163974661915e183608
2018-06-25 03:28:04 +00:00
Yifan Hong
6423900f83 Merge "Add BOARD_SUPER_PARTITION_*"
am: 254bd9a10a

Change-Id: Iada0cb6fe92ecf090a3c37bb3bd73335a2e63a8c
2018-06-22 16:40:15 -07:00
Treehugger Robot
254bd9a10a Merge "Add BOARD_SUPER_PARTITION_*" 2018-06-22 23:33:14 +00:00
Yifan Hong
bb42f7d655 Merge changes from topic "board_partition_reserved_size"
am: 3967e0eb99

Change-Id: I767967f1086ec303c63199d0e38ec02dedf09152
2018-06-22 13:25:18 -07:00
Treehugger Robot
3967e0eb99 Merge changes from topic "board_partition_reserved_size"
* changes:
  build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
  build_image.py recognize BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
2018-06-22 20:10:47 +00:00
Yifan Hong
74d07ff8bd Add BOARD_SUPER_PARTITION_*
Test: builds
Test: build with BOARD_SUPER_PARTITION_SIZE and
      BOARD_SUPER_PARTITION_PARTITION_LIST defined

Bug: 79106666

Change-Id: Ifcd50ecab22ef096ff1eb386f8d87e16fffdcf5e
2018-06-22 10:25:54 -07:00
Yifan Hong
749062d379 build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
Test: `make vendorimage`

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make vendorimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_VENDORIMAGE_PARTITION_SIZE
    build succeeds.

Bug: 79106666

Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
2018-06-22 10:25:54 -07:00
Yifan Hong
bbcba1e353 build_image.py recognize BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
- Copy "use_logical_partitions" to *_image_info.txt before sending
  it to build_image.py, so that the script can use this variable.

- build_image.py emits an additional properties file to inform
  the build system about the system image size.

Test: `make systemimage`

Test: `make systemimage` with the following:
    - install a large file to system image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make systemimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_SYSTEMIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make systemimage` with the following:
    - install a large file to system image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_SYSTEMIMAGE_PARTITION_SIZE
    build succeeds.

Test: same for systemotherimage

Bug: 79106666

Change-Id: I574062882acd1ecd633ac38c5a8c5351b90a32d8
2018-06-22 10:25:54 -07:00
Colin Cross
c0071808da Merge "Always use OpenJDK9 for building"
am: 12eafb61b0

Change-Id: Iec1529983659c3c966b32c384c337d6db5144766
2018-06-21 14:56:35 -07:00
Colin Cross
12eafb61b0 Merge "Always use OpenJDK9 for building" 2018-06-21 21:27:16 +00:00
Colin Cross
2e51d73d2b Merge "Run ErrorProne in OpenJDK9"
am: 264bc07791

Change-Id: I3ce7202cdcfd3e86fbccb359f56ca59581855a04
2018-06-21 13:57:20 -07:00
Colin Cross
264bc07791 Merge "Run ErrorProne in OpenJDK9" 2018-06-21 20:47:41 +00:00
Tom Cherry
281d343dfb Merge "Reland: Verify init scripts for correctness during build"
am: bdaaab2e39

Change-Id: Ia0cdc6067e357e97ab88b1dd2690358ead4edd18
2018-06-21 13:12:54 -07:00
Treehugger Robot
bdaaab2e39 Merge "Reland: Verify init scripts for correctness during build" 2018-06-21 20:01:50 +00:00
Dan Willemsen
a6e1fadea5 Merge changes from topics "deprecate_export", "add_build_broken"
am: 08015aa03b

Change-Id: I3f22f431acdcd233ddd73a248eb510d55a9a194e
2018-06-21 12:32:14 -07:00
Colin Cross
1588c0ee57 Always use OpenJDK9 for building
Remove support for compiling with javac from OpenJDK8.
We still target 1.8 by default, and OpenJDK8 prebuilts are still
required for the bootclasspath and running robolectric.

Bug: 38418220
Test: m java
Change-Id: I6f178f73b42331494fadcc25a62a5475656b873e
2018-06-21 12:22:37 -07:00
Dan Willemsen
08015aa03b Merge changes from topics "deprecate_export", "add_build_broken"
* changes:
  Mark export/unexport as deprecated
  Add more BUILD_BROKEN_* logic
2018-06-21 19:19:51 +00:00
allenhair
2e627d5e7d Merge "Distribute XML formatted API files as part of the coverage build."
am: f2365aa2c5

Change-Id: I91c661d74e617f17553f27a39cb32496dd5acf4c
2018-06-21 11:52:01 -07:00
allenhair
f2365aa2c5 Merge "Distribute XML formatted API files as part of the coverage build." 2018-06-21 18:33:25 +00:00
Tom Cherry
fc97764dd5 Reland: Verify init scripts for correctness during build
Relanding with change to not run on the darwin build since host init
verifier is not possible there.

Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
      PRODUCT_COPY_FILES, or TARGET_PREBUILT

Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442
2018-06-21 11:16:25 -07:00
Dan Willemsen
8b9c3cc54b Mark export/unexport as deprecated
Make it so that `export`/`unexport` are deprecated during product
configuration, but obsolete during Android.mk parsing (and later in the
build, since we can't un-obsolete it).

Remove some ccache / goma exports, those don't need to be exports, since
soong_ui asks about them explicitly. They also only run doing the
initial project configuration, so we don't run anything with that
environment.

Bug: 73959648
Test: m nothing
Test: build_test on all downstream branches
Change-Id: I55a749f46775660439ae57e881a02c914e83de16
2018-06-21 10:12:23 -07:00
Dan Willemsen
94bff7ae22 Add more BUILD_BROKEN_* logic
Make the values tristate, so that we can differentiate set vs not in
scripts that parse the logs.

Also add some placeholders for warnings that I expect to turn into
errors.

Test: Set BUILD_BROKEN_PHONY_TARGETS to "foo"
Change-Id: I3f7e1e0f85dcef84d6461fc40bdd83dc5bf75ff7
2018-06-21 10:12:23 -07:00
TreeHugger Robot
8d49943c20 Merge "apidiff: Depend on timestamp file instead of phony target" into stage-aosp-master 2018-06-21 05:03:16 +00:00
Dan Willemsen
45883d45ec Merge "Deprecate implicit make rules"
am: 6d3acda913

Change-Id: Ic04398750a692d3bbae34b78420d61c6e5ee2356
2018-06-20 21:13:33 -07:00
Treehugger Robot
6d3acda913 Merge "Deprecate implicit make rules" 2018-06-21 03:31:11 +00:00
Dan Willemsen
8f607e31fa apidiff: Depend on timestamp file instead of phony target
Instead of $(LOCAL_MODULE)-docs, use $(call
doc-timestamp-for,$(LOCAL_MODULE)), which is how the *-docs targets are
generated in droiddoc.mk

Test: m offline-sdk-referenceonly-diff
Change-Id: I1e5ee3b819c0e836089fac236e977642067d148a
2018-06-21 02:14:36 +00:00
Colin Cross
e46727a2ba Run ErrorProne in OpenJDK9
Run ErrorProne as a processor in javac from OpenJDK9.

Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
2018-06-20 18:49:50 -07:00
Dan Willemsen
62db0f0945 Deprecate implicit make rules
Test: mm
Test: view docs in gitiles
Change-Id: I1ced4b4218c733b5b5b771d626b20eb6fb22f0df
2018-06-20 16:52:10 -07:00
Colin Cross
375d9618f6 Merge "Merge LOCAL_STATIC_ANDROID_LIBRARIES manifests" 2018-06-20 23:24:52 +00:00
Colin Cross
fd52b25254 Merge "Merge LOCAL_STATIC_ANDROID_LIBRARIES manifests" into stage-aosp-master 2018-06-20 23:24:05 +00:00
Yifan Hong
d76c44b72f Merge "Revert "Verify init scripts for correctness during build""
am: 560890b29f

Change-Id: I5f69d68b9b604ba76a5bf4fa0a9fd453f62ccde6
2018-06-20 16:03:47 -07:00
Yifan Hong
560890b29f Merge "Revert "Verify init scripts for correctness during build"" 2018-06-20 22:56:39 +00:00
Tom Cherry
d15e50022f Revert "Verify init scripts for correctness during build"
This reverts commit 03303f97be.

Reason for revert: Mac build

Change-Id: Iadd76491307534fde81d3d917876c603a0658fb9
2018-06-20 22:45:14 +00:00
Allen Hair
906da1b5df Distribute XML formatted API files as part of the coverage build.
Bug: 110485176
Test: m -j32 droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests
Change-Id: I151afde05de832cab06421ffe0829f07e60aceb8
2018-06-20 14:59:57 -07:00
Colin Cross
8e92179552 Merge LOCAL_STATIC_ANDROID_LIBRARIES manifests
Pass LOCAL_STATIC_ANDROID_LIBRARIES to ManifestMerger, and copy
manifests for prebuilts AARs and static android libraries to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.

Bug: 78447299
Test: m java
Change-Id: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: I02ac29d3445fcd591101ff0ce215e60dd0997224
(cherry picked from commit 1c87e71e84)
2018-06-20 21:06:44 +00:00
Tom Cherry
cd7535c00d Merge "Verify init scripts for correctness during build"
am: 8075746865

Change-Id: I96b7f88a3e568e147c3e3f68709e4c7eb3b525c6
2018-06-20 10:09:01 -07:00
Tom Cherry
8075746865 Merge "Verify init scripts for correctness during build" 2018-06-20 17:06:11 +00:00
Dan Willemsen
4f38769dd0 Merge "Fix UML build"
am: d7c3dd8a0d

Change-Id: I0bc90244c42a00a96c0d0ea208225771d28f4bfa
2018-06-20 10:02:27 -07:00
Jiyong Park
56be041198 Merge "Export SDK library names"
am: dabf1a0c5a

Change-Id: Iad2365d9bb02de297dd06cd2bc36c288a043dfc2
2018-06-20 01:14:56 -07:00
Dan Willemsen
406418d055 Fix UML build
If there aren't any boot dex files, we can't generate a boot image
profile.

Test: lunch uml-eng; m
Test: diff build-aosp_arm.ninja
Change-Id: I09cc1ef37379d9d353958c8aa75731f3d29df759
2018-06-19 23:03:34 -07:00
Jiyong Park
1cf8ee619b Export SDK library names
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.

The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.

Bug: 77575606
Test: m -j

Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
2018-06-20 11:50:06 +09:00
Dan Willemsen
faad18291a Merge changes I101ced40,If9a4bed2
am: 949404a65b

Change-Id: I5f8f5a0b4921f54253d73d0c893a9f326ebded09
2018-06-19 13:42:23 -07:00
Dan Willemsen
949404a65b Merge changes I101ced40,If9a4bed2
* changes:
  Fix PHONY uses found by --warn_real_to_phony
  Fix vndk packaging to stop depending on phony targets
2018-06-19 20:35:57 +00:00
Vishwath Mohan
969a880b2f Merge "Add Scudo support for Make"
am: ab0c76c869

Change-Id: I722875707223675672a59c644f330cb94f2f6576
2018-06-19 13:12:40 -07:00
Colin Cross
4b96d34443 Merge "Revert "Revert "Inject minSdkVersion from the build system"""
am: aac18a02d9

Change-Id: I8ee10eb6a2fde98b34bb7d3fd74df4a88ab25892
2018-06-19 13:06:41 -07:00
Vishwath Mohan
ab0c76c869 Merge "Add Scudo support for Make" 2018-06-19 19:09:56 +00:00
Colin Cross
aac18a02d9 Merge "Revert "Revert "Inject minSdkVersion from the build system""" 2018-06-19 18:14:39 +00:00
Kostya Kortchinsky
2cfa99722b Add Scudo support for Make
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.

This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.

Test: aosp compiled with m -j
Test: local experiment with LOCAL_SANITIZE := scudo to ensure that a test
target (mediaserver) could be linked with scudo.

Change-Id: I462843b9d5512fba2c4a3ac1a0c356ca90bce4e5
2018-06-19 09:46:35 -07:00
Dan Willemsen
14e1026372 Fix PHONY uses found by --warn_real_to_phony
Switch a use of `ndk` to the timestamp file that `ndk` depends on
itself.

Mark more module-specific rules as PHONY.

Test: diff build-aosp_arm.ninja (stripping _kati_always_build_)
Test: Turn on --warn_real_to_phony for Kati, see fewer warnings
Change-Id: I101ced4067780e38d18820f5d916596429087e49
2018-06-19 09:26:58 -07:00
Dan Willemsen
649311868c Fix vndk packaging to stop depending on phony targets
These had been depending on the phony target for the library
(liblz4.vendor), not the actual built file and notice file.

Since we hadn't been saving the NOTICE file, and were only assuming the
installed notice file path. save that away for use during packaging.

Test: m vndk; diff out/target/product/generic/android-vndk-aosp_arm.zip
Test: m vndk; diff out/target/product/generic_arm64/android-vndk-aosp_arm64.zip
Change-Id: If9a4bed27030b7bd464cd3987739df94d32a0037
2018-06-19 09:26:58 -07:00
nelsonli
be3c2116cd Merge "Build System: fix autogen_test_config problem"
am: 2a07d562ac

Change-Id: Ic912fce62033b9d7b59c0b92630fc2206d9f3c77
2018-06-18 18:19:13 -07:00
Treehugger Robot
2a07d562ac Merge "Build System: fix autogen_test_config problem" 2018-06-19 01:09:17 +00:00
Sundong Ahn
a059c71348 Support java sdk libraries
Sdk addon has been allowed for libraries built with Android.mk. But some
of the libraries included in the Sdk addon should be built with
java_sdk_library. module-stubs-files function is modified for supporting
java_sdk_library modules.

Bug:77577799
Test: make -j
Change-Id: If289e5aa5b5016901ff9b69da8fc7f7d8138a456
2018-06-19 10:02:25 +09:00