Commit graph

245 commits

Author SHA1 Message Date
Yohann Roussel
5b2c6e26db Add support for RMTYPEDEF with Jack
Bug: 21099584
Change-Id: I39aa1f24780c216e978ef743098ca7ac65b2962e
2015-05-28 18:10:03 +02:00
Ying Wang
589e8c52fb Use TARGET_DEFAULT_JAVA_LIBRARIES instead of just framework.
- When raising the ProGuard sdk version for platform build, use
  TARGET_DEFAULT_JAVA_LIBRARIES instead of just framework.
- Also added SUPPORT_LIBRARY_ROOT to reference support library resource
  dir.

Bug: 20658265
Change-Id: Ib008d8e70508723db91431a062cac691367f2f6c
2015-05-19 16:03:57 -07:00
Yohann Roussel
f09e59eb52 [DO NOT MERGE] Compile using Jack.
This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_JACK_ENABLED:=full # disabled, full, incremental
in the mk portion defining the module.

Jack execution environement can be controlled with:

Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack

LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.

This includes cherry-picks of the following changes:
b4c49cba57
22c3fa6d73
138768c1bb
5dd3e1d312
83d5d04047
8bc90fd2d6
140274707e
0fbc9ff2a2
833b427d72
f9a27f45b4
2809666941
37822c443d
c6b44d43c3
d2a76c14bf
06744f60fc
95573d5036
b821391614
2794e7b582
801f2c44d0
c76d99dca1
f528e132d6
76a5e0bd1a
e25b3984ff Partially, only Jack related parts werekept
ec46a3b71f
abee3a9f41
77cbe10fd9
daf07db4cd
b6bfb5893a

Ie all Jack related changes untill
b6bfb5893a
except
a96cc59ab5 "Use Jack by default"

Change-Id: If9d47ef1c4fd1e6765ad2a47d816c1ad3cfab0e3
2015-05-19 18:31:05 +02:00
Ying Wang
4f5d0e60b4 Raise SDK version for ProGuard processing when app links support library.
When an app's LOCAL_SDK_VERSION is lower than the support library's
LOCAL_SDK_VERSION,  we artifically raises the "SDK version" "linked"
by ProGuard, to
- suppress ProGuard warnings of referencing symbols unknown to the
  lower SDK version.
- prevent ProGuard stripping subclass in the support library that
  extends class added in the higher SDK version.

This allows us to remove the dangerous ProGuard flag
"-dontwarn android.support.**".

Notes:
- We don't raise the app's LOCAL_SDK_VERSION, so that the app's own
  code is still unable to use the higher SDK version.
- For platform build, we can't just raise to the "current" SDK,
  because would break apps that use APIs removed from the current SDK.
  We raise it to framework.jar instead, which contains the most complete
  symbol set.

Bug: 20658265
Change-Id: I90099073457a65cb8031fbaec6b396d68ce614a7
(cherry picked from commit 8e8d1e7aba)
2015-05-05 17:35:12 +00:00
Yohann Roussel
77cbe10fd9 Use Jack launcher
Bug: 20132430
Change-Id: I6e30ad3dffbb32824a4c62e562359b084e6a8784
2015-04-15 12:29:01 +02:00
Ying Wang
11e923a0e5 am ea517854: am aacc8bb4: am 18ecae31: Merge "Convert bc depfiles to .P files."
* commit 'ea5178545bf939fb65f77cd54eba9f274512638b':
  Convert bc depfiles to .P files.
2015-04-04 01:49:47 +00:00
Ying Wang
b931956076 Convert bc depfiles to .P files.
So you don't need clean step when a header file gets moved or deleted.

Change-Id: Iec0d63b89ba17c4ef0ad75f4a52b6759f2bff58a
2015-04-03 16:55:09 -07:00
Ying Wang
301bd9341f am a840faef: am c35e7902: am 555b7770: Merge "Move the inclusion of depfile to where it\'s generated."
* commit 'a840faef517a196e235a197992e8feb9f13c27b7':
  Move the inclusion of depfile to where it's generated.
