Commit graph

54 commits

Author SHA1 Message Date
Nicolas Geoffray
ed6ee7b64d Don't strip for eng builds.
bug: 72150787
Test: m
Change-Id: Ifdd403dfecb440e32c4d0c00a7543820b2098359
2018-01-22 15:07:37 +00:00
Mathieu Chartier
f834eccd52 Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
Renamed WITH_DEXPREOPT_BOOT_IMG_ONLY to
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY and changed the
behavior accordingly.

Preopt system server jars since selinux prevents system server from
loading anything from /data. If we don't do this they will need to
be extracted which is not favorable for RAM usage or performance.

Test: make and flash and look at system server maps
Bug: 65122284
Bug: 62356545

(cherry picked from commit 418258cee9)

Merged-In: I2e70c80a86327b455450b95144f21020e7bf0c6f
Change-Id: I316e79c7c6d45e2ccbfff4065137cc3ef9d2738e
2017-10-12 20:40:41 +00:00
Colin Cross
ea1629e788 Refactor removing classes.dex for dexpreopt
Combining $(call dexpreopt-remove-classes.dex) into a
$(call copy-one-file) rule is hacky and error prone.  Make a helper
dexpreopt-copy-jar function that takes LOCAL_DEX_PREOPT and copies
the jar, removing the dex files if necessary.

Test: only description message changes to out/build-${TARGET_PRODUCT}.ninja
Change-Id: Id2fa2d18571ca01bc81302c912b8de25f3dde7a1
2017-10-06 14:26:25 -07:00
Andreas Gampe
4ed21d10e8 Build: Change SANITIZE_LITE install settings
Under SANITIZE_LITE, the default app_process is not instrumented.
Embedding sanitized libraries into APKs will lead to crashing apps.
So move second-stage APKs to /data/asan.

The tradeoff is that for now we won't run these sanitized binaries.
Adding support for that is future work.

Also do not do a rebuild of the boot image. This would invalidate
the first-stage results. Note that this is technically dangerous,
as stack overflow guard sizes will not be adapted for ASAN runs.
However, this is a general incompatibility.

Also do not rebuild system_other. Apps are not rebuilt, so it will
create an empty image.

(cherry picked from commit 481660ef34)

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true
Merged-In: I3898bc53cad264529f126e6bf0af9c6ca1736877
Change-Id: I3898bc53cad264529f126e6bf0af9c6ca1736877
2017-08-31 08:56:18 -07:00
Nicolas Geoffray
4a0ad4ac61 Add a new PRODUCT variable for forcing 'speed' preopt.
bug: 35872915
Test: build
Change-Id: Idfea3c379a2b1dab30ee94a58ffe86d508f8522f
2017-06-15 09:52:45 +01:00
Nicolas Geoffray
cdd4343bb2 Don't preopt system server apps in system_other.
bug:36532541
bug:33799337

Test: m -j32 && find out/target -name \*.odex

(cherry picked from commit a2c6c0b11e)

Change-Id: Ic4396bb6c543af1c05f56030495caafb245ea304
2017-04-28 12:34:53 +01:00
Richard Uhler
c30981e2d0 Remove option for non-pic dex preopt.
Test: make checkbuild, aosp_bullhead-userdebug boots.
Bug: 33192586

Change-Id: I4dd179fac33d777fb10cc85a99ff68c3b0d0e03d
2016-12-19 09:52:25 +00:00
Alex Light
a3e8e9c6f3 resolve merge conflicts of 3f7c348 to nyc-mr1-dev-plus-aosp
Bug: 29278988

Change-Id: Icffb9a280311c7d3c45f096243ddf18f7ebecd9d
2016-06-29 15:43:54 -07:00
Alex Light
4e358ab2c3 Add system_other partition, install odex files
For AB devices, support flashing two system partitions for factory use.
The normal system image on one partition, but without dex preopt. And a
system_other image that just contains the odex files. The dex files will
not be stripped out of the system image, in case the second system
partition is wiped.

Setting BOARD_USES_SYSTEM_OTHER_ODEX := true in the BoardConfig.mk
enables this behavior.

One can control which directories are placed in system_other by the
SYSTEM_OTHER_ODEX_FILTER configuration variable. Currently we default
to only copying only app and priv-app odexs.

