Commit graph

42071 commits

Author SHA1 Message Date
android-build-prod (mdb)
570881ef0d Merge "Accept TARGET_DEVICE_DIR preserved from previous product load"
am: 79babfacaa

Change-Id: I1d304d64e7c525faa68d817777d17950697eed30
2018-05-02 10:47:26 -07:00
android-build-prod (mdb)
79babfacaa Merge "Accept TARGET_DEVICE_DIR preserved from previous product load" 2018-05-02 17:35:34 +00:00
android-build-prod (mdb)
919957ef3b Merge "Adding Q entries to version_defaults.mk"
am: fc8e281bc3

Change-Id: I919d3d7cd3567f2cafc815cc3e0e23734a77ad5f
2018-05-02 08:38:39 -07:00
android-build-prod (mdb)
fc8e281bc3 Merge "Adding Q entries to version_defaults.mk" 2018-05-02 15:27:50 +00:00
Anton Hansson
20da4aa253 Merge "Forbid depending directly on SDK modules."
am: efd6084996

Change-Id: Ic18f74147d8cf268a3fa3ca88f7fa8f8ee998b8a
2018-05-02 07:15:48 -07:00
Anton Hansson
efd6084996 Merge "Forbid depending directly on SDK modules." 2018-05-02 14:02:52 +00:00
Anton Hansson
9d030609e5 Forbid depending directly on SDK modules.
They should be depended on by specifying LOCAL_SDK_VERSION. Depending
on them directly makes it difficult to rename or modify these targets,
as I've found when working on b/77525052.

This list can be further extended to other libraries that should not
be depended on directly.

Bug: b/77525052
Test: make
Change-Id: I911bcc8a5a90995b3607599388dc6119eb88ea96
2018-05-02 15:02:09 +01:00
Ian Pedowitz
8eb8ec88f5 Adding Q entries to version_defaults.mk
Bug: 77589980
Test: Build
Change-Id: Ic96cfae559143bd0d985663cbe58e09619978c97
Merged-In: Ic83304d326121326f380afca8fdf466ecc0781b0
Merged-In: I1ccbfdeddb2eecb6342253e401bba118c3652f8d
2018-05-02 13:51:24 +00:00
android-build-prod (mdb)
48a7199b68 Merge "Use AndroidProducts.mk list from Soong's finder"
am: 7ae1713dca

Change-Id: I7841a44db84f76b9c2eeb3e527481bee25ed2f8a
2018-05-02 01:36:18 -07:00
android-build-prod (mdb)
7ae1713dca Merge "Use AndroidProducts.mk list from Soong's finder" 2018-05-02 08:27:24 +00:00
Dan Willemsen
92afd7d1e7 Accept TARGET_DEVICE_DIR preserved from previous product load
During a build, we load product configuration three different times --
to dump some initial variables, when parsing the CleanSpec.mk files, and
again when we parse the Android.mk files.

The BoardConfig.mk find commands use -path, which isn't supported by the
Kati find optimizer, so we end up spending ~125ms in each of the above
cases (on my machine, internal master -- aosp is closer to 30ms).

Instead, do the search during the initial dumping of variables, and pass
in TARGET_DEVICE_DIR into the later runs, using that to load the
BoardConfig.mk file.

Bug: 78020936
Test: out/build-taimen.ninja is identical
Test: out/soong.log shows that we're not running these finds again
Change-Id: I6f186e1879aa362528b48b8a00be3f7a9f88bfc5
2018-05-02 00:15:41 -07:00
Dan Willemsen
b9d63519c0 Use AndroidProducts.mk list from Soong's finder
This saves ~300ms from get_build_var on our internal tree (1.3s ->
1.0s). On AOSP, it only saves ~60ms (0.60s -> 0.54s).

It's also ran during lunch, and twice during every build (though the
second time it was run with Kati's find emulator, which significantly
reduces the overhead).

Bug: 78020936
Test: diff out/.module_paths/AndroidProducts.mk.list with existing find
      results
Change-Id: I195b2840854122e41275e24e886ca8c8cda13dac
2018-05-01 22:56:07 -07:00
android-build-prod (mdb)
2ce6bcd1b2 Merge "Speed up a slow find command"
am: 88727e2422