2015-04-03 17:39:56 +00:00
Ying Wang
cddece6f8f Move the inclusion of depfile to where it's generated.
Change-Id: Ib7ed6d7d9105e49961ac467fd1d390060d4f5c38
2015-04-03 09:53:41 -07:00
Miao Wang
bb5196e857 [Renderscript] making librsjni.so be packed with apks when
v8.renderscript is needed, even for bundled apps.

Bug: 19343399
Change-Id: I461e244be15e08d4525439bc042529314c84031e
(cherry picked from commit c919b0ba88)
2015-03-13 10:23:30 -07:00
Ying Wang
e25b3984ff Improved nothing-to-do-build
- Removed unnecessary dependency of
  "$(my_symlink) :  $(LOCAL_INSTALLED_MODULE)"
  We can generate symlink to nonexistent file.
  Actually in multilib build $(LOCAL_INSTALLED_MODULE) points to file
  that may not be the target file of the symlink and leads to always
  obsolete $(my_symlink) in the above dependnecy.
- Touch by-product in the dummy rule, to make sure the by-product is
  newer than the main-product.

Change-Id: I2f0e0cc197c49f920fa1f6794083b21cdc333c20
2015-02-26 18:47:21 -08:00
Yohann Roussel
d2a76c14bf Change built module of static java libraries
Set LOCAL_BUILT_MODULE of static java libraries when Jack is enabled
to classes.jack instead of javalib.jar.
This allows that running mm in those libraries will build classes.jack
instead of the jar.

Change-Id: I96b4b227848e971df96331b3f0cc731e856be349
2015-02-18 22:54:18 +01:00
Miao Wang
8b24d3bced Merge "[Renderscript] making librsjni.so be packed with apks when v8.renderscript is needed, even for bundled apps." 2015-02-13 17:56:52 +00:00
Miao Wang
c919b0ba88 [Renderscript] making librsjni.so be packed with apks when
v8.renderscript is needed, even for bundled apps.

Bug: 19343399
Change-Id: I461e244be15e08d4525439bc042529314c84031e
2015-02-12 17:07:31 -08:00
Yohann Roussel
c6b44d43c3 Force make to check date of classes.jack after Jack run
Bug: 19230260
Change-Id: Ibcbacd9e0630cd295ad262bd152fc070866071d2
2015-02-05 15:27:38 +01:00
Yohann Roussel
37822c443d Engage Jack incremental on demand
Each module may engage Jack incremental with

LOCAL_JACK_ENABLED := incremental

Include renaming of LOCAL_USE_JACK to LOCAL_JACK_ENABLED that is
now accepting 3 values "disabled", "full" and "incremental".

Change-Id: Icbff275b397bee36b29312e821f3e8d45f83fbcc
2015-02-04 11:22:26 +01:00
Ying Wang
33360dd569 Running jarjar on Java resources.
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.

When jack is enabled, in jack-java-to-dex we add the Java resources to
a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a
temp dir. Jack will process the resource files and output the result to
PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we
need to call add-carried-jack-resources to readd the resources.
(TODO: if jack can output all resources to a jar/zip file, we can use
that file as the initial package file as well.)

Bug: 18837479
Change-Id: I8d7296e30ec8d005054cf04c4f2aed6d7a0d823b
2015-01-21 11:54:13 -08:00
Jean-Philippe Lesot
edacaa3a26 Merge "Revert "Use Jack to check build"" 2015-01-21 13:52:52 +00:00
Narayan Kamath
c1ed9796bb Revert "Running jarjar on Java resources."
This reverts commit 140274707e.

Breaks the build on uiautomator_compat.

Change-Id: I6d14f39e3432bf5e691027bbb8e7260e4bec8e8d
2015-01-21 11:04:22 +00:00
Ying Wang
140274707e Running jarjar on Java resources.
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.

When jack is enabled, in jack-java-to-dex we add the Java resources to
a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a
temp dir. Jack will process the resource files and output the result to
PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we
need to call add-carried-jack-resources to readd the resources.
(TODO: if jack can output all resources to a jar/zip file, we can use
that file as the initial package file as well.)

Bug: 18837479
Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
2015-01-20 11:46:59 -08:00
Jean-Philippe Lesot
0fbc9ff2a2 Revert "Use Jack to check build"
This reverts commit 8bc90fd2d6.

