Commit graph

41697 commits

Author SHA1 Message Date
Mathieu Chartier
d6259f8d46 Merge "Add support for preopt with uses-libraries" 2018-05-10 21:17:19 +00:00
Colin Cross
46ff7618b0 Merge "Fix zipped resources" 2018-05-10 20:04:25 +00:00
Mathieu Chartier
d022b65c98 Add support for preopt with uses-libraries
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES

The make rule cross references the libraries against what's stored
in the manifest.

Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.

Bug: 70934104
Bug: 67345922
Test: manual

(cherry picked from commit 09f3b97f4b)

Merged-In: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
Change-Id: I670431f938c31115a7812c1857c31b9f71675632
2018-05-10 11:52:26 -07:00
Treehugger Robot
63097b276b Merge "Add micro_bench to PRODUCT_PACKAGES_DEBUG" 2018-05-10 02:30:00 +00:00
Treehugger Robot
8f5535fd93 Merge "Pass PLATFORM_VERSION to Soong" 2018-05-10 00:54:13 +00:00
Treehugger Robot
5c3646c201 Merge "Build System: Fix rpath error if native executable under testcase folder." 2018-05-10 00:40:27 +00:00
Dan Willemsen
a362bf4e20 Add micro_bench to PRODUCT_PACKAGES_DEBUG
It's been converted to Soong, so can no longer use LOCAL_MODULE_TAGS. It
appears that some of the test runners expect to have it pre-installed.

Test: m; see it installed.
Change-Id: I189c9bbc2f2add90ac4f6841f4bf13852e4d579f
2018-05-09 17:33:12 -07:00
Colin Cross
164a33f194 Fix zipped resources
Fix mismatch between output directory of zipsync and input
directory of aapt2.

Test: m checkbuild
Change-Id: If012c943af0c04cc3f0dd5c4266126412ae0a759
2018-05-09 23:56:19 +00:00
Elliott Hughes
0f8056b254 Merge "Revert "Revert "Revert "Set global default to use lld."""" 2018-05-09 23:46:16 +00:00
Colin Cross
0fdbb4c910 Pass PLATFORM_VERSION to Soong
Soong needs PLATFORM_VERSION to pass as --version-name when building
framework-res.apk.

Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk  | grep -i version
Change-Id: If47839182a1dd7c7a768b1253dd8b575d777ca7e
Merged-In: If47839182a1dd7c7a768b1253dd8b575d777ca7e
(cherry picked from commit 34aba6cf72)
2018-05-09 23:44:18 +00:00
Elliott Hughes
876a36e8ac Revert "Revert "Revert "Set global default to use lld."""
This reverts commit da8febf39c.

Bug: http://b/73768157
Reason for revert: breaks several bionic/debuggerd/libunwind_stack gtests

Change-Id: I161cf85cf352b80644524fd4bb70ff7c75fbc1d0
2018-05-09 20:33:25 +00:00
Tri Vo
d744f8cc8e Merge "Expose selinux variables to Soong." 2018-05-09 01:57:14 +00:00
Chih-hung Hsieh
44f320c29e Merge "Revert "Revert "Set global default to use lld.""" 2018-05-08 22:57:01 +00:00
Chih-hung Hsieh
da8febf39c Revert "Revert "Set global default to use lld.""
This reverts commit 44988be862.

Three known build failures with lld are fixed by
(1) adding --no-fatal-warnings to link
(2) disable LLD for some PGO build targets
(3) disable LLD for some art oatdump tests, pending c/681542

Change-Id: Icebf6661509bf4f6051f91dc74eaa07dbc7c1d42
2018-05-08 20:13:41 +00:00
android-build-prod (mdb)
ec87c9f56e Merge "Revert "Set global default to use lld."" 2018-05-08 15:33:44 +00:00
Nicolas Geoffray
44988be862 Revert "Set global default to use lld."
Bug: 73768157

Some errors with HOST_PREFER_32_BIT:
HOST_PREFER_32_BIT=true m -j32 test-art-host-gtest

This reverts commit 962424149d.

Change-Id: I788ec3e39d6989d583d3c7d4706299fe5a7841f2
2018-05-08 12:37:34 +00:00
Mathieu Chartier
85f2ffd5ee Merge "Specify dirty image objects for profile boot image" 2018-05-08 01:19:59 +00:00
Chih-hung Hsieh
1defe63536 Merge "Set global default to use lld." 2018-05-07 19:44:53 +00:00
Mathieu Chartier
399a6d8673 Specify dirty image objects for profile boot image
This wasn't being specified previously while it should have been.

Test: make
Change-Id: I671e93d4502b1f47cff31de19f2ea558dde6253b
2018-05-07 11:50:00 -07:00
Colin Cross
9871635469 Merge changes from topic "soong_support_libs"
* changes:
  Fix support libraries dependencies based on Soong modules
  Always statically include Support Libraries, move SDK definitions up a dir
  Move Support Library dependencies to their own var with resolution
  Allow projects to define their own globally-available variables
2018-05-07 17:53:09 +00:00
Chih-Hung Hsieh
962424149d Set global default to use lld.
* Use clang lld by default, unless LOCAL_USE_CLANG_LLD
  or USE_CLANG_LLD is set to false or 0.