Bug: 29278988
Change-Id: I7f4e87da919e7dc6a89fd8c668193cd4e98631bc
2016-06-24 11:07:15 -07:00
Andreas Gampe
d50f9d8ec1 Build: Switch on oat file mini-debug-info for boot.oat am: a20910f495
am: b4c1d50958

* commit 'b4c1d509584b27abf751b539dafb8f80a7eeb790':
  Build: Switch on oat file mini-debug-info for boot.oat

Change-Id: I74bcb2fcce426683f62cee43c17c20a77fb0c72d
2016-05-11 01:25:21 +00:00
Andreas Gampe
a20910f495 Build: Switch on oat file mini-debug-info for boot.oat
Enable mini-debug-info for the boot image by default. This
can be disabled with WITH_DEXPREOPT_DEBUG_INFO=false.

Bug: 28474219

(cherry picked from commit 58f6bfaa37)

Change-Id: Ifd59d854f01ad8cf703f16d7a6e88c2c82d47feb
2016-05-09 22:42:27 +00:00
Ying Wang
c9a19779a2 resolve merge conflicts of fc16dca602 to nyc-dev-plus-aosp
Now we can remove all uses of $(ACP) in prebuilt_internal.mk.

Change-Id: I07a449f3acca9b56c6a387ff8ca1535d19c872d1
2016-03-15 14:46:12 -07:00
Ying Wang
3a61eeb6cb Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
2016-03-14 21:01:46 -07:00
Andreas Gampe
63e5a86844 Merge changes I4a2692f3,Ifd8d3a2c into nyc-dev
am: 6f0a902081

* commit '6f0a9020815bb3da5bf43fcd74bddb7ffe1e239f':
  Build: Only preopt boot images in eng builds
  Revert "Don't preopt on eng builds."
2016-03-11 16:24:48 +00:00
Andreas Gampe
4df565786a Build: Only preopt boot images in eng builds
As a middle way between full preopt/high performance/long builds,
and no preopt/low performance/fast turnaround, preopt only the
boot image in eng builds.

Bug: 26794212
Change-Id: I4a2692f3ce84823cd40c6b7d672fd73257739ef8
2016-03-10 15:34:46 -08:00
Andreas Gampe
6c6c51aa79 Revert "Don't preopt on eng builds."
This reverts commit 7effde0048.

Bug: 25801231
Bug: 26794212
2016-03-10 15:07:27 -08:00
Dan Willemsen
23afb78cf9 Merge commit 'cdaf748e3abefd93a4e45393e96717fad8564c51'
Change-Id: I3c44564b08ed46f46719dbca54d4225718bb8c59
2016-03-01 15:36:08 -08:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Nicolas Geoffray
7effde0048 Don't preopt on eng builds.
It currently negatively affects some development workflows.

bug:25801231
Change-Id: Ib0476cdd9b4bbef80c6116ab8a5ae381bff047c0
2015-12-18 10:14:31 +00:00
Nicolas Geoffray
2ad526124c Revert "Revert "Make PIC and PREOPT default for all.""
bug:25801231

This reverts commit f2a9135ed1.

Change-Id: I2eca605212b78505667af1f7e9c83f5cca5db35a
2015-12-15 09:54:30 +00:00
Nicolas Geoffray
f2a9135ed1 Revert "Make PIC and PREOPT default for all."
Need to update seed and ariel.

This reverts commit b93f5905d2.

Change-Id: Icc6f1539a97ccb2b1fcb12d2bc48904045689096
2015-12-14 18:22:17 +00:00
Nicolas Geoffray
b93f5905d2 Make PIC and PREOPT default for all.
bug:25888050
bug:25801231

Change-Id: Idf0f466a00dd592c433fc798c29ed80396015713
2015-12-14 13:02:19 +00:00
Brian Carlstrom
1a71f951a7 Remove unneeded aapt dependency
Change-Id: Ie9b550367f7c6b91d46dc2506c420a45b0d39703
2015-07-23 17:12:10 -07:00
Ying Wang
d54520a667 Remove libdvm support from the core build system.
Now libart is the only supported runtime and
we don't need the build variables PRODUCT_RUNTIMES and
DALVIK_VM_LIB.

