Commit graph

15271 commits

Author SHA1 Message Date
Anton Hansson
a1dc661f71 Merge "Move apicheck.mk off SRC_API_DIR." 2018-05-03 13:18:25 +00:00
Steven Moreland
de511491b7 Merge changes from topic "vintf_fragment"
* changes:
  Add verify_vintf_matrices.
  rename BUILT_SYSTEM_{COMPATIBILITY_,}MATRIX
2018-05-03 01:17:53 +00:00
Steven Moreland
627debe1d7 Add verify_vintf_matrices.
Modules declare 'vintf_fragments' much like
they declare 'rc_file'. These are verified
in mass during a device build.

Test: `m` can cause verify_vintf_matrices to
    pass or fail.
Test: build OTA package and check to make sure it
    contains the correct assembled matrices.
Bug: 66917623

Change-Id: I504985100069456a0ca4d0180387d271bb283d49
2018-05-02 15:34:36 -07:00
Colin Cross
b0d0ca38cc Merge "Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES" 2018-05-02 21:51:10 +00:00
Colin Cross
43c247e181 Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES
If a static android library lib1 has LOCAL_STATIC_ANDROID_LIBRARIES
lib2, then the R.class files for packages in lib2 will be merged
into the jar for lib1.  If an app has lib1 in its
LOCAL_STATIC_ANDROID_LIBRARIES it will get the R.class files from
lib2 through lib1, instead of regenerating the R.java files with
numbering that matches the resource table of the app.

This was worked around for support libraries by keeping a
fix_dependencies.mk that added transitive static support libraries
to the direct static dependencies of apps.  Instead, propagate
the packages that aapt2 generated R.java files for up as
--extra-packages arguments to the next aapt2 invocation, which
will force aapt2 to regenerate the R.java files for those packages.

Bug: 78300023
Test: m checkbuild
Change-Id: I7375e13241b4c4f2933032409fb7935abe133bfc
2018-05-02 13:11:08 -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)
fc8e281bc3 Merge "Adding Q entries to version_defaults.mk" 2018-05-02 15:27:50 +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)
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)
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
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
Steven Moreland
42a0afc12d rename BUILT_SYSTEM_{COMPATIBILITY_,}MATRIX
To be consistent with BUILT_VENDOR_MATRIX.

Bug: 78943004
Test: manual
Change-Id: I2811647798322165182b7c90bb4937d93580833c
2018-05-01 18:37:02 -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
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
7d8b84717f Merge "Remove profman --skip-apk-verification flag" 2018-04-30 18:29:20 +00: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
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
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
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
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
5f7e4f6bbf Merge "Add .vendor to LOCAL_REQUIRED_MODULES for vendor" 2018-04-25 23:46:28 +00:00
Chih-hung Hsieh
29adef4ec2 Merge "Disable LLD for Darwin host executables." 2018-04-25 06:30:59 +00:00
Chih-Hung Hsieh
3365ae7228 Disable LLD for Darwin host executables.
* See upstream status of lld for Mach-O at https://lld.llvm.org/AtomLLD.html

Bug: 73768157
Test: make checkbuild
Change-Id: I20330bd59cc8b3d0ed0fa08d3f1c2be7b8656849
2018-04-24 19:08:41 -07:00
Isaac Chen
ecc09990e3 Merge "Enable vndk_package if BOARD_VNDK_VERSION is set" 2018-04-24 02:08:44 +00:00
Isaac Chen
a13b3153c1 Enable vndk_package if BOARD_VNDK_VERSION is set
This is a first attempt to enable build system support to include
vndk_package automatically (if BOARD_VNDK_VERSION is set), so devices
don't need to add it via PRODUCT_PACKAGE manually.

Bug: b/67002788
Test: Booted on the x86 emulator and a physical device and checked
      their /system/lib*/vndk-* directories for vndk_package libraries.
    # The commands below are for the x86 emulator:
    $ lunch aosp_x86_64-userdebug; m -j
