Commit graph

15335 commits

Author SHA1 Message Date
Logan Chien
fcf4d7200a Merge "Build a single GSI for O-MR1-VENDOR and Master-VENDOR" 2018-05-22 04:04:07 +00:00
Treehugger Robot
7e15b44c23 Merge "Move support library dependency munging earlier" 2018-05-18 00:00:50 +00:00
Treehugger Robot
1b02cfd8ab Merge "Don't recompute location of AndroidManifest.xml" 2018-05-18 00:00:24 +00:00
Colin Cross
7bc6cab12e Move support library dependency munging earlier
The presence of LOCAL_STATIC_ANDROID_LIBRARIES is used early to
decide whether to move resources to overlays, and late to decide
whether to add --auto-add-overlay.  If support_libraries.mk moves
the last LOCAL_STATIC_ANDROID_LIBRARIES value to
LOCAL_STATIC_JAVA_LIBRARIES then the resources will be moved to
overlays but --auto-add-overlay will not be added, causing aapt2
to fail with:
error: resource bool/leanback_outline_clipping_disabled does not override an existing resource.
note: define an <add-resource> tag or use --auto-add-overlay.

Bug: 79481102
Test: m FORCE_AAPT2=true java
Change-Id: Icc67acf23b846bd506a5d397d02ad5775ad0ea1d
2018-05-17 15:09:17 -07:00
Colin Cross
1c3d83b64c Don't recompute location of AndroidManifest.xml
The location of AndroidManifest.xml has already been computed
by android_manifest.mk, don't duplicate the logic.  Fixes an
extra regeneration triggered by $(wildcard $(my_android_manifest))
when LOCAL_FULL_MANIFEST_FILE points to a generated file, which
will not exist on the first run of kati.

Test: m
Change-Id: Ia56693a4dbbc7d78900019b887f766938dc55dab
2018-05-17 15:09:17 -07:00
Colin Cross
e3c456423e Merge "Don't always filter out --auto-add-overlay" 2018-05-17 18:52:53 +00:00
Colin Cross
282065ab15 Don't always filter out --auto-add-overlay
There are some cases where --auto-add-overlay is added for legitimite
reasons, for example in RROs.  Only filter it out from modules that
were using --extra-packages for support library modules.

Test: m FORCE_AAPT2=true java
Change-Id: I165fa577f2204ecbc57e71f946db3f346568ad81
2018-05-17 10:16:04 -07:00
Logan Chien
86b52aec24 Build a single GSI for O-MR1-VENDOR and Master-VENDOR
The objective of this commit is to support these 3 combinations:

1. Master-GSI + Master-VENDOR (w/ BOARD_VNDK_VERSION)
2. Master-GSI + Master-VENDOR (w/o BOARD_VNDK_VERSION for upgrading devices)
3. Master-GSI + O-MR1-VENDOR (w/ BOARD_VNDK_VERSION)

This commit defines a new property `ro.vndk.lite` to indicate the status
of BOARD_VNDK_VERSION run-time enforcement.  Now, all devices should
have `ro.vndk.version` so that `libhidlbase.so`, `libRSCpuRef.so`, and
`libnativeloader.so` can find the versioned VNDK directory.

Bug: 78605339
Test: aosp_sailfish Master-SYSTEM + Master-VENDOR boots
Test: aosp_sailfish Master-GSI    + Master-VENDOR boots
Test: aosp_walleye  Master-SYSTEM + Master-VENDOR boots
Test: aosp_walleye  Master-GSI    + Master-VENDOR boots
Test: aosp_walleye  Master-GSI    + O-MR1-VENDOR boots
Change-Id: Iee9553b3ca9e0798a873e655d87d10cdc23d4b1c
Merged-In: Iee9553b3ca9e0798a873e655d87d10cdc23d4b1c
(cherry picked from commit d73b94c097)
2018-05-17 14:25:15 +08:00
Mathieu Chartier
625ad4a0c8 Merge "Move back to using COMMON jars for preopt dependencies" 2018-05-16 22:59:23 +00:00
Colin Cross
e2f541bb9f Pass 0 to llvm-rs-cc for current
Apparently empty PRIVATE_RS_TARGET_API is not the same as current,
pass 0 explicitly.

Test: forrest ub-renderscript-test
Change-Id: I8b2001b12161f07c404f78f63a80d82dffa1075f
2018-05-16 09:57:10 -07:00
Mathieu Chartier
c52de423af Move back to using COMMON jars for preopt dependencies
There are too many problems when using the stripped jars. One of them
being that the OatFileAssistant can't open the dex files since the
dex location stored in hte oat file is the system partition one.

