Commit graph

1230 commits

Author SHA1 Message Date
Yifan Hong
2843e2e16f Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk"
am: df899f64d0

Change-Id: Icdf456afba7d366373311b292b1675c3cce6bf4c
2018-07-26 15:09:53 -07:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +00: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
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
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
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
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
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
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00: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
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
David Brazdil
dc39f73d5b Merge "Add singleton rule for hiddenapi list generation" 2018-07-12 21:34:54 +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
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
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
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
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
Colin Cross
bbbcf1c01e Merge "Disable standalone relocation packer"
am: effbc370dc

Change-Id: Ie72c24415f13f0960413f61d515b793ab780125a
2018-06-26 10:50:11 -07: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
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
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
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
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
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
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
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
Tom Cherry
03303f97be Verify init scripts for correctness during build
Bug: 36970783
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: Ia98793776b365733ca8f0174dc228326a6edf041
2018-06-14 14:21:06 -07:00
Colin Cross
b71570fc8c Merge "Revert "Revert "Remove desugar support""" am: 50ad8c97ac
am: 9f0e4a430f

Change-Id: I8ef7ec33394af7fd7afab4455f79a932ee774b92
2018-06-07 15:49:03 -07:00
Colin Cross
8bd764fc7a Merge "Revert "Remove desugar support"" am: bc965aa7a9
am: d175a15e0e

Change-Id: Ie7b75adc17b93d7a5dd6c288dcb3e7adc4b676df
2018-06-06 16:26:07 -07:00