Commit Graph

225 Commits

Author SHA1 Message Date
Ying Wang f951b7743f am 1c00c702: am 45322890: am d2aa51b8: Merge "Clean the last bit of LOCAL_BUILD_HOST_DEX."
* commit '1c00c7026c23967ca33524356dc11d9885f960f9':
  Clean the last bit of LOCAL_BUILD_HOST_DEX.
2014-07-08 00:31:00 +00:00
Ying Wang 1c00c7026c am 45322890: am d2aa51b8: Merge "Clean the last bit of LOCAL_BUILD_HOST_DEX."
* commit '45322890266c1d704b130fabd7ee5bab5db35997':
  Clean the last bit of LOCAL_BUILD_HOST_DEX.
2014-07-08 00:26:10 +00:00
Ying Wang f25318a5f9 Clean the last bit of LOCAL_BUILD_HOST_DEX.
Long live LOCAL_BUILD_HOST_DEX!

Change-Id: I8de23cfc78edc554606a2e1a8a955e8bc3ad02b0
2014-07-07 17:15:38 -07:00
Ying Wang 904446ce0b am 1a3d260f: am e69d4350: Merge "Support to add JNI of both archs in multilib build."
* commit '1a3d260f68755b476aa867477fc75d47ef5317bf':
  Support to add JNI of both archs in multilib build.
2014-06-25 18:46:34 +00:00
Ying Wang 58f8cf7273 am 904446ce: am 1a3d260f: am e69d4350: Merge "Support to add JNI of both archs in multilib build."
* commit '904446ce0b3f430ac88ae0c08b9c613721474cd5':
  Support to add JNI of both archs in multilib build.
2014-06-25 18:52:02 +00:00
Ying Wang 8e20ef6205 Support to add JNI of both archs in multilib build.
Use "LOCAL_MULTILIB := both" to install jni libraries of both archs in
multilib build.
The build system will package jni of both archs to the apk, or install
them to the right location on the system image and create symlinks,
extract .so files from prebuilt apk, etc if appropriate.

Bug: 15849902
Change-Id: I7e147b5a47db476584c38250de7b36c75ea40d81
2014-06-25 09:07:01 -07:00
Ying Wang 274ad525c1 am 32aff808: am 6bfbfee5: am a45a5d27: Merge "Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn\'t restricted"
* commit '32aff8085a2f5fed34a4d28b78bb52a10a5b5751':
  Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn't restricted
2014-06-11 20:49:37 +00:00
Ying Wang 32aff8085a am 6bfbfee5: am a45a5d27: Merge "Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn\'t restricted"
* commit '6bfbfee5358715933fa90cc3ecd8fcf43338315b':
  Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn't restricted
2014-06-10 23:32:41 +00:00
Ying Wang 6e85f8b0de Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn't restricted
Otherwise we may end up conflict between LOCAL_MODULE_HOST_ARCH and the
default multilib mode.
Also removed the unneeded variants of LOCAL_MODULE_HOST_ARCH.

Change-Id: I9e5a0144da3cb6310be0ddf098738987e51305de
2014-06-10 16:24:31 -07:00
Ying Wang 9df5043594 resolved conflicts for merge of 536d4a76 to master
Change-Id: Ib655d08e5c9272aef1fd1e130b5fb2b63148a55e
2014-05-28 11:05:47 -07:00
Ying Wang 536d4a761b am 7e4c73d5: am aae7e3fa: Merge "Support LOCAL_CLANG with arch/bit suffix."
* commit '7e4c73d5885402f5c301309094ce3dbceef0ecd3':
  Support LOCAL_CLANG with arch/bit suffix.
2014-05-28 16:18:56 +00:00
Ying Wang 7e4c73d588 am aae7e3fa: Merge "Support LOCAL_CLANG with arch/bit suffix."
* commit 'aae7e3fa66ecf6bf796ba9a107d8f066498ab10b':
  Support LOCAL_CLANG with arch/bit suffix.
2014-05-28 16:14:54 +00:00
Ying Wang 824344af00 Support LOCAL_CLANG with arch/bit suffix.
Precedence: LOCAL_CLANG_<arch> > LOCAL_CLANG_<32|64> > LOCAL_CLANG.

Bug: 15257067
Change-Id: I86b72f3bec162834591287d3b5231b5f40f9a431
2014-05-27 13:06:08 -07: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
Ying Wang 2f4c0a8617 am 8a724260: am 4e151105: Merge "Support to extract JNI libs from prebuilt APK"
* commit '8a724260f2a3900808e0e733b893a37c119fe3f1':
  Support to extract JNI libs from prebuilt APK