Change-Id: I4abb93c4693edf2e37b16f95cc0d42399ba7a94c
2018-05-01 22:55:37 -07:00
android-build-prod (mdb)
88727e2422 Merge "Speed up a slow find command" 2018-05-02 05:48:37 +00:00
Dan Willemsen
60c6644932 Speed up a slow find command
find .... -name oem\*.prop

Kati can't emulate this command -- it can't currently handle backslashes
in the middle of an argument, only at the beginning or end. So this
falls back to actually calling find, which can take a few seconds if
you've got a large vendor tree. Just switch all of these over to quoted
arguments instead of escaping the *.

Bug: 78020936
Test: Check out/soong.log for timing info
Test: out/build-taimen.ninja is identical
Change-Id: Ifde75948f677ad95107d9419a462649024f544b8
2018-05-01 21:15:35 -07:00
android-build-prod (mdb)
ddb7eb9544 Merge "Allow PRODUCT_COPY_FILES to copy raw APKs into system_other"
am: b113a94d09

Change-Id: I4e07d3f2f17acfd991cf5f5ef7878447390114c3
2018-05-01 20:46:44 -07:00
android-build-prod (mdb)
b113a94d09 Merge "Allow PRODUCT_COPY_FILES to copy raw APKs into system_other" 2018-05-02 03:40:48 +00:00
Dan Willemsen
7d957c911a Allow PRODUCT_COPY_FILES to copy raw APKs into system_other
Files in this partition aren't actually installed, so we don't need to
use the BUILD_PREBUILT logic for APKs.

Bug: 66960479
Test: try PRODUCT_COPY_FILES of an apk into system, errors
Test: try PRODUCT_COPY_FILES of an apk into system_other, accepted
Change-Id: Ie721d2b884c6badfbe0e46f55c265b770bed618b
2018-05-01 19:02:11 -07:00
android-build-prod (mdb)
43b310f301 Merge "Allow Soong to export multiple proguard flags files"
am: 36bf0df48f

Change-Id: If220f5ff46aec61971e40e3097b5a6d2d1a9bc0d
2018-04-30 18:18:42 -07:00
android-build-prod (mdb)
8303590165 Merge changes from topic "java_sdk_library"
am: e8c3dfd945

Change-Id: I6eca5f3903e0743df185d15320ef74a0e222cd3f
2018-04-30 18:17:25 -07:00
android-build-prod (mdb)
36bf0df48f Merge "Allow Soong to export multiple proguard flags files" 2018-05-01 01:07:24 +00:00
android-build-prod (mdb)
e8c3dfd945 Merge changes from topic "java_sdk_library"
* changes:
  sdk lib name can be in LOCAL_[STATIC_]JAVA_LIBRARIES
  java_sdk_library supports test as another API scope
  Support LOCAL_SDK_LIBRARIES for "current" builds.
2018-05-01 01:04:56 +00:00
Jiyong Park
cd06fe34e0 sdk lib name can be in LOCAL_[STATIC_]JAVA_LIBRARIES
When an sdk lib name (a module defined with java_sdk_library{...}) is
listed in LOCAL_JAVA_LIBRARIES or LOCAL_STATIC_JAVA_LIBRARIES, the name
is translated to the stubs lib name of the sdk lib.

We have to support this at least until all existing references to sdk
libs are all correctly converted to LOCAL_SDK_LIBRARIES.

Bug: 77575606
Test: m -j
Change-Id: I8cff668afd6b5f265cc7ae6fe6f5fa36b76b8334
2018-05-01 09:32:11 +09:00
Jiyong Park
6023db8844 java_sdk_library supports test as another API scope
When a module built with LOCAL_SDK_VERSION := test_current, then
it is linked against test variant of the sdk stubs library.

Bug: 77575606
Test: m -j
Change-Id: I08ce120d8e4774722a95bfc4e200ad7d123abc70
2018-05-01 09:32:01 +09:00
Colin Cross
42669e6dc7 Allow Soong to export multiple proguard flags files
Soong uses lists of proguard flags files from dependencies instead
of a single concatenated file.  Allow Soong to pass the list to
make, which will concatenate it.

Move the check inside ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
in case Soong exports an Android library with an empty
LOCAL_SOONG_EXPORT_PROGUARD_FLAGS.

Bug: 73724997
Test: m checkbuild
Change-Id: Ia8f229ec5f9fc99a23bd471dfa70c9de7316de94
2018-04-30 16:03:57 -07:00
Anton Hansson
8ae30017e9 Support LOCAL_SDK_LIBRARIES for "current" builds.
Resolve these using the naming scheme from sdk_library.go, added
in I4a4ccf6e730e041703c63bb275d8860d0de96887.