This CL also impacts standard targets. With Jack enabled, a global
'make' without that CL produce ~287 dex files, with this CL, it
produces ~697 dex files.

Bug: 19069325
Change-Id: I39853da0cba8226f31037733edc420507d76c8c0
2015-01-20 14:19:36 +00:00
Miao Wang
a3edd760d3 am 50ef9040: am 2b942f87: Merge "Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)"
* commit '50ef904068c37792015040c1c28a117fafe328a6':
  Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)
2015-01-16 16:50:15 +00:00
Miao Wang
50ef904068 am 2b942f87: Merge "Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)"
* commit '2b942f87f6b74ad9c5381fa96dcb1d46f155779b':
  Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)
2015-01-16 16:44:15 +00:00
Miao Wang
2b942f87f6 Merge "Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)" 2015-01-16 16:33:53 +00:00
Jeff Davidson
861f88765b am 0c949bd8: am 64606bd5: Merge "Update protobuf library from 2.3 to 2.6."
* commit '0c949bd86773c5d39df11cd824c9df372dc00342':
  Update protobuf library from 2.3 to 2.6.
2015-01-16 00:06:05 +00:00
Jeff Davidson
0c949bd867 am 64606bd5: Merge "Update protobuf library from 2.3 to 2.6."
* commit '64606bd5b0b702b7f6d7fd1088486b5380ccc25f':
  Update protobuf library from 2.3 to 2.6.
2015-01-15 23:01:59 +00:00
Jeff Davidson
64606bd5b0 Merge "Update protobuf library from 2.3 to 2.6." 2015-01-15 22:49:00 +00:00
Yohann Roussel
8b5ff260d9 Merge "Use Jack to check build" 2015-01-15 17:58:36 +00:00
Yohann Roussel
8bc90fd2d6 Use Jack to check build
Of modules that are to be compiled with Jack.

Change-Id: Ie8bd00f67f09c0e5ed8fe650f5131a3dfc29e277
2015-01-15 11:23:38 +01:00
Yohann Roussel
2826cb961b Merge "Remove some useless depencies" 2015-01-15 09:09:47 +00:00
Yohann Roussel
138768c1bb Remove some useless depencies
... from dexes to jars. This should allow to build less jars when
building dex files with Jack and Jill.

Change-Id: Ib3a717251e3bec3cc73564c205eb908ba1ef380f
2015-01-13 17:05:36 +01:00
Miao Wang
962dd8a012 am de00ebbe: am caf44db2: Merge "Add build rules for 64bit Renderscript Compat lib."
* commit 'de00ebbe24185237a1056fde39cfc839534e31da':
  Add build rules for 64bit Renderscript Compat lib.
2015-01-09 17:52:49 +00:00
Miao Wang
de00ebbe24 am caf44db2: Merge "Add build rules for 64bit Renderscript Compat lib."
* commit 'caf44db2d1d829a001d5b0ac8371d33928b3d575':
  Add build rules for 64bit Renderscript Compat lib.
2015-01-09 17:48:22 +00:00
Miao Wang
ec27a8966c Add build rules for libRSSupportIO (Usage_IO lib for RS compat lib)
bug 12924018

Change-Id: I35af72c1f7788f9fd9cb24bfabdbbad09e865a8b
2015-01-09 09:43:09 -08:00
Miao Wang
e4359cf0f3 Add build rules for 64bit Renderscript Compat lib.
Change-Id: Iea168f8ecb3b4cf6b9ab6ffefc403eb77ee09000
2015-01-08 17:19:42 -08:00
Jeff Davidson
b1055a195a Update protobuf library from 2.3 to 2.6.
Change-Id: I02d308b01f635307dbb63ea9610db2e56eb1f31b
2015-01-08 16:35:11 -08:00
Yohann Roussel
22c3fa6d73 Adapt to Jack and Jill Brest release
Includes cherry-picks of:
2e78d2f4263bc7c0f90d58af7014017f16aa3ce6 Jack option --import-res was renamed --import-resource
fdc913ee86fe0c45581178b901a673fdd7937e03 Update references to Jack type collison policy
8d83d1b21ec678fb9fb1c6ee643ace46d5f700ce Rename jill tmp file
8a1c98ce4ba0b4db39f274d6258b6a08bbc3ec2c Ensure that jar-arg-list is never shared
8d83d1b21ec678fb9fb1c6ee643ace46d5f700ce Remove manipulations of jack libraries