2014-05-21 01:10:15 +00:00
Ying Wang 8a724260f2 am 4e151105: Merge "Support to extract JNI libs from prebuilt APK"
* commit '4e151105a02ba09acb277c6a084252d01c561a5f':
  Support to extract JNI libs from prebuilt APK
2014-05-21 01:06:03 +00:00
Ying Wang 7cf9f28b5f Support to extract JNI libs from prebuilt APK
Use LOCAL_PREBUILT_JNI_LIBS to install prebuilt JNI libraries extracted
from the prebuilt apk, or prebuilts as source, to the app specific lib path.
LOCAL_PREBUILT_JNI_LIBS accepts 2 kinds of files:
- Files like @path/to/libfoo.so (path inside the apk) are JNI libs
  extracted from the prebuilt apk. In this case, all embedded JNI libs
  inside the prebuilt apk are stripped.
- Files like path/to/libfoo.so (path relative to LOCAL_PATH) are
  prebuilts in the source tree.

Those prebuilt JNI libs are not defined as modules in the build system,
so this works around possible module name conflict.

Bug: 13170859
Change-Id: I91bb844cc11b3621a85733bc7e8910f168957ef0
2014-05-20 18:02:17 -07:00
Brian Carlstrom 8d422a3a0b am 8074ff4d: am a8355eca: am 64f3a191: Merge "Multilib support for odex"
* commit '8074ff4d0f962a933586b9809d1f1bdffe1fe5ed':
  Multilib support for odex
2014-05-19 17:04:54 +00:00
Brian Carlstrom 8074ff4d0f am a8355eca: am 64f3a191: Merge "Multilib support for odex"
* commit 'a8355ecaadf9a0d052165d0cc14564927eb9a202':
  Multilib support for odex
2014-05-19 16:59:16 +00:00
Brian Carlstrom a8355ecaad am 64f3a191: Merge "Multilib support for odex"
* commit '64f3a191f92a6ab84a8175ad480633b8c58ac900':
  Multilib support for odex
2014-05-19 16:53:35 +00: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
Ying Wang 8200231ae1 am e50f2d9f: am 40b49d30: am a74ade94: Merge "Support host multilib build"
* commit 'e50f2d9f32a27d8290692dbf99ab8b247ef9d553':
  Support host multilib build
2014-05-15 01:09:49 +00:00
Ying Wang e50f2d9f32 am 40b49d30: am a74ade94: Merge "Support host multilib build"
* commit '40b49d3043bd41ca5548b99b537038187fdca258':
  Support host multilib build
2014-05-15 00:44:53 +00:00
Ying Wang 40b49d3043 am a74ade94: Merge "Support host multilib build"
* commit 'a74ade945776e80f99f3b05d06a131cfd353c3f6':
  Support host multilib build
2014-05-15 00:41:37 +00:00
Ying Wang 6feb6d5607 Support host multilib build
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.

In host module definition, like in target ones, you can use the
following
LOCAL variables to set up multilib configuration:
LOCAL_MULTILIB: can be "both", "first", "32" or "64".
It also supports the same set of arch or 32-vs-64 specific LOCAL
variables.
By default, it builds only for the first arch.

To keep path compatibility, in x86_64 build files are still output to
out/host/linux-x86; Both 32-bit and 64-bit executables are in
out/host/linux-86/bin;
In x86_64 build 32-bit shared libraries are installed to
out/host/linux-x86/lib32
and 64-bit shared libraries are installed to out/host/linux-x86/lib;
32-bit object files are output to out/host/linux-x86/obj32 and 64-bit
object files
are output to out/host/linux-x86/obj.

Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
2014-05-14 16:55:04 -07:00
Ying Wang 1ba08f6b7c am 2d41656c: am f6603f75: Merge "Add tool to package up built modules."
* commit '2d41656cdb41853e42a7ea2c0597ce505ef51750':
  Add tool to package up built modules.
2014-05-09 00:10:43 +00:00
Ying Wang 2d41656cdb am f6603f75: Merge "Add tool to package up built modules."
* commit 'f6603f753d492823e19d0677d5a9ccfc16f51805':
  Add tool to package up built modules.
2014-05-09 00:06:35 +00:00
Ying Wang 989ac38d93 Add tool to package up built modules.
With this change, you can package up modules while avoiding installing
them to the system.img or userdata.img.
- build/core/tasks/tools/package-modules.mk
  You can use this template to package up modules into a zip file and
  preserve the installed file paths.
- LOCAL_PICKUP_FILES, you can use this variable to package up extra
  files/directories.