Also re-write the LOCAL_SDK_VERSION logic, as it was becoming a
real mess.

Bug: 77575476
Test: With uiautomator in a follow-on CL
Change-Id: I11bd10c02df3d458a4ed6de90114e27fabe8d9e0
2018-04-30 23:06:57 +01:00
Calin Juravle
ba7e18f86d Merge changes Ieb738670,I2e2f9da1,I13c6b389
am: 12f1850261

Change-Id: I1973c17f0adce96e3ea2e3ab57fc816deba4bdbe
2018-04-30 15:01:54 -07:00
Calin Juravle
12f1850261 Merge changes Ieb738670,I2e2f9da1,I13c6b389
* changes:
  Pass --dex-location when processing prebuilt profiles
  Fix speed-profile compilation for prebuilds
  Update profile rules to support binary profiles
2018-04-30 21:13:33 +00:00
Calin Juravle
c644651517 Pass --dex-location when processing prebuilt profiles
The apk name does not match the install location at the stage we are
processing profiles. This causes the wrong profile key to be used in the
final profile which may generate an empty app image.

Test: m; flash, dumpsys dexopt and check for speed-profile
      check that the app image is not empty
Bug: 78515726

(cherry picked from commit 60216615f4)

Merged-In: Ic5d71296583be71d96f0e7a2dd59753f1d23c350
Change-Id: Ieb7386701b631d53d452336d1ad22653e4daee42
2018-04-30 12:14:09 -07:00
Calin Juravle
62c2893849 Fix speed-profile compilation for prebuilds
We were testing the wrong variable when setting the dex2oat flags

Test: m; flash, dumpsys dexopt and check for speed-profile
Bug: 78515726

(cherry picked from commit 7d701355e9)

Merged-In: I57c0e11aab2e4879c3ba3b2851f356b5864f5da9
Change-Id: I2e2f9da1dc9ed71977ec1d698433674c731f78bc
2018-04-30 12:09:27 -07:00
Calin Juravle
8faa2ec0d8 Update profile rules to support binary profiles
Use full binary profiles instead or relying on text-based profiles. This
makes it easier to import actual profiles and do not require two rounds of
transformation.

Text based profiled probably didn't help too much anyway because if the
apps are updated the proguard names will change.

Modules are still free to define a text based profile using
LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING. This is used for frameworks jars.

Test: make
Bug: 73313191

(cherry picked from commit f99ab7580f)

Merged-In: Ifd23dde21559fbcd015020905052bc588e275356
Change-Id: I13c6b3891cbf1232f1f07d0a17f019257f7118e6
2018-04-30 12:08:51 -07:00
Calin Juravle
504421db5b Merge "Remove profman --skip-apk-verification flag"
am: 7d8b84717f

Change-Id: I5ed258da4fddf64211b1e552d5764e25bbc1f876
2018-04-30 11:46:43 -07:00
Calin Juravle
7d8b84717f Merge "Remove profman --skip-apk-verification flag" 2018-04-30 18:29:20 +00:00
Anton Hansson
636d569336 Merge "Update make rules to use new android.jar location."
am: a22472315f

Change-Id: I90f42f1def27f718c5404b3bf77e01833f2a7206
2018-04-30 05:25:41 -07:00
Anton Hansson
a22472315f Merge "Update make rules to use new android.jar location." 2018-04-30 12:15:37 +00:00
Calin Juravle
25ef4c018a Remove profman --skip-apk-verification flag
This happens by default now.

Test: make
Bug: 73313191
Change-Id: I5cc0efb656e1b44a161420c49250640bc9d702c5
2018-04-27 17:23:12 -07:00
android-build-prod (mdb)
401da96dae Merge "Revert "Support regenerating partition table with bpttool in sign_target_files_apks""
am: f45bf2d59f

Change-Id: I625c3f9269fc7fe06056ff4476238b1705f4a083
2018-04-27 13:49:07 -07:00
android-build-prod (mdb)
f45bf2d59f Merge "Revert "Support regenerating partition table with bpttool in sign_target_files_apks"" 2018-04-27 20:38:57 +00:00
Bryan Henry
7febcdf75f Revert "Support regenerating partition table with bpttool in sign_target_files_apks"
This reverts commit 2a40cc6996.