Change-Id: I3ee159d408ba5281ac15c9836dc4fd2bdeb845d3
2014-12-10 15:41:56 +01:00
Yohann Roussel
b4c49cba57 Compile using Jack.
This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_USE_JACK:=true # false
in the mk portion defining the module.

Jack execution environement can be controlled with:

Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack

LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.

Change-Id: Ib81a0fd5f86a51d1e0edbb81cc791d828a05dd29
2014-12-02 18:11:13 +01:00
Dan Albert
6da20991fd am 5245bc8b: am 201f6b3e: Merge "Make modules depend on their makefile."
* commit '5245bc8b3421b3a9676a9ad650d0804d8d9e2787':
  Make modules depend on their makefile.
2014-11-11 23:00:40 +00:00
Dan Albert
5245bc8b34 am 201f6b3e: Merge "Make modules depend on their makefile."
* commit '201f6b3e92a2ef2f3a117f33cd399d5304dd385a':
  Make modules depend on their makefile.
2014-11-11 22:56:01 +00:00
Dan Albert
954b5bdcf4 Make modules depend on their makefile.
This should obviate much of the need for cleanspecs, and also make it
unnecessary to continue adding LOCAL_ADDITIONAL_DEPENDENCIES for this
sort of thing all over the tree.

Change-Id: I97aa8fd280ae868a5f6364f8b7bf3c2fe235d6ce
2014-11-11 14:30:54 -08:00
Ying Wang
f4053c70e4 am 007026f0: am 3fe170c5: Merge "Add support for prebuilt AARs." into lmp-mr1-ub-dev
* commit '007026f0ebf2216d875b9fdab44cc68b659e2307':
  Add support for prebuilt AARs.
2014-11-03 18:11:53 +00:00
Ying Wang
007026f0eb am 3fe170c5: Merge "Add support for prebuilt AARs." into lmp-mr1-ub-dev
* commit '3fe170c51ea1eca253164fa8738ab42b5b9aaa6b':
  Add support for prebuilt AARs.
2014-11-03 18:07:45 +00:00
Nick Kralevich
0a5105bd25 am e4cbc2af: Merge "Revert "Add support for prebuilt AARs."" into lmp-mr1-ub-dev
* commit 'e4cbc2af5f476d9eb875253584260bed807acddf':
  Revert "Add support for prebuilt AARs."
2014-11-02 16:53:29 +00:00
Ying Wang
e9dd9f2bfc Add support for prebuilt AARs.
- You can give a .aar as source file to a prebuilt static Java library
  module. The build system will set up dependencies and rules to extract
  classes.jar and other resource files.
- To build against a prebuilt AAR module, use:
  LOCAL_STATIC_JAVA_AAR_LIBRARIES := <module names of aar prebuilt AARs>
  The build system will set up rules to merge the library's
  AndroidManifest.xml with the main AndroidManifest.xml, add the AAR's
  resource dirs and link/merge the AAR's classes.jar.

Bug: 18168693
Change-Id: Ic2c1d20572a93bd98dbc72f8a39e26b459e442c2
2014-11-02 16:51:49 +00:00
Nick Kralevich
36fd476843 Revert "Add support for prebuilt AARs."
master doesn't compile anymore.

This reverts commit f567292504.

Change-Id: Icc16fe5360d1222740b803e9dd006081e3c66e46
(cherry picked from commit bcf8683b29)
2014-11-02 05:26:14 +00:00
Nick Kralevich
bcf8683b29 Revert "Add support for prebuilt AARs."
master doesn't compile anymore.

This reverts commit f567292504.

Change-Id: Icc16fe5360d1222740b803e9dd006081e3c66e46
2014-11-02 05:11:11 +00:00
Ying Wang
df95d8c1f7 am 4ef8133a: am f5672925: Add support for prebuilt AARs.
* commit '4ef8133a421dd92c6feb0508bc2274f12576cfd2':
  Add support for prebuilt AARs.