Bug: 73768157
Test: make checkbuild and boot
Change-Id: I9b28550a0626c96f6e025b0f20705a2e4a5049d7
2018-05-07 09:27:49 -07:00
yangbill
59c616a263 Build System: Fix rpath error if native executable under testcase folder.
error while loading shared libraries: libc++.so:
cannot open shared object file: No such file or directory

BUG: N/A
Test: make -j16 liblatinime_host_unittests
      out/host/linux-x86/testcases/liblatinime_host_unittests/x86_64/liblatinime_host_unittests

Change-Id: I97738f728c29ab904fc979ff9b08a8d5bd1328cd
2018-05-07 06:29:12 +00:00
android-build-prod (mdb)
ab235a9fb8 Merge "Add iotop to PRODUCT_PACKAGES_DEBUG" 2018-05-05 21:31:07 +00:00
Dan Willemsen
aeaf4c2407 Add iotop to PRODUCT_PACKAGES_DEBUG
This was previously marked as LOCAL_MODULE_TAGS := debug, and is used
from dumpstate.

Test: iotop is still installed after remove the debug tag
Change-Id: I685456f52403a2d5c6fbbff1429c6af422ce26df
2018-05-04 18:53:34 -07:00
android-build-prod (mdb)
f49d12ca24 Merge "Stop being noisy about including the bash completions." 2018-05-04 23:06:52 +00:00
Zhomart Mukhamejanov
f6806a7ff3 Merge "releasetools: Make _GetPropertyFilesString public" 2018-05-04 21:17:54 +00:00
Elliott Hughes
2f9152618f Stop being noisy about including the bash completions.
Now most of the other noise is gone, we should probably quiet down too.

Bug: N/A
Test: `source build/envsetup.sh`
Change-Id: Ic5b169b1771163488e70d732276372efbf304bae
2018-05-04 13:21:16 -07:00
Zhomart Mukhamejanov
603655f5b5 releasetools: Make _GetPropertyFilesString public
ota_from_target_files.py:

Rename PropertyFiles._GetPropertyFilesString to
PropertyFiles.GetPropertyFilesString.

Currently only PropertyFiles.Compute and
PropertyFiles.Finalize gives access to _GetPropertyFilesString.
But Compute force sets reserve_space=True,
and Finalize requires reserved_length.

_GetPropertyFilesString is useful method that can
be used outside releasetools.

One of the usage is in bootable/recovery/updater_sample/.

Test: python -m unittest test_ota_from_target_files
Change-Id: I2cc44ec46a0e68ba071531b003af8cdbfe90e588
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-05-04 12:35:09 -07:00
android-build-prod (mdb)
5b36fb759b Merge "Remove settitle" 2018-05-04 17:00:10 +00:00
Ng Zhi An
cd2b3869f8 Remove settitle
settitle always had a bug in the PROMPT_COMMAND, it used "\033]0;",
where it should be "\033[0m". It was opt-in, and changed to opt-out, and
no one really complained that it didn't work. So we are just going to
remove this.

References:
- http://www.termsys.demon.co.uk/vtansi.htm
- https://en.wikipedia.org/wiki/ANSI_escape_code

Test: lunch and see no change in prompt
Change-Id: I777c87b4d8e80c0e9437e5d2628f6df020883389
2018-05-04 08:21:22 -07:00
Colin Cross
8560930893 Fix support libraries dependencies based on Soong modules
Use a list of support library java and android libraries exported
from Soong to rewrite dependencies into the appropriate
LOCAL_STATIC_JAVA_LIBRARIES and LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 78300023
Test: m checkbuild
Change-Id: I4fd1e563272fcef9238a46cda840210529bd706a
Merged-In: I4fd1e563272fcef9238a46cda840210529bd706a
(cherry picked from commit ceadbadc5d)
2018-05-03 16:47:55 -07:00
Alan Viverette
7b7cdb7777 Always statically include Support Libraries, move SDK definitions up a dir
Bug: 73250914
Bug: 74248169
Test: make && make cts
Change-Id: Id7198997ac5cacf76fd8ab155a60026d65e420ec
Merged-In: Id7198997ac5cacf76fd8ab155a60026d65e420ec
(cherry picked from commit 1efaf37cb7)
2018-05-03 16:47:11 -07:00
Alan Viverette
fb8f5baae4 Move Support Library dependencies to their own var with resolution
Bug: 73250914
Test: make checkbuild
Change-Id: Ibdbe2fd140133202b266ca4f233c4d42292fa3df
Merged-In: Ibdbe2fd140133202b266ca4f233c4d42292fa3df
(cherry picked from commit 53f6b2a80b)
2018-05-03 16:47:11 -07:00
Alan Viverette
8ead03bde1 Allow projects to define their own globally-available variables
Bug: 73178261
Test: make checkbuild
Change-Id: I53ee0f1d3ec072e19f4893cca44e16ef672fabfe
Merged-In: I53ee0f1d3ec072e19f4893cca44e16ef672fabfe
(cherry picked from commit fa0184fae9)
2018-05-03 16:47:11 -07:00
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
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)
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
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