Commit Graph

12817 Commits

Author SHA1 Message Date
Michael Schwartz cb5b8d2d47 Include Treble metadata on Treble enabled devices
Bug: 38431773
Test: `m -j dist` for bullhead and sailfish and inspect target_files
Change-Id: I55da654f42af08f27a79249177a0078b66cf1662
2017-05-22 14:02:27 -07:00
TreeHugger Robot f99f37b243 Merge "Embed jni libs in vendor apks for treble-ized devices" into oc-dev 2017-05-17 09:41:59 +00:00
Jiyong Park e1a3b367fe Embed jni libs in vendor apks for treble-ized devices
JNI libs used by bundled APKs have been installed outside of the APK
(e.g. /system/lib and /vendor/lib) to save space because multiple APKs
may share the same set of JNI libs.

However, this causes problem for treble-ized devices where access to
/vendor/lib is prohibited for system processes including Java apps.

So, the JNI libs are embedded into the APK when the APK is installed to
/vendor partition and the device is fully treble-ized.

Bug: 37491282
Test: Move an APK and its JNI libraries to vendor partition by setting
LOCAL_PROPRIETARY_MODULE := true and build:
The jni lib does not exist under /system or /vendor. unzipping
the apk reveals the jni lib under ./lib/<abi> directory.

Merged-In: I8389761dfbd28d181869d79f0bf988a1e4df2fca
Change-Id: I8389761dfbd28d181869d79f0bf988a1e4df2fca
(cherry picked from commit 1cb8dea625)
2017-05-16 23:30:35 +00:00
Ian Pedowitz be9844a03c Merge "O is 8.0.0 and REL" into oc-dev 2017-05-16 03:32:17 +00:00
Ian Pedowitz e46cc54ab1 Merge "Revert "Revert "O is API 26.""" into oc-dev 2017-05-16 03:32:03 +00:00
Steve Muckle f4ccb4f735 fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-05-12 16:28:26 -07:00
Ian Pedowitz ae1f3abef4 O is 8.0.0 and REL
Bug: 38131332
Test: compiles
Change-Id: I0ccda8ab4f6edf056fd37bd8ee50555d01d3529e
Merged-In: I7894321971c0b696594deb064ebed3f43cf7c8d1
2017-05-10 21:44:58 -07:00
Ian Pedowitz 9c350d7ef7 Revert "Revert "O is API 26.""
This reverts commit 75feb8927a.

Bug: 37480230
Bug: 37355569
Change-Id: I348413878e97f766863086d74bdc454f61b100ec
2017-05-10 08:58:53 -07:00
Jeff Sharkey e90119fd4b Merge "Define paths for new "-exactApi" output files." into oc-dev 2017-05-10 15:05:55 +00:00
Nicolas Geoffray 7bd88ee342 Merge "Pass --force-determinism to prebuilts." into oc-dev 2017-05-10 14:05:16 +00:00
Nicolas Geoffray f7add10929 Pass --force-determinism to prebuilts.
bug: b/37442966
Test: build

(cherry picked from commit a5bb180a89)

Change-Id: I00b3d591999781e7511a828dd1de0502b77526c9
2017-05-10 13:01:40 +01:00
Jeff Sharkey e1d620e8a1 Define paths for new "-exactApi" output files.
This new feature creates files with exactly the annotated APIs
instead of a giant superset.  (This makes it easier to compare diffs
between releases.)

Test: make update-api && make -j32 online-system-api-sdk-docs
Bug: 38146029
Change-Id: Ia7ddac43a0ead380025e248ee22072e11c50e263
2017-05-09 19:03:04 -06:00
Jeff Sharkey cada716b78 Have doclava emit meaningful stack traces.
This flag enables stack traces when invoking doclava, which were
otherwise being truncated to simply be the exception name, which was
useless for debugging things.

Test: make -j32 online-system-api-sdk-docs
Bug: 38164929
Change-Id: Ie281e2b2ed988bb6d587af33256fcdee1450fc79
2017-05-09 11:44:33 -06:00
Ian Pedowitz 6f93dd52b2 Merge "Revert "O is API 26."" into oc-dev 2017-05-04 00:07:11 +00:00
Ian Pedowitz 75feb8927a Revert "O is API 26."
This reverts commit 06fc7e023b.

Reason for revert:  b/37355569

Bug: 37480230
Bug: 37355569
Change-Id: I2eef4fb5369fa4e9d7a410461de63d4dd43dfc09
2017-05-03 22:00:47 +00:00
Colin Cross b16f288bee Make javac checkbuilds match jack
Building all java to dex is very slow.  Make javac checkbuilds act
like jack checkbuilds and only build to class files for unused
modules, and add a java-dex target that can be used to build
everything to dex.