2014-10-31 00:20:31 +00:00
Ying Wang
4ef8133a42 am f5672925: Add support for prebuilt AARs.
* commit 'f56729250448200834c5c95c86c937e887d73623':
  Add support for prebuilt AARs.
2014-10-31 00:13:50 +00:00
Ying Wang
f567292504 Add support for prebuilt AARs.
- You can give a .aar as source file to a prebuilt static Java library
  module. The build system will set up dependencies and rules to extract
  classes.jar and other resource files.
- To build against a prebuilt AAR module, use:
  LOCAL_STATIC_JAVA_AAR_LIBRARIES := <module names of aar prebuilt AARs>
  The build system will set up rules to merge the library's
  AndroidManifest.xml with the main AndroidManifest.xml, add the AAR's
  resource dirs and link/merge the AAR's classes.jar.

Bug: 18168693
Change-Id: I478913d5d498f800b322529d7c2c2c0ea78425e5
2014-10-29 23:40:52 +00:00
Jeff Davidson
79ddea19f6 am 4e466096: am ed9981d9: am 427d1e98: Merge "Pull in latest protolib when using LOCAL_PROTOC_OPTIMIZE_TYPE."
* commit '4e4660961b6c704d13c6c521f36958f436ec40f3':
  Pull in latest protolib when using LOCAL_PROTOC_OPTIMIZE_TYPE.
2014-10-29 20:52:18 +00:00
Jeff Davidson
ed9981d927 am 427d1e98: Merge "Pull in latest protolib when using LOCAL_PROTOC_OPTIMIZE_TYPE."
* commit '427d1e98eceb78f5cb8f1e50d00d342fc7f359c6':
  Pull in latest protolib when using LOCAL_PROTOC_OPTIMIZE_TYPE.
2014-10-29 17:40:05 +00:00
Jeff Davidson
b8ddd55b55 Pull in latest protolib when using LOCAL_PROTOC_OPTIMIZE_TYPE.
If a module is explicitly depending on a versioned protolib, we strip
the dependency and log a warning so the unneeded dependency can be
removed.

Change-Id: I949d32fb5126f1c05e2a6ed48f6636a4a9b15a48
2014-10-23 07:20:16 -07:00
Ying Wang
2fee3a8659 Allow to build libcore in PDK build.
Change-Id: Ice40f19dd3302378daa9bd4c4ecd2c1d2c7ff284
2014-10-17 18:26:39 -07:00
Mark Renouf
ba19802001 am 0ab5cc6b: am 99332f11: Allow for opt-in of proguard shrinking of tests with new flag
* commit '0ab5cc6b8e04e0a07778f3c620a9edac3a40bc4e':
  Allow for opt-in of proguard shrinking of tests with new flag
2014-09-10 07:01:07 +00:00
Mark Renouf
99332f11c5 Allow for opt-in of proguard shrinking of tests with new flag
By adding 'shrinktests' to LOCAL_PROGUARD_ENABLED, the -dontshrink
flag will be omitted from the resulting proguard config allowing
tests to have unnecessary classes removed before dexxing.

Clockwork is running into 64k method limits on some tests which
depend on GmsCore. On 4.4W (klp-modular-dev) we don't have the
option for multi-dex so proguard is the only solution here.

This change leaves the default behavior unchanged. Shrinking is
still disabled for tests by default unless the 'shrinktests'
flag is set in the Makefile.

Change-Id: Ib586ae9e7f617072b41e95742559bf7c8a6a6ce1
2014-09-09 20:42:48 -04:00
Ying Wang
efb935800b Support "LOCAL_SDK_VERSION := system_current"
A module can declare "LOCAL_SDK_VERSION := system_current" to build
against the android system stubs generated from source.
For now this is only supported in platform build.

Change-Id: I1e9bbd159886bc0ea3a02b1dc4cbcb1a56e9cb15
2014-07-19 17:00:50 -07:00
Yohann Roussel
e019dfd721 Support dx generating multiple dex files.
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.

(cherry picked from commit 8ffe9c3e79)