Bug: 13585955
Change-Id: I103042b24ccf17cf5dc90c016d97ed1dd293e50b
2014-05-08 17:01:06 -07:00
Ying Wang 3b81aabbd0 Add tool to package up built modules.
With this change, you can package up modules while avoiding installing
them to the system.img or userdata.img.
- build/core/tasks/tools/package-modules.mk
  You can use this template to package up modules into a zip file and
  preserve the installed file paths.
- LOCAL_PICKUP_FILES, you can use this variable to package up extra
  files/directories.

Bug: 13585955
Change-Id: I103042b24ccf17cf5dc90c016d97ed1dd293e50b
2014-05-05 16:46:52 -07:00
Bill Yi 1e4adfa837 Merge commit '8113e43601aac7702b9ec007e81a179826143d1e' into HEAD 2014-04-29 11:32:53 -07:00
Ying Wang b8888432f0 Set up rules to build oem.img
To build oem.img:
- You must define BOARD_OEMIMAGE_PARTITION_SIZE in your BoardConfig.mk
- The file system type will be the same as system.img and userdata.img.
- To install a module to oem.img, use "LOCAL_OEM_MODULE := true"
- run "make -j48 showcommands oem_image dist". By default it's not
  built.

Bug: 13367676
Change-Id: I1a26d4d0c61b72ecffe60279667b1b3de050780d
2014-04-28 09:43:51 -07:00
Ying Wang 74eb6600b4 Support to extract JNI libs from prebuilt APK
Use LOCAL_PREBUILT_JNI_LIBS to install prebuilt JNI libraries extracted
from the prebuilt apk, or prebuilts as source, to the app specific lib path.
LOCAL_PREBUILT_JNI_LIBS accepts 2 kinds of files:
- Files like @path/to/libfoo.so (path inside the apk) are JNI libs
  extracted from the prebuilt apk. In this case, all embedded JNI libs
  inside the prebuilt apk are stripped.
- Files like path/to/libfoo.so (path relative to LOCAL_PATH) are
  prebuilts in the source tree.

Those prebuilt JNI libs are not defined as modules in the build system,
so this works around possible module name conflict.

Bug: 13170859
Change-Id: I91bb844cc11b3621a85733bc7e8910f168957ef0
2014-04-18 20:13:41 -07:00
Colin Cross 87cf2b5bec am 25313cd3: am 59cc3f5d: am 5b1fa1c8: Merge "build: remove LOCAL_NO_2ND_ARCH"
* commit '25313cd32a78108945d65144399fc292350e9e0a':
  build: remove LOCAL_NO_2ND_ARCH
2014-04-12 00:12:20 +00:00
Colin Cross 25313cd32a am 59cc3f5d: am 5b1fa1c8: Merge "build: remove LOCAL_NO_2ND_ARCH"
* commit '59cc3f5d2a65d1114b0643c453af8b9249970dfd':
  build: remove LOCAL_NO_2ND_ARCH
2014-04-12 00:09:41 +00:00
Colin Cross 149d65b177 build: remove LOCAL_NO_2ND_ARCH
Delete LOCAL_NO_2ND_ARCH, it is no longer used.  Equivalent
functionality is available with LOCAL_MULTILIB := first.

Change-Id: I36838a8a7e10b0a59ca0022c4c8a3a190e782c71
2014-04-11 16:57:36 -07:00
Colin Cross 6443630cca am 441e9452: resolved conflicts for merge of f3e25fea to klp-modular-dev-plus-aosp
* commit '441e9452488ccb98f7b0a7690b86fcdff733e5f0':
  add support for LOCAL_MULTILIB
2014-03-27 00:14:05 +00:00
Colin Cross 441e945248 resolved conflicts for merge of f3e25fea to klp-modular-dev-plus-aosp
Change-Id: I7b002780d8282b54821e8761198bc0af3e7ce71e
2014-03-26 17:06:33 -07:00
Colin Cross e6e48f67d8 add support for LOCAL_MULTILIB
LOCAL_MULTILIB replaces LOCAL_32_BIT_ONLY and
LOCAL_NO_2ND_ARCH, although both are still supported.

Set LOCAL_MULTILIB := 32 to always build a module 32-bit.
This is the same as specifying LOCAL_32_BIT_ONLY.

Set LOCAL_MULTILIB := first to always build a module for
the first architecture (64-bit on a 64-bit target, 32-bit on a
32-bit target).  This is the same as specifying LOCAL_NO_2ND_ARCH.

Set LOCAL_MULTILIB := both to build for both architectures
on a mulitlib (64-bit) target.