Bug: 18465297
Change-Id: Ibfda931cde0649163d79b584fb5ccad927a9bc2b
2014-12-16 10:08:00 -08:00
Elliott Hughes
ef8a940f78 Remove libdvm dex preopt support.
libdvm is dead.

Change-Id: Ib8571c007f8a9f0e0eaf5c61b5d2e416b2d95089
2014-11-17 17:49:51 -08:00
Nicolas Geoffray
f3efdfc830 am a6b9e887: am 4af753c1: Merge "Make which dex2oat version to use configurable."
* commit 'a6b9e887b98152f913f4e6d9f864da00bc1cc21e':
  Make which dex2oat version to use configurable.
2014-10-07 09:44:07 +00:00
Nicolas Geoffray
75c08b2118 Make which dex2oat version to use configurable.
Change-Id: Ic13cf6f9dfb117193a5101781945c501d138955c
2014-10-07 08:30:18 +00:00
Narayan Kamath
89ec496f98 Remove services, wifi, ethernet from BOOTCLASSPATH.
They belong to the system_server classpath.

bug: 16555230

Change-Id: Ic84f0b2baf611eeedff6d123cb7191bb0259e600
2014-08-12 10:25:19 +01:00
Brian Carlstrom
fca814550c Strip all multidex files, not just classes.dex
Bug: 10447095
Change-Id: I6053ca97cb0e28621262a385d57c0996e7c1aaab
2014-07-01 23:04:36 -07:00
Ying Wang
b9aa5d43de Multilib support for odex
If the VM is libart and DEXPREOPT is enabled,
- For a Java library and the boot image, we build for both 1st arch and
  2nd arch.
- For an app, we build for the multilib arch the module is targeted for.
The odex file will be in <arch_name>/<module_name>.odex inside the same
dir where the jar/apk file gets installed.
Nothing changed if it's built for libdvm.

Bug: 14694978
Change-Id: I45118a83758b41d52d6c9e38f93f0ba2775a6c74
2014-05-18 22:04:58 -07:00
Nicolas Geoffray
ed154c3ba6 Use debug versions of dex2oat explicitly.
Change-Id: Ie7c238908a5739af752a08fec1a04914026a8f96
2014-04-01 08:43:26 +01:00
Ying Wang
c6848b398d Remove the redundant DISABLE_DEXPREOPT
To disable dexpreopt, use just:
WITH_DEXPREOPT=false

Change-Id: I5804f3774f8ec50eb16c5336776dbce0c28b16d9
2014-03-20 13:01:31 -07:00
Ying Wang
8c7e74ee05 Fix embedded build
1) Disable dexpreopt if DALVIK_VM_LIB isn't set up by the product.
2) DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES is moved to config.mk,
for it's only decided by target arch.
3) Move Java module input from embedded.mk to base.mk.

Change-Id: Ife70b0cd8cee2e5c92f356c808affa56f494b49a
2014-03-20 12:13:10 -07:00
Ying Wang
ad6674cd60 PRODUCT_BOOT_JARS as a list of jar names separated by space
This makes it easier for OEMs to extend the PRODUCT_BOOT_JARS in their
product configuration files.

Change-Id: I5feca2f808b1914c275f28c7a4c38cca2ba6851f
2014-01-07 14:31:49 -08:00
Brian Carlstrom
ced4bff58e Add DEXPREOPT support for ART
Change-Id: I24d0d7b2a23a769f5d69bd4dc14be22e1475b759
2013-12-17 14:44:00 -08:00
Dave Allison
014a3c0d62 Add support for instruction set features
This adds the --instruction-set-features= arguments to the dex2oat
commands for the system images.  The feature set is determined at
build time

(cherry picked from commit 4145a2a20a0f275fe4c77e39d507cd5f8eb7a73b)

(cherry picked from commit 5174bb0529)