Conflicts:
        core/java.mk

Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
2014-07-16 12:38:22 +02:00
Jeff Brown
4c4aa99ced Support more precise package exclusion from JAR files.
Allow LOCAL_JAR_PACKAGES to work on subpackages.  Previously it
only worked on top-level packages due to a bug in how the directories
were recursively deleted.

Add LOCAL_JAR_EXCLUDE_PACKAGES to allow specific subpackages to
be excluded.  This rule applies after LOCAL_JAR_PACKAGES has
selected which packages to include.  It may also be used independently.

Change-Id: Ibd0e495be1a20c84b59c9da132e92100ef3f8705
2014-05-23 18:41:19 -07:00
Yuncheol Heo
623d706253 Fix the path for findbugs.
Change-Id: I45485f1aeaf7fc3db2839f42829278d8c0ec97e3
2014-05-20 17:13:34 +09:00
Ying Wang
a87489b5c2 am 74b71317: am 2d72094f: am 960d919e: resolved conflicts for merge of 4df82b3e to klp-dev-plus-aosp
* commit '74b71317711fe4bacc6422e45de599fea840f061':
  Allow proguarding the main app and the test app in a single run.
2014-02-10 12:51:36 +00:00
Ying Wang
960d919e81 resolved conflicts for merge of 4df82b3e to klp-dev-plus-aosp
Change-Id: I7a1d9e1954ede06a818814bd05a77c69f1ed3bc6
2014-02-08 10:31:46 -08:00
Mihail Dumitrescu
4df82b3e30 Allow proguarding the main app and the test app in a single run.
Bug: 12895101
Change-Id: I6804d73306a164d3e3ec0cab4743f9582b5ef2cf
2014-02-07 19:11:24 +00:00
Ying Wang
057375d783 am 03a06f41: am 9507a0fd: am 82c59aef: am 71e8a22e: Merge "Add DEXPREOPT support for ART"
* commit '03a06f4158e9eea9152f25286fcf2c30044d4e06':
  Add DEXPREOPT support for ART
2013-12-18 01:06:10 +00:00
Brian Carlstrom
ced4bff58e Add DEXPREOPT support for ART
Change-Id: I24d0d7b2a23a769f5d69bd4dc14be22e1475b759
2013-12-17 14:44:00 -08:00
Stephen Hines
4e12f542be Add FORCE_BUILD_RS_COMPAT option.
This enables the .so libraries to be built for apps using the
RenderScript support library. Traditionally, we trim these .so
files from full platform builds.

Change-Id: I6f8e9b8d2b671338d3d5a5ac0bfcc60fd448688b
2013-11-27 14:54:15 -08:00
Stephen Hines
c54e81c0df Add FORCE_BUILD_RS_COMPAT option.
This enables the .so libraries to be built for apps using the
RenderScript support library. Traditionally, we trim these .so
files from full platform builds.

Change-Id: I6f8e9b8d2b671338d3d5a5ac0bfcc60fd448688b
2013-09-30 15:57:36 -07:00
Ying Wang
3057adbace Drop the [no]proguard. prefix for the intermediate targets
Since we have enabled Progaurd for all build variants, we don't need the
different naming scheme along the path to make incremental build work
properly when you switch build variant.
As a result, this fixes the nothing-to-do-do-build-gets-something-build bug
introduced by the multi-dex change.

Change-Id: I907ff13091013d28910b0aa190b9218144385132
2013-09-12 17:50:11 -07:00
Ying Wang
7b7929ad38 Drop the [no]proguard. prefix for the intermediate targets
Since we have enabled Progaurd for all build variants, we don't need the
different naming scheme along the path to make incremental build work
properly when you switch build variant.
As a result, this fixes the nothing-to-do-do-build-gets-something-build bug
introduced by the multi-dex change.

Change-Id: I907ff13091013d28910b0aa190b9218144385132
2013-09-12 17:35:21 -07:00
Ying Wang
18c5126262 am 54e81f54: am 37b82aac: Skip compiling Java if an apk has no Java code.
* commit '54e81f546ccbb82b1b3a6d27026f8c58bd24731d':
  Skip compiling Java if an apk has no Java code.
