Commit graph

199 commits

Author SHA1 Message Date
Miao Wang
a11f6c2f0e [RenderScript] Only upgrade RS target API for compat build.
- Fix build

Bug: 22796994
Bug: 22693954
Change-Id: Iff91cc4691ea3e4cd8542cdf38245e2aa7724a71
2015-07-29 11:46:23 -07:00
Miao Wang
302e944c60 [RenderScript] Set RS_PREBUILT_LIBPATH for 64bit targets.
Bug: 22796994
Bug: 22693954

This change fixes the RS_PREBUILT_LIBPATH when used with 64-bit target
devices. It also fixes an issue where the target RenderScript API is
below 21 for 64-bit compilation. In those cases, we should always
upconvert it to 21 (since that is the first available 64-bit release).

Change-Id: I27e9d0bd5c01bac0b3b28e9002333264a55d628f
2015-07-28 19:30:20 -07:00
Ying Wang
c671a7cf5c Split [CC|CXX]_WRAPPER from [TARGET|HOST]_[CC|CXX]
- Don't overwrite [TARGET|HOST]_[CC|CXX] with the [CC|CXX]_WRAPPER prefix,
  so that we can disable the wrapper per module.
- Disable ccache on a module when FDO is enabled.

Bug: 22612634
Change-Id: Ibc04a4742d589955066c7eceb43a0da9a2b893bc
2015-07-20 21:26:53 -07:00
Ying Wang
742f5832b1 Raise progaurd library to platform libraries even for "current" SDK.
Without this change, if an app with "LOCAL_SDK_VERSION := current" links
against a static library that uses removed APIs, the app will fail
ProGuard processing because the removed APIs can't be found in the
current SDK. This works around the issue.

Bug: 18510449
Bug: 20667396
Change-Id: Ia6e2a81cf5ecba972d155e56238ea946f8539411
2015-06-26 19:37:28 +00:00
Yohann Roussel
a9dd74c395 Merge "Add support for RMTYPEDEF with Jack" into mnc-dev 2015-06-02 09:36:27 +00:00
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
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