If LOCAL_MULTILIB is not set libraries will default to "both",
and executables, packages, and prebuilts will default to building
for the first architecture if supported by the module, otherwise
the second.

Executables that set LOCAL_MULTILIB := both must set either
LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64 or
LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64 to specify how to
differentiate the install locations of the two versions.

Change-Id: I22ab6aa342b231c307b1d8a86cea4fd91eea39f5
2014-03-26 13:12:59 -07:00
Adam Lesinski 9d9dbaba77 Merge "Temporarily use a separate var for including shared resources" 2014-03-26 00:41:00 +00:00
Adam Lesinski 5eebe0f1b4 Temporarily use a separate var for including shared resources
Change-Id: I56636a1d7dfdaa070706f1991f80e03fe2f71069
2014-03-25 17:00:35 -07:00
Colin Cross c93c10a75b am 8295d6cd: am ce087413: am 36a67a90: Merge topic \'tests\'
* commit '8295d6cd62ba73ea66e64204d2d0ea27b4b34889':
  add support for LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64
  add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
2014-03-25 23:48:13 +00:00
Colin Cross 8295d6cd62 am ce087413: am 36a67a90: Merge topic \'tests\'
* commit 'ce08741397e0468185457f5c7e8aee08272e6752':
  add support for LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64
  add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
2014-03-25 23:44:58 +00:00
Colin Cross 5a9db90e40 add support for LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64
Some executables will need to be built for both 32-bit and 64-bit.
For linker/linker64, debuggerd/debuggerd64, and a few more, they
will be installed in the same path (/system/bin), but with different
filenames.  Allow the module to specify LOCAL_MODULE_STEM_32 and
LOCAL_MODULE_STEM_64 to name the two versions.

Change-Id: I573e8678c7332245a064f31246be0a05f0a9e25f
2014-03-25 13:49:58 -07:00
Colin Cross 87974056d9 add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
Some executables will need to be built for both 32-bit and 64-bit.
For tests, it will be convienient to keep the name of the executable
the same, but install them in a different location.  Add
LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64 to allow a module
to specify different paths for 32-bit and 64-bit executables.

Change-Id: I3be830e899c6d485fe55c25c66b20b3fe64c795e
2014-03-25 13:48:40 -07:00
Ying Wang 145374e097 am 1bd53e59: am 59683508: am 5462f7f9: am 255ea2bd: Merge "Remove unused LOCAL_ASSET_FILES."
* commit '1bd53e59558f7973a038f4b0d5c78a7fdfa45f91':
  Remove unused LOCAL_ASSET_FILES.
2014-03-18 20:52:55 +00:00
Ying Wang 5968350855 am 5462f7f9: am 255ea2bd: Merge "Remove unused LOCAL_ASSET_FILES."
* commit '5462f7f953915bd345a58b17977e79e6405b56d0':
  Remove unused LOCAL_ASSET_FILES.
2014-03-18 18:44:32 +00:00
Ying Wang 8824386987 am 5462f7f9: am 255ea2bd: Merge "Remove unused LOCAL_ASSET_FILES."
* commit '5462f7f953915bd345a58b17977e79e6405b56d0':
  Remove unused LOCAL_ASSET_FILES.
2014-03-18 18:44:05 +00:00
Ying Wang 594f2a4261 Remove unused LOCAL_ASSET_FILES.
Change-Id: Ie0b2b2e30a158b779016767fb868f3e03b2f828a
2014-03-18 11:31:09 -07:00
Colin Cross c92f1407a1 add support for module supported or unsupported target architectures
Add four new variables for module makefiles:

LOCAL_MODULE_TARGET_ARCH specifies that a module is only supported for
one or more architectures.  Any architecture not in the list will be
not attempt to build the module.  The expected use case is prebuilts
that are only suitable for a single architecture, or modules like llvm
that need per-architecture support.

LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH specifies that a module cannot be
built for one or more architectures.

LOCAL_MODULE_TARGET_ARCH_WARN and LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN
are the same, but warn that the arch is not supported, which is useful
for modules that are critical but not yet working.

The logic for whether or not to build an architecture is fairly
complicated, so this patch consolidates it into module_arch_supported.mk

Change-Id: I120caf4a375f484e1fd6017b60c2f53882ae01e6
2014-03-13 11:26:04 -07:00
Colin Cross 17821ae6f1 am 7ea5cd95: Merge "don\'t use LOCAL_*_arch for host builds"
* commit '7ea5cd95b84c42c79f22aab7f6b8f851cc88a41f':
  don't use LOCAL_*_arch for host builds
2014-03-07 19:33:20 +00:00