Bug: 33105206
Test: m -j checkbuild
Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
Merged-In: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
(cherry picked from commit 9eff830fa2)
2017-05-03 12:42:20 -07:00
Nicolas Geoffray 64fe1d29ea Merge "Use 'quicken' instead of 'interpret-only'." into oc-dev 2017-05-03 08:04:34 +00:00
Colin Cross a4f65df11a Clear LOCAL_JACK_ENABLED for ANDROID_COMPILE_WITH_JACK=false
CL I2189055aac9deccc36b8eab8e949796dddadf7a1 moved the
ANDROID_COMPILE_WITH_JACK=false check to configure_local_jack.mk,
which broke some modules that use ifndef LOCAL_JACK_ENABLED to
change their behavior we jack is disabled.  Clear
DEFAULT_JACK_ENABLED when ANDROID_COMPILE_WITH_JACK=false so
that LOCAL_JACK_ENABLED is cleared.

Bug: 37483961
Test: m -j checkbuild
Change-Id: I0d08946c57182689624c57f4952d7cecaa0b82b3
Merged-In: I0d08946c57182689624c57f4952d7cecaa0b82b3
2017-05-03 04:37:09 +00:00
TreeHugger Robot ecfd048a8e Merge "Support LOCAL_JACK_ENABLED := javac_frontend" into oc-dev 2017-05-03 00:03:36 +00:00
Colin Cross 37210994ff Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
Merged-In: I2189055aac9deccc36b8eab8e949796dddadf7a1
(cherry picked from commit b17f285169)
2017-05-02 13:11:35 -07:00
Michael Wright 06fc7e023b O is API 26.
Bug: 37480230
Test: Build, run.
Change-Id: I2f0e7fecf38d224c20d18cff856c45a7a3e624ad
2017-05-02 18:31:53 +01:00
Yang Ni 671fc06b02 Merge "Do not package res unless RS target API < 21" into oc-dev 2017-05-02 16:11:40 +00:00
Nicolas Geoffray b391568e22 Use 'quicken' instead of 'interpret-only'.
bug: 34715556
Test: build

(cherry picked from commit eb3d2f2e75)

Change-Id: I159332c7cc3f7ea0e4b3371883dda8e4aab6b158
2017-05-02 12:32:52 +01:00
Yifan Hong b5cbe22b84 Add device/fwk compatibility matrices to device.
Also renamed matrix.xml to compatibility_matrix.xml.

Test: make and ensure vendor/compatibility_matrix.xml is there.
Test: adb shell vintf (see matrices, compatible = true)

Bug: 37321309
Change-Id: I4ebbedf47a576a50a42df53b72e507ed31ef2e56
2017-05-01 21:49:18 -07:00
Yang Ni e2c0901918 Do not package res unless RS target API < 21
Bug: 37626838

Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.

Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
      ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
2017-05-01 21:41:14 +00:00
Jaekyun Seok 3b7560bf88 Split vendor license notices into vendor partition
Xml files will be generated instead of html files, and then Settings
will generate html file on runtime from xml files of partitions.

Test: build succeeded and tested on sailfish
Bug: 37099941
Change-Id: Id7899381a537b1947cbb6164ed2b4a98492334af
2017-04-28 16:29:17 +09:00
TreeHugger Robot 387d93f0a9 Merge "Overridden packages shouldn't install vdex files either" into oc-dev 2017-04-25 06:21:43 +00:00
TreeHugger Robot 90d202fb7f Merge "Make mini-debug-info stripping pass on already stripped binaries" into oc-dev 2017-04-25 04:06:12 +00:00
Dan Willemsen b50bbcc72a Overridden packages shouldn't install vdex files either
Bug: 37348494
Test: internal marlin, check for WebViewGoogle.vdex
Change-Id: I16469f7d84b972cee5b13aed58f4ec3f995cb83e
Merged-In: I16469f7d84b972cee5b13aed58f4ec3f995cb83e
(cherry picked from commit e224725c95)
2017-04-20 13:34:44 -07:00
TreeHugger Robot dd4cdfd30a Merge changes Ieb58dd9a,I8ada38df into oc-dev
* changes:
  AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
  AVB: support signing vendor.img
2017-04-18 04:10:58 +00:00
Colin Cross 3aa1ef8bcd Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)
If PRIVATE_PREFIX is unset transform-prebuilt-to-target references
$(DISPLAY) instead of $(HOST_DISPLAY) or $(TARGET_DISPLAY), which
causes unnecessary kati regenerations when the DISPLAY environment
variable changes.

Bug: 36901093
Bug: 37333696
Test: grep for $DISPLAY in out/build-${TARGET_PRODUCT}.ninja
Change-Id: Ia9802fc2b07da9b74e8f80dfdcef121408cd9817
(cherry picked from commit d2e778fb5a)
2017-04-17 11:33:50 -07:00
Colin Cross 0af734d077 Make mini-debug-info stripping pass on already stripped binaries
Prebuilts may already be stripped.  Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.