Change-Id: I45af3b59752a48897bff2dd468b74f3ea73000be
2013-11-25 12:27:24 -08:00
Brian Carlstrom
71fc41df1e Enable art for user builds
Bug: 10069754
Change-Id: Iaaff33a97bd7b68b2e8d84cd0034b15dde8a4316
2013-09-19 15:07:28 -07:00
Ying Wang
0650d1503d Add PRODUCT_BOOT_JARS to derive BOOTCLASSPATH
- BOOTCLASSPATH now is product-configurable;
- No need to maintain the duplicate values in core/dex_preopt.mk.
- clean up some legacy ALL_PREBUILTs.
Bug: 9990214

Change-Id: Ie3953e66d282e335bb7782b0ebd56102c35ec10e
2013-07-24 15:15:55 -07:00
Jeff Brown
ae859f9b64 Split framework jar.
Change-Id: I38c68ac169a4ea10e4640b5d8e24298a6caaf441
2013-07-17 21:08:18 -07:00
Torne (Richard Coles)
ef5d599600 Add webviewchromium to the preopt jar list.
The default BOOTCLASSPATH now includes webviewchromium.jar, so also add
it to the dex_preopt list.

Change-Id: I67b87cb0bf997c74596c276314a5196f8cf0d1b4
2013-06-06 14:57:42 +01:00
Kenny Root
dfaf384309 Track change to JSSE provider
Change-Id: I130b137f8ba62a3cf1b915dcf6a0cf3dc25043eb
2013-04-29 15:58:54 -07:00
Brian Carlstrom
712676772b resolved conflicts for merge of 5ec66d15 to jb-mr2-dev-plus-aosp
Change-Id: I0ef1665600f78527d0a98c7b36c4c2ef1a8182e3
2013-04-03 14:19:26 -07:00
jwilson
190dde0b1a Add OkHttp to the platform.
Change-Id: I18716683632249573295cb2eb5229a1188ed0f17
2013-04-02 16:24:04 -07:00
Wink Saville
554a0adfb7 Delete frameworks/base/voip use voip-common from frameworks/opt/net/voip
Add voip-common to various files so that its available when booting
and building. Basically everyplace telephony and mms-common where needed
voip-common was added.

In core/pathmap.mk voip is removed as it is no longer in frameworks/base.

Change-Id: Ieaba759a0f69b45c4b8839cbed1fe757cdf190c5
2013-01-28 15:30:58 -08:00
Wink Saville
c16c945497 Create telephony-common and mms-common
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
  frameworks/opt/mms

telephony-common was created by moving some of
  frameworks/base/telephony
to:
  frameworks/opt/telephony

Change-Id: I5613c1447dbe655c55f9ba499e453bb59a06c4c0
2012-07-06 18:06:36 -07:00
Marius Renn
fe97fe9e9f Multi-Project Commit: Move of filterfw out of system/media (3 of 7)
This is part of the multi-project commit to move the filter-framework
from system/media/mca to frameworks/base/media/mca.

Note that the filter-framework will soon be replaced with a refactored
version currently under API review (also to go under frameworks/base).
This move is done now to unblock the PDK efforts.

Change-Id: I3d12882239e0bb66e11d3fb5ec952cc474be4f0a
2012-03-27 10:46:13 -07:00
Justin Ho
0279b62d16 Updated dex-preopt BOOTCLASSPATH with values from init.rc
Bug: 5032006

Change-Id: I6ed7e55ec2b278c0d60ad4e17208480d05af61bc
2011-09-06 13:04:36 -07:00
Eino-Ville Talvala
76a7d82fac Add filterfw.jar to standard list of java libraries to include.
Since classes from this jar are part of the public API, it should be
included by default.

Also add the jar into the dex_preopt list.

Bug: 5098987
Change-Id: Ib39deffea43714eb56630ad1d65411cfde5878fd
2011-08-26 14:22:57 -07:00
Ying Wang
ea482c78e3 am 4d3ac24d: am 84ed6fa2: Disable "-t" for acp.
* commit '4d3ac24dafab161a44fddb1039159b1b484f5841':
  Disable "-t" for acp.
2011-01-19 14:41:25 -08:00
Ying Wang
84ed6fa27b Disable "-t" for acp.
Acp can not handle high resolution file timestamp on ext4.
We need this to fix incremental build on ext4.

Change-Id: I54e45c73ffa44c4253c7a431375d419fa4dccfd9
2011-01-19 12:15:38 -08:00