Change-Id: Iea927b9535c7ee1b64ca130a4ac54f0fd8b3f758
Merged-In: Iea927b9535c7ee1b64ca130a4ac54f0fd8b3f758
(cherry picked from commit 5364f5a298)
2018-04-24 10:07:10 +08:00
Patrick Tjin
3f5f9934e9 build_image: default extfs reserved size to 0 on RO partitions.
Defaults the reserved blocks for root to 0% on read only partitions
(system, system_other, vendor, oem).  It also adds support for
explicitly specifying the extfs reserved percentage via
BOARD_{SYSTEM,VENDOR,OEM,PRODUCT}IMAGE_EXTFS_RSV_PCT.

This eventually translates down to the -m option for mkfs.

Removing the reserved space can save at least  5% from the default.

  dumpe2fs system:
    Reserved blocks uid:      0 (user root)
    Reserved blocks gid:      0 (group root)

Bug: 75975085
Test: Build, verify reserved space is changed accordingly
Change-Id: I212d82741908b636db0d658a1c4847bbaadfd5ba
(cherry picked from commit 5ff758799c)
2018-04-22 22:04:21 -07:00
Treehugger Robot
2338a70f90 Merge "build/make: auto generate Test config file for Google Benchmark Test" 2018-04-20 21:16:00 +00:00
Logan Chien
d71fbfc1a7 Add .vendor to LOCAL_REQUIRED_MODULES for vendor
This commit adds ".vendor" suffix to the modules specified in
LOCAL_REQUIRED_MODULES when BOARD_VNDK_VERSION is not empty and it is
building the vendor variant.

Test: Create a vendor module with LOCAL_REQUIRED_MODULES to a
vendor_available shared library.
Change-Id: If448f682572157d0687cda3a72f9bab0f34d7f0d
2018-04-20 18:01:25 +08:00
Anton Hansson
4ad0be36e3 Merge "Add support for specifying LOCAL_SDK_LIBRARIES for prebuilts." 2018-04-20 08:17:20 +00:00
Colin Cross
f4b893165d Merge "Fix echo when copying package-res.apk" 2018-04-20 01:21:49 +00:00
Colin Cross
a90f4b297f Fix echo when copying package-res.apk
Bug: 73724997
Test: m checkbuild
Change-Id: Iad9f46e01c40d1993e279c6ea6dd9c60932064c8
2018-04-19 15:28:59 -07:00
Treehugger Robot
4c7d849a1b Merge "Allow tests to be disabled for presubmit check" 2018-04-19 20:43:54 +00:00
Chih-hung Hsieh
00ca2ecdcf Merge "When my_use_clang_lld, link with lld for host." 2018-04-19 17:03:02 +00:00
Anton Hansson
5aded2ff26 Move apicheck.mk off SRC_API_DIR.
This directory is getting deleted.

Also remove the variable, the other uses are being removed in this cl:
I1d4e87e7840e979b83779a2aefe176e7c1ed1527

Bug: 77525052
Test: Verified value of last_released_sdk_version variable.
Change-Id: I69b10ad83a8c06d337606df91e8d3b604adfef70
2018-04-19 17:17:31 +01:00
Anton Hansson
f5cefdcefb Add support for specifying LOCAL_SDK_LIBRARIES for prebuilts.
This new variable allows specifying libraries like this:
LOCAL_SDK_VERISON := 25
LOCAL_SDK_LIBRARIES := org.apache.http.legacy,
which would automatically pick up the prebuilt OAHL prebuilt
from prebuilts/sdk/25/public/org.apache.http.legacy.jar

Test: In master with uiautomator.
Bug: 77575476
Change-Id: Id8d92176f5b608c2bcea622b6aed4aa27c32e000
2018-04-19 15:18:55 +01:00
Nelson Li
eec9529de8 build/make: auto generate Test config file for Google Benchmark Test
BUG: 74844131
Test: cd bionic/; mm (auto generating the test config in out/)
      atest bionic-benchmarks (full testing in atest)
Change-Id: I0497eed876640893d0b82d4cde384d3608cf4875
2018-04-19 09:16:54 +00:00