Bug: 36793128
Test: m -j checkbuild
Change-Id: Iafc4614ceb91bbbb2e5ff82caefd18753f8961b1
Merged-In: Iafc4614ceb91bbbb2e5ff82caefd18753f8961b1
(cherry picked from commit 5e93057da4)
2017-04-17 11:40:23 +08:00
Bowgo Tsai 16ba563b71 AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
Merged-In: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
(cherry picked from commit 9b3776017f)
2017-04-15 13:57:42 +08:00
Bowgo Tsai 3f0fd3d085 AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
Merged-In: I8ada38dff3def6d34613e77c67944def8a49f464
(cherry picked from commit 8ee4a3db8c)
2017-04-15 13:57:21 +08:00
Yifan Hong aa21221f80 Use assemble_vintf to verify framework manifests.
Test: builds, and verify that system/manifest.xml is there.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: Ic3bb50211311fa423a2ad56bd2891cb57d7dc1a5
2017-04-14 16:29:55 -07:00
Michael Schwartz ceeaa7be20 Merge "Rule to copy device manifest to device" into oc-dev 2017-04-14 03:25:55 +00:00
Michael Schwartz 4d9cb56866 Rule to copy device manifest to device
The device manifest defines the collection of HAL interfaces exposed by
the vendor. Create a common rule so each target need not define their own.

Bug: 36810913
Test: Ran marlin build and inspected file was copied
Change-Id: I9f53796fdd85e706f91664d275aff6dbd785213f
2017-04-13 08:42:42 -07:00
TreeHugger Robot 720ed98a0d Merge "Support split /system and /vendor modules from Soong" into oc-dev 2017-04-12 02:39:52 +00:00
Dan Willemsen 58760e47aa Support split /system and /vendor modules from Soong
Soong modules may be split into both /system and /vendor variants.
Ensure that Make libraries link against the correct version based on
whether LOCAL_USE_VNDK is set.

Bug: 36426473
Bug: 36079834
Test: build-aosp_arm64.ninja files are the same before/after
Test: attempt building with BOARD_VNDK_VERSION:=current
(cherry picked from commit 9d2b3280e8)
Merged-In: I229bc290373743406275f3ca16081eae04c27987
Change-Id: I229bc290373743406275f3ca16081eae04c27987
2017-04-11 13:17:48 -07:00
Colin Cross 487a313bb6 Fix duplicate and dangling rules
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.

Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.

Add a check around $(built_dex_intermediates) for static java libraries.

Bug: 36901093
Bug: 36902714
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
(cherry picked from commit 96476c1d50)
2017-04-11 10:02:04 -07:00
Colin Cross 69d85288cb Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Bug: 36902714
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
(cherry picked from commit 941b682099)
2017-04-11 10:01:28 -07:00
Colin Cross ffbf0a66d8 Move proguard before classes.jar
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries.  In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.

Also rename the intermediates to be consitent: classes-<tool>.jar

Bug: 36902714
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-11 17:00:02 +00:00
Steven Moreland 5643689385 Merge "Add LLNDK support for the VNDK" into oc-dev 2017-04-10 15:30:04 +00:00
Dan Willemsen e0b40f6368 Add LLNDK support for the VNDK
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Change-Id: I0197f44c91218c73b9567a05320c91a2baaae39b
(cherry picked from commit ffa3258f6c)
2017-04-07 20:35:09 -07:00
TreeHugger Robot b70a93465a Merge "Specialize oc-dev into OPR1" into oc-dev 2017-04-08 02:05:22 +00:00
TreeHugger Robot 8a6d7fabc3 Merge "Ensure that BOARD_VNDK_VERSION is current" into oc-dev 2017-04-05 22:42:18 +00:00
TreeHugger Robot 87bbe36728 Merge "Exclude ndk stubs from notice file list" into oc-dev 2017-04-05 22:42:18 +00:00
TreeHugger Robot 0192aaedad Merge "Add LOCAL_EXPORT_CFLAGS for Soong" into oc-dev 2017-04-05 22:42:18 +00:00
Dan Willemsen 2af509ba3d Ensure that BOARD_VNDK_VERSION is current
BOARD_VNDK_VERSION controls which version of the VNDK is used for the
build. We only support compiling against the current VNDK, and we don't
support installing old prebuilt VNDK libraries yet, so ensure this
variable is set to "current".

Once we support installing old prebuilt VNDK libraries, we'll also need
to disable building modules that use the VNDK.

Test: build-aosp_arm.ninja is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Test: Set BOARD_VNDK_VERSION := invalid
Change-Id: Ic26c9f44e356a0734f522b4538cb866d5b901d43
(cherry picked from commit 2c3289bf37)
2017-04-05 09:59:10 -07:00
Dan Willemsen 593026b28b Add LOCAL_EXPORT_CFLAGS for Soong
This lets Soong pass -isystem or -I as necessary (or potentially, even
other cflags in the future).

This is not available for Android.mk use, nor exposed directly to
Android.bp users.

Test: m -j
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 09:49:48 -07:00