2013-08-28 17:36:31 -07:00
Ying Wang
37b82aacd9 Skip compiling Java if an apk has no Java code.
Change-Id: Iee204e03ad5bc8ce5c3b4b3863c19c89184826e2
2013-08-28 17:28:36 -07:00
Ying Wang
664a236795 resolved conflicts for merge of 9915650b to master
Change-Id: Ice0f39a84363b76ea37801eb09a1d5cfd79d38fe
2013-08-28 14:45:37 -07:00
Ying Wang
53efca6c5b am 161aa74d: am 576e0146: Make it a fatal error if no source files for Java module.
* commit '161aa74de6aaa03d67f9dac10b71f15ebe728b3c':
  Make it a fatal error if no source files for Java module.
2013-08-28 14:06:41 -07:00
Ying Wang
990cf5e57d Better handle of need_compile_java.
Change-Id: I609a27e2b35b08962243b6516c6c525c0c938d3c
2013-08-28 14:05:20 -07:00
Ying Wang
576e0146a9 Make it a fatal error if no source files for Java module.
Change-Id: Ia04158c11381b6b1687b9d5c699a9ea8ae3cb317
2013-08-28 11:19:36 -07:00
Ying Wang
e260b24cde am 670a7a63: am c5b72527: am ec3c15e5: am 04c4d34d: am 7311a344: Make it easier to enable obfuscation and optimization.
* commit '670a7a6389948c325399ae9bb3dc6a678f9982f8':
  Make it easier to enable obfuscation and optimization.
2013-08-23 10:20:28 -07:00
Ying Wang
c5b72527d3 am ec3c15e5: am 04c4d34d: am 7311a344: Make it easier to enable obfuscation and optimization.
* commit 'ec3c15e5c7c11cf3a831898f286c7eb7c216e50f':
  Make it easier to enable obfuscation and optimization.
2013-08-23 10:12:26 -07:00
Ying Wang
7311a344be Make it easier to enable obfuscation and optimization.
With this change, use:
* LOCAL_PROGUARD_ENABLED := obfuscation  # to enable obfuscation
* LOCAL_PROGUARD_ENABLED := optimization # to enable optimization
* LOCAL_PROGUARD_ENABLED := obfuscation optimization # to enable both

Now the meaning of the LOCAL_PROGUARD_ENABLED options:
* full:
    Use the build system's default configurations:
    with shrink but no obfuscation or optimization,
    global proguard flags in build/core/proguard.flags
    are applied.
* custom:
    The same as "full" except no aapt-generated resource-related
    proguard flags.
* nosystem:
    Don't use any build system's default configurations; but
    aapt-generated proguard flags are still applied. You are
    responsible for any other flags.
* disabled:
    Disable proguard.
* obfuscation:
    The same as "full" but with obfuscation enabled.
* optimization:
    The same as "full" but with optimization enabled.
* no value (the default):
    The build system chooses the proper value: "full" if it's an
    app; "disabled" if it's a library.

You can use more than 1 of them in a meaningful combination,
for example:
LOCAL_PROGUARD_ENABLED := obfuscation optimization

Bug: 10307372
Change-Id: Id248caca3048e99547f16559fae74f4afe85c354
2013-08-22 17:12:38 -07:00
Yohann Roussel
400c48cc3b Merge "Support dx generating multiple dex files." 2013-08-22 08:31:14 +00:00
Yohann Roussel
8ffe9c3e79 Support dx generating multiple dex files.
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.

Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
2013-08-20 20:53:40 +02:00
Ying Wang
a3b7593546 Support to optionally run rmtypedefs.
Bug: 10330586
Change-Id: I6ddfca2ec986cf2c82b0942b7a5360508f095e9a
2013-08-14 18:20:54 -07:00
Mike Lockwood
c73018c2e9 Fix typo from previous change to fix the build
Change-Id: I6cf7217eb81abd794339143b7c23456b68808caf
2013-08-06 16:15:48 -07:00
Mike Lockwood
6e5d867e30 Add support for overriding default Java libraries on a per-target basis
Change-Id: I425041554867a7ed7d74e1d603f160b2110bc86b
2013-08-06 15:07:18 -07:00
Jeff Brown
ae859f9b64 Split framework jar.
Change-Id: I38c68ac169a4ea10e4640b5d8e24298a6caaf441
2013-07-17 21:08:18 -07:00
Torne (Richard Coles)
d919c7a314 Add proper deps for jarjar rules files.
Changes to the jarjar rules file for a module were not causing
rebuilds; add the missing dependency.