Reason for revert: Broke a bunch of builds, platform/system/tools/bpt must be missing from more manifests.

Change-Id: I4c367a1fec5c62c247544227e9d3b596227e31da
2018-04-27 19:02:51 +00:00
Bryan Henry
f5c481aee9 Merge changes from topic "sign_target_files_iot-aosp"
am: dde5f11e6a

Change-Id: Ic4aaf81bf713080d89449b1676266365ab8cef13
2018-04-27 11:13:36 -07:00
Bryan Henry
dde5f11e6a Merge changes from topic "sign_target_files_iot-aosp"
* changes:
  Write combined bpt definition directly into META/partition-table.bpt
  Support regenerating partition table with bpttool in sign_target_files_apks
  Don't suppress stderr for 'avbtool make_vbmeta_image'
  Include default Android Things AVB keys in otatools.zip
2018-04-27 18:01:09 +00:00
Anton Hansson
66d47b884e Update make rules to use new android.jar location.
This file has been copied into a 'public' subdir. Use that, so that
the old file can be deleted. Also introduce a new macro to avoid
duplicating this path in a bunch of places.

Bug: 77525052
Test: m checkbuild
Change-Id: Ifcf59c6fb357769b2765e417c8dd56d2ad9b97aa
2018-04-27 16:39:44 +01:00
Bryan Henry
f130a239a1 Write combined bpt definition directly into META/partition-table.bpt
...instead of copying from IMAGES/partition-table.bpt during
sign_target_files_apks. This addresses a comment on go/oag/665565, but
is done as a separate change so that it can be cherry-picked later (or
not at all) to downstream branches to avoid breaking signing of existing
target-files zips.

Bug: 72837107
Test: Local sign_target_files_apks run of locally built target-files
Change-Id: Id14c859eefe075fc56b15869f2f21c570eb07e65
2018-04-26 12:43:27 -07:00
Bryan Henry
2a40cc6996 Support regenerating partition table with bpttool in sign_target_files_apks
For Android Things targets (or any other target which has
BOARD_BPT_INPUT_FILES defined), add_img_to_target_files will generate a
partition-table.img using bpttool. It also adds the final combined .bpt
definition file into target-files in IMAGES/partition-table.bpt.

When we're signing using sign_target_files_apks, add_img_to_target_files
needs to regenerate the partition table, but META/misc_info.txt still
contains the original list of bpt input files from the build that aren't
available. This change extracts the final bpt from the input
target-files, adds it to META/ in the output target-files, and then
updates the board_bpt_input_files property to point to it.

Bug: 72837107
Test: Local sign_target_files_apks run of locally built target-files
Change-Id: Id79125208f31c78b1ac2079172f9c91a9203849b
2018-04-26 12:42:59 -07:00
Bryan Henry
69d3feb23a Don't suppress stderr for 'avbtool make_vbmeta_image'
Output is useful for debugging.

Bug: 72837107
Test: Local sign_target_files_apks run of locally built target-files
Change-Id: I5c27fcc86fa3a51080e0502eb8f5f01a40b033c3
2018-04-26 12:42:40 -07:00
Bryan Henry
97f21ac01c Include default Android Things AVB keys in otatools.zip
Android Things has an extension on AVB and thus uses different test
keys, along with a public key metadata file. See external/avb/README.md.

Bug: 72837107
Test: Local sign_target_files_apks run of locally built target-files
Change-Id: I769e09a971b9b6b2c9cb0f3272f756b1857eb286
2018-04-26 12:42:34 -07:00
Logan Chien
361e29936c Merge "Add .vendor to LOCAL_REQUIRED_MODULES for vendor"
am: 5f7e4f6bbf

Change-Id: I14ca4e78e5e387e2eca6b0a590ab635132e7b91e
2018-04-25 16:56:54 -07:00
Logan Chien
5f7e4f6bbf Merge "Add .vendor to LOCAL_REQUIRED_MODULES for vendor" 2018-04-25 23:46:28 +00:00
Chih-hung Hsieh
2371c3f08a Merge "Disable LLD for Darwin host executables."
am: 29adef4ec2

Change-Id: I9ecbd4b6a062f1a9d6cf5014ce1a65a51464d17c
2018-04-24 23:38:00 -07:00
Chih-hung Hsieh
29adef4ec2 Merge "Disable LLD for Darwin host executables." 2018-04-25 06:30:59 +00:00