Bug: 67345922
Bug: 70934104
Test: make
Change-Id: I3812471330ec1d2e3a435f42a3e975de750004ff
2018-05-16 09:56:58 -07:00
Treehugger Robot
d350b16d50 Merge "Fix incorrect renderscript zip deps" 2018-05-16 07:13:01 +00:00
Treehugger Robot
00794848df Merge "Allow modules to override FORCE_AAPT2=true with LOCAL_USE_AAPT2 := false" 2018-05-16 07:10:04 +00:00
Treehugger Robot
7207e41ddd Merge "When building unbundled apps, link to the prebuilt stubs lib" 2018-05-16 02:39:01 +00:00
Nan Zhang
90f94965ab Merge "Remove tasks/apicheck.mk" 2018-05-16 01:40:53 +00:00
Jiyong Park
45bb10c470 When building unbundled apps, link to the prebuilt stubs lib
There was a bug that when an unbundled app is built without SDK
(LOCAL_SDK_VERSION isn't set), it is linked to the nonexisting stubs
library from java_sdk_library. The built stubs libs are not created for
unbundled builds. For unbundled builds, we need to use the prebuilt
stubs lib.

Bug: 77575606
Test: m -j
Test: make -j dist
ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk

Change-Id: I70cced1c872053e151fea157e3a6d218b1fab9dc
2018-05-16 09:55:47 +09:00
Colin Cross
1465806ff2 Fix incorrect renderscript zip deps
Fix some incorrect dependencies after I12d33e52019aebac6ea33271939228e4690a4173.

Bug: 73885582
Test: m java FORCE_AAPT2=true
Change-Id: Ica2758991603e1605f629d843d19df5e2ef4fae1
2018-05-15 16:04:47 -07:00
Colin Cross
d443244fbf Allow modules to override FORCE_AAPT2=true with LOCAL_USE_AAPT2 := false
Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: Iece2158dc887a249eb51086b2497b170b5879979
2018-05-15 15:28:22 -07:00
Colin Cross
532ae3bcfb Support LOCAL_RENDERSCRIPT_TARGET_API := current
Renderscript was using LOCAL_RENDERSCRIPT_TARGET_API := 0 to mean
current.  Use current instead, and check for it when comparing
if LOCAL_RENDERSCRIPT_TARGET_API >= 21.

Fixes an issue where LOCAL_RENDERSCRIPT_TARGET_API := 0 was being
treated as < 21, causing the renderscript resources to be passed
to aapt2:
out/target/common/obj/APPS/RSTestBackward_intermediates/flat-res/zip_res.flata.contents/raw/bc32: error: resource file cannot be a directory.

Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: I7726d0463ce1693bc9653b4d869ced181c491036
2018-05-15 15:28:22 -07:00
Treehugger Robot
e51fcf01bd Merge "Disable dtor inlining for clang-tidy" 2018-05-15 22:15:55 +00:00
Nan Zhang
7e4dd1478e Remove tasks/apicheck.mk
1. Remove tasks/apicheck.mk
2. Convert apicheck tool build to Soong.

Bug: b/78034256
Test: m clean && m checkapi

Change-Id: I0ebdd76586ceb7a90e4d9c10714cbd94b38ef869
Merged-In: I0ebdd76586ceb7a90e4d9c10714cbd94b38ef869
2018-05-15 14:16:13 -07:00
Ivan Lozano
078d4995b7 Merge "Don't export UBSan minimal runtime symbols." 2018-05-15 19:44:32 +00:00
Xin Li
9335117d7e Use correct case for GPL.
Test: build
Change-Id: Id8c671b142231a9c4baeac3a7b9e3cd328b3217e
2018-05-15 08:37:16 -07:00
Jiyong Park
5e2056b906 Merge "Convert apicheck tool build to Soong." 2018-05-15 05:30:41 +00:00
Jiyong Park
1c671fd7dd Convert apicheck tool build to Soong.
Bug: b/78034256
Test: m clean && m checkapi
Change-Id: Iaced7335714138730349bbea8a993705f197ae77
2018-05-15 11:38:44 +09:00
Treehugger Robot
2b42ae8076 Merge "Allow forcing AAPT2 on" 2018-05-15 00:51:27 +00:00
George Burgess IV
432899a25b Disable dtor inlining for clang-tidy
LLVM r328258 turned on a feature called temporary dtor inlining by
default for all of C++ in clang-tidy. This feature appears to be
somewhat over-aggressive when objects are being passed by value. For
example, given:

void foo(std::unique_ptr<int> i);

void bar() {
  auto x = std::make_unique<int>();
  int *i = x.get();
  foo(std::move(x));
  *i = 99;
}

...clang-tidy will complain about `*i = 99;` being a definite
use-after-free. This is incorrect, however: `foo` could stash the
`unique_ptr` it's given in a global, or a class member, or ...

Until upstream fixes this bug, it's probably best to keep this disabled.

Bug: None
Test: Ran the analyzer across Android locally. Nothing broke; number of
complaints dropped significantly.

Change-Id: I742eedf598a72a533285d913d191bfbbf0ce1688
2018-05-14 15:48:38 -07:00
Mathieu Chartier
4537ebb7a1 Merge "Use $(AAPT) instead of aapt for verifying uses libraries" 2018-05-14 19:52:47 +00:00
Mathieu Chartier
116790dae8 Use $(AAPT) instead of aapt for verifying uses libraries
For SDK builds, $(AAPT) points to a prebuilt and aapt is not
necessarily in the path.

Test: make -j32 <some SDK build> tests
Bug: 70934104
Bug: 67345922
Change-Id: Icfd62a4e3ec284ed59a61714765e5a909a27947d
2018-05-14 10:18:02 -07:00
Anton Hansson
2c37d704b4 Remove two stale variables.
These two variables are unused, and point to non-existing directories,
so delete them.

Test: make
Change-Id: I5f7577c86847146a7eea827ace74cf8022e19f71
2018-05-14 16:23:51 +01:00
Mathieu Chartier
da187dd390 Merge "Fix some issues with LOCAL_USES_LIBRARIES" 2018-05-11 22:51:37 +00:00
Ivan Lozano
e508169caf Don't export UBSan minimal runtime symbols.
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.

Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.
Change-Id: I4382cc72baefd7fa96cd83e8349e82f7b083f5aa
2018-05-11 15:31:25 -07:00
Mathieu Chartier
cda2ef1d84 Fix some issues with LOCAL_USES_LIBRARIES
Properly check the value of PRIVATE_ENFORCE_USES_LIBRARIES instead of
only checking that the variable is non-empty.

Change the logic to use product libraries instead of the common ones.
This is required so that dex2oat can find the oat files when stripping
is enabled.

Bug: 70934104
Bug: 67345922
Test: manual

Change-Id: Iee71c2b26f3c0e136a8971ab913725b2b6e100b8
2018-05-11 13:51:02 -07:00
Christopher Ferris
b510e7b521 Merge "Add support for cortex-a55/cortex-a75." 2018-05-11 17:56:12 +00:00
Colin Cross
fc56b59db4 Merge changes Ie3d4536b,If2504b7d,I411844fb
* changes:
  Fix a missed rename to my_proguard_sdk_raise
  Allow 0 in math functions
  Add tests for math.mk
2018-05-11 05:22:20 +00:00
Colin Cross
2029903b64 Allow forcing AAPT2 on
Building with FORCE_AAPT2=true will turn on AAPT2 for all modules
unless they set LOCAL_USE_AAPT2 := false.  The build system will
attempt to rewrite common AAPT patterns into AAPT2 patterns,
including removing --extra-packages for support library packages,
removing LOCAL_RESOURCE_DIR point to support library resources,
adding a default empty manifest file if it doesn't exist, and
converting LOCAL_STATIC_JAVA_AAR_LIBRARIES to
LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 79481102
Test: m checkbuild
Change-Id: I8d9d55fe4d5d5c965c64b0407efe74e0afc35c3a
2018-05-11 02:23:20 +00:00
Colin Cross
c27df2b71b Fix a missed rename to my_proguard_sdk_raise
Patch Iaf5853361767f0ea3e9ad4ec908aadd72d639c79 missed one rename
of my_support_library_sdk_raise to my_proguard_sdk_raise.

Test: m checkbuild
Change-Id: Ie3d4536bd80654a7eb4f209ef6d6a8de502a6cdc
2018-05-11 02:23:07 +00:00
Colin Cross
8b170358ba Allow 0 in math functions
Allow non-negative integers instead of positive integers in math
functions so that LOCAL_RENDERSCRIPT_TARGET_API := 0 can be compared
against 21.

Test: make -f ${ANDROID_BUILD_TOP}/build/make/core/math.mk RUN_MATH_TESTS=true
Test: $(get_build_var CKATI) -f ${ANDROID_BUILD_TOP}/build/make/core/math.mk RUN_MATH_TESTS=true
Change-Id: If2504b7de81f8dd676af749a04c9f3e580f298b6
2018-05-11 02:22:54 +00:00
Colin Cross
5bc27ea9f2 Add tests for math.mk
Turn commented out tests into assertion tests, and add more for
functions that didn't have tests.

Test: make -f ${ANDROID_BUILD_TOP}/build/make/core/math.mk RUN_MATH_TESTS=true
Test: $(get_build_var CKATI) -f ${ANDROID_BUILD_TOP}//build/make/core/math.mk RUN_MATH_TESTS=true
Change-Id: I411844fbf00268f863260b7ee42d1795f05c0d16
2018-05-11 02:21:39 +00:00
Christopher Ferris
47b29ea339 Add support for cortex-a55/cortex-a75.
Bug: 78133793
Bug: 78242072

Test: Builds for target.
Change-Id: I98d638017f943083d3832ec2211333c48f07caf2
Merged-In: I98d638017f943083d3832ec2211333c48f07caf2
(cherry picked from commit ce7bf678f2)
2018-05-11 00:43:19 +00:00
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
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
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