Change-Id: Ib78fa708681cbc414218fe84cc2c4282c619f45f
2013-06-05 14:25:47 +01:00
Ying Wang
5745351908 Split out proguard_basic_keeps.flags
For 'LOCAL_PROGUARD_ENABLED := nosystem' we still include
proguard_basic_keeps.flags.

Change-Id: I43ee7e98d2aaeb84879441f90ab6839c0e8f4e65
2013-05-17 10:02:00 -07:00
Tim Murray
8e0567ae77 Don't build librs.*.so in bundled branches since we'll use native RS.
bug 8939828

Change-Id: I3f991ad7b6b1590063a9048326fd95edc483af13
2013-05-13 15:46:37 -07:00
Ulas Kirazci
bde274ef83 Add a "nano" option to LOCAL_PROTOC_OPTIMIZE_TYPE.
Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
2013-04-03 13:37:07 -07:00
Stephen Hines
8db4ccea4a Link RS compatibility files with libc and make bcc_compat a regular dep.
If we don't do "-lc", we end up missing symbols like "memset" on our non-NEON
builds. It also makes more sense to have bcc_compat as a standard dependency
for now, since it occasionally changes the way we compile/link our source
files.

Change-Id: I4b0ead66caa7c72fb7733db8804a33faa5350930
2013-03-27 16:51:38 -07:00
Tim Murray
1a6f09a48c Add support for multiple architectures with RS compat lib.
Change-Id: I310f6f72e1124c06e9c59b0f59d33f168dc1e632
2013-03-06 17:15:26 -08:00
Stephen Hines
9ac9b53dc6 Reduce RS build verbosity.
Change-Id: I9d04198ed1b9025abd60080c5ef23b3ce5ef9e22
2013-02-27 00:51:08 -08:00
Ying Wang
370fa673b5 Build rs_compatibility_jni_libs into product-specific dir
They can't be shared across products.

Change-Id: I2e2b9126f2e78eb28866978d58cf6eb8c52f3d09
2013-02-25 16:06:42 -08:00
Ying Wang
9c3aa053f5 Order-only deps on LOCAL_C/CXX and BCC_COMPAT
So if the host binaries are updated, we don't run the rules again.
Bug: 8234097

Change-Id: I6c888d2b3ae39db1f91411da630ac098273f139d
2013-02-20 13:34:05 -08:00
Stephen Hines
d1f4e18574 Fix duplicate build rule warning.
Change-Id: Ieb90af933bff162cd1ed5aa36fc1efd2b4ca7e04
2013-02-19 14:31:59 -08:00
Stephen Hines
ec02b4f8d5 Switch to librs.FOO.so instead of libFOO.so to prevent collisions.
Change-Id: Ifda68f3d416d87d6f4916e44a350f15b68994536
2013-02-15 23:02:20 -08:00
Stephen Hines
4cc701480c Merge "Remove dependency on libcompiler_rt.so for RS compatibility." 2013-02-13 22:36:15 +00:00
Stephen Hines
4404433876 Remove dependency on libcompiler_rt.so for RS compatibility.
We are now using libcompiler_rt.a, so we don't need the shared version.

Change-Id: I1d35238581dc344de6918e037e89aa0362885e0e
2013-02-13 14:13:40 -08:00
Ying Wang
8392284a70 Disable LOCAL_RENDERSCRIPT_COMPATIBILITY for non-arm builds
This fixes the x86 build.

Change-Id: I370063fc83915c4c20cee08cc4feae68c7d7292b
2013-02-13 10:48:28 -08:00
Stephen Hines
6adffc196f Remove libcompiler_rt.so dependency for RS compat lib.
Change-Id: I0d871c9c7d7946b8551fdefd201603bb59ea010e
2013-02-11 20:03:38 -08:00
Stephen Hines
7b3c71d1be Add libcompiler_rt.so as a JNI dependency for RS compatibility.
Change-Id: I8840faaa86ae31abc3d78553eecdd1e642c6d15d
2013-02-11 11:11:22 -08:00