Commit graph

215 commits

Author SHA1 Message Date
Ying Wang
2f98364392 am 6bef5124: am fc6d5b6a: Allow to add jar resource or manifest even without Java code.
* commit '6bef5124b7199900286ca199cd1fa22d12e27051':
  Allow to add jar resource or manifest even without Java code.
2014-10-01 17:03:54 +00:00
Ying Wang
fc6d5b6a94 Allow to add jar resource or manifest even without Java code.
Change-Id: I2d8fd93f004d9e0c29c71b887810b2624769789e
2014-09-30 17:32:58 -07:00
Ying Wang
f3ab87027d am a953de3f: am 326363b8: Merge "java_alternative_checked_module takes precedence."
* commit 'a953de3f01b3c3428e133b14bad0662b4adc901d':
  java_alternative_checked_module takes precedence.
2014-09-30 06:03:47 +00:00
Ying Wang
cbe67ed918 am 1d6f150e: am 8d856002: Merge "Don\'t modify LOCAL_CHECKED_MODULE."
* commit '1d6f150e3e3cce1788d0aea47d0aa8bef0f6df66':
  Don't modify LOCAL_CHECKED_MODULE.
2014-09-30 06:03:30 +00:00
Ying Wang
8260562434 java_alternative_checked_module takes precedence.
java_alternative_checked_module takes precedence over
LOCAL_BUILT_MODULE.

Change-Id: I84f0d65dbc05f4686817aa835d003eb0101af146
2014-09-29 17:17:00 -07:00
Ying Wang
6c1d1cc712 Don't modify LOCAL_CHECKED_MODULE.
Use a temporary variable my_checked_module instead,
so that we don't override the 2nd_arch's checked module with the
1st_arch's in multilib build.
Note that by default we checkbuild 2nd_arch only for host modules,
but not for target modules.
We enable multlib for target modules by default, it would take too
much time to checkbuild for both archs. For 32-bit modules actually we
can checkbuild a 32-bit product.

Change-Id: I0a5ba75699225b7641442673483731a8fd360d61
2014-09-29 21:59:55 +00:00
Ying Wang
1425e2d8c0 Support LOCAL_PACKAGE_SPLITS.
Support LOCAL_PACKAGE_SPLITS, which accepts a list of resource lables
and generates multiple apks. The build system sets up rules to sign and
zipalign the split apks.

Bug: 16319961
Change-Id: I344b3d1c7eb158c6d0df879093d666a89870aadd
2014-07-22 17:37:11 -07: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
Ying Wang
af9757e849 New installation path for apks and their JNIs.
Apk's path is changed to <parent_dir>/MyApp/MyApp.apk;
JNI path is changed to <parent_dir>/MyApp/lib/<arch_name>/libfoo.so.
Symlinks of JNIs are changed accordingly.

Bug: 16319961
Change-Id: Ib3b2309c95fa9aea27837fcc29e28d990b04747b
2014-07-18 16:26:24 -07:00
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
1a5ada11d5 Auto-clean obsolete aidl-generated Java files.
The build system compares aidl files of every module to the previous
build and deletes the intermediate generated source dir if an aidl file
has gone.

Change-Id: I55fcfe1baaae3496613e12c20bca564d408bba58
2014-07-07 16:58:39 -07: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
a26a2123b8 am 7a6a9a55: am 4bdbd6d4: am e1b43254: Merge "Add --pseudo-localize aapt parameter for builds."
* commit '7a6a9a558271ac959a2e441fe27aae3df77d4421':
  Add --pseudo-localize aapt parameter for builds.
2014-06-27 16:24:46 +00:00
Igor Viarheichyk
c4dfe6ef30 Add --pseudo-localize aapt parameter for builds.
Some packages can override list of locales with
LOCAL_AAPT_INCLUDE_ALL_RESOURCES parameter, disabling
pseudolocalization. Adding new --pseudo-localize flag to
aapt if pseudo-locales are specified in product locales
list solves this issue.

Change-Id: Iae705d4fe99453650339fd1ca65d1005671b3e4f
2014-06-26 17:27:36 -07:00
Ying Wang
111ccebf30 am 995783d4: am 57befc90: am eb12847b: Merge "Switch another reference from core to core-libart"
* commit '995783d4fde29634e9c61379db5fedad0a232089':
  Switch another reference from core to core-libart
2014-06-24 10:38:49 +00:00
Brian Carlstrom
074151bdf3 Switch another reference from core to core-libart
Bug: 14298175
Change-Id: I37dc7d5bc63d967db4b3cb8aee695a40b12a8c8d
2014-06-23 15:34:17 -07:00
Brian Carlstrom
b1dafb1804 Switch from core to core-libart
Bug: 14298175
Change-Id: I1db40e7c67322d80a108b2b88e6d2e6d275d7898
2014-06-18 17:42:32 -07:00
Brian Carlstrom
55fa2ea206 resolved conflicts for merge of 8fd9944e to master
Change-Id: I1ceda92267675d4ca460b6f990c0acea4b4812a8
2014-06-18 19:25:30 -07:00
Ying Wang
74c9850c79 Explicit record the modules' built-file:installed-file
- This simplifies the logic to get the mapping of built-file to
  installed-file. Previously we used file suffix matching which is error
  prone and not scalable.
- With this change the .odex files will be included automatically.

Bug: 13585955
Change-Id: I4599abf93b9d501bac7aca7758d7f3aee21b3e36
2014-06-16 16:41:48 -07:00
Ying Wang
1dc4f0bace am 2bf10a72: am cdcb6926: am 6cb69bd4: Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build"
* commit '2bf10a72f87a8e97923286aa331f7db81e2361ca':
  Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
2014-05-23 19:43:57 +00:00
Ying Wang
966c1e0cae Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
We already support pure 32-bit and 64-bit-by-default multilib build.
With HOST_PREFER_32_BIT we can build 32-bit-by-default multilib build.
This will be lest disruptive during the period we transition to
64-bit-by-default.

Bug: 13751317
Change-Id: I0d56ce4abbe4afeaacfd70d709f6a349791c0722
2014-05-20 18:03:21 -07:00
Ying Wang
80b91d9ac6 Fix typo.
Change-Id: I027b91d3a89de12a9c9f95406274726574bc7f7a
2014-05-20 16:20:44 -07:00
Ying Wang
3380d3a1ae Explicit record the modules' built-file:installed-file
- This simplifies the logic to get the mapping of built-file to
  installed-file. Previously we used file suffix matching which is error
  prone and not scalable.
- With this change the .odex files will be included automatically.

Bug: 13585955
Change-Id: I4599abf93b9d501bac7aca7758d7f3aee21b3e36
2014-05-19 13:03:36 -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
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
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
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
66750e6395 am d4cc9dad: am 1427f872: am 676e11fe: Merge "include LGPL projects in GPL archives"
* commit 'd4cc9dad6cf21e12b45b8b756a731d6e21c86c97':
  include LGPL projects in GPL archives
2014-04-25 22:52:04 +00:00
Andrew Boie
08a943b16a include LGPL projects in GPL archives
LGPL projects need their source code distributed under very
similar conditions to GPL and MPL, the only difference is the
conditions under which they may be linked. It makes sense to
include them in the GPL archive tarballs.

Change-Id: I2c2df03906bfeee55566102aa688e4cdc283700b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-04-11 21:38:00 +00: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
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
14a6cbd902 Refine module name resolving in multilib build
-- Added TARGET_PREFER_32_BIT, which sets LOCAL_32_BIT_ONLY for an
   executable, if LOCAL_NO_2ND_ARCH is not true.

Name resolving in 64-bit multilib build:
-- Name resolving in PRODUCT_PACKAGES:
   foo:32 resolves to foo_32;
   foo:64 resolves to foo;
   foo resolves to both foo and foo_32 (if foo_32 is defined).

-- Name resolving for LOCAL_REQUIRED_MODULES:
   If a module is built for 2nd arch, its required module resolves to
   32-bit variant, if it exits;
   Otherwise for executable and shared library, a required module
   resolves to the default 64-bit variant; for other module classes,
   required module foo resolves to both foo and foo_32 (if foo_32 is
   defined)

Bug: 12898862
Change-Id: I5fda1a77f58814097b10b5ad2743ee25adfaecc4
2014-02-10 22:39:14 -08:00
Colin Cross
90353fe86f add support for more LOCAL_*_arch variables
Add support for:
LOCAL_SHARED_LIBRARIES_arch
LOCAL_STATIC_LIBRARIES_arch
LOCAL_WHOLE_STATIC_LIBRARIES_arch
LOCAL_GENERATED_SOURCES_arch
LOCAL_REQUIRED_MODULES_arch

Change-Id: Iad91702e140d8dba7dcaee13f236c77b1e626a34
2014-02-04 19:44:57 -08:00
Colin Cross
aee1e779f4 don't rename 32-bit executables to *_32
Renaming 32-bit executables to *_32 breaks PRODUCT_PACKAGES
dependencies.

Change-Id: I53d89991633ef4af03c4e618c463769937a70e38
2014-02-04 19:44:09 -08:00
Colin Cross
1acb1b64b9 Merge changes I62504bad,I16208cca,I4e4ceec6
* changes:
  add new gen/ directory for generated sources
  warn on LOCAL_MODULE_PATH in multiarch shared libraries
  Support LOCAL_MODULE_RELATIVE_PATH
2014-01-27 23:35:01 +00:00
Ying Wang
37bd1f2d83 Don't modify LOCAL_MODULE_TAGS.
Change-Id: Id70d48c1d7abf02139925bcb3208515ea1a082b9
2014-01-27 15:19:09 -08:00
Colin Cross
d826264621 add new gen/ directory for generated sources
Allow modules to generate source into $OUT/gen, which will then
be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as
necessary.  This allows a single build rule invocation that includes
generated source to build for the first and second architectures.

Modules will need to change calls to local-intermediates-dir into
local-generated-sources-dir.

Change-Id: I62504bad9454b3d9fde7b84ab9f0a487a2ecf0bf
2014-01-27 14:45:44 -08:00
Colin Cross
639c336dc1 Support LOCAL_MODULE_RELATIVE_PATH
Most users of LOCAL_MODULE_PATH are setting a subdirectory of the
normal install path, for example to install HALs into system/lib/hw.
This is problematic for multiarch builds, where the install location
depends on the arch.  Allow modules to specify LOCAL_MODULE_RELATIVE_PATH.
HALs will generally use:
LOCAL_MODULE_RELATIVE_PATH := hw

Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
2014-01-27 14:43:14 -08:00
Colin Cross
b34911cadf build: print module that has unhandled install path
Print the name of the module that is providing an unhandled install
path.

Change-Id: I0e8b02f01de1dde715f0985034ad943f793218ba

Conflicts:
	core/base_rules.mk
2014-01-24 13:44:11 -08:00
Ying Wang
b8e0185489 Support arch-specific LOCAL_ variables
With those variables, you can set up different values for TARGET_ARCH
and TARGET_2ND_ARCH.
Also fixed a couple of variables.

Bug: 11654773
Change-Id: I4c7684a562cd5877d18f67d4f848b8df07d0103b

Conflicts:
	core/base_rules.mk
2014-01-24 13:38:34 -08:00
Ying Wang
6ef6519170 Set up rules to build static libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.

Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
2014-01-24 13:35:09 -08:00
Brian Carlstrom
ced4bff58e Add DEXPREOPT support for ART
Change-Id: I24d0d7b2a23a769f5d69bd4dc14be22e1475b759
2013-12-17 14:44:00 -08:00
Narayan Kamath
40dae1fefa Rework the generation of host java libraries.
We currently have two types of host libraries, those
meant for the host VM (Sun, OpenJDK etc.) and those meant
for a host dalvik build. The former need to be compiled
against the host standard libraries and the latter need
to be compiled against libcore. This change introduces
two new build rules to complement the existing the existing
host rules.

BUILD_HOST_DALVIK_JAVA_LIBRARY : Build a java library for
a host build of dalvik. Bootclasspath will be set to a host
build of libcore.
BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY : Build a static java
library for a host build of dalvik. Bootclasspath will be set
to a host build of libcore.

This change also removes support for the LOCAL_BUILD_HOST_DEX
flag, which is now unnecessary.

bug: 8992787

(cherry picked from commit 0dd273a3f6)

Change-Id: I3569fff8eaa4d26d55fcc317bd98471f55d74c14
2013-11-25 10:17:53 +00:00
The Android Open Source Project
b9041a45b1 Merge commit 'c73341006286c391ae4d268a77f5e008045d5308' into HEAD
Change-Id: I4bf7d32d65e19dfa1f0533fdd3b2295c50b13005
2013-11-22 11:06:11 -08:00
Elliott Hughes
32bfd70333 Remove the hacks needed to support ash and mksh concurrently.
We no longer have ash, and we'd rather not have unnecessary symbolic links
on the system.

Change-Id: Icfb1a51f1baaf1861c203f6ed93843b094deb65d
2013-11-05 11:13:49 -08:00
Elliott Hughes
17753f5c6a Remove shell_ash; ash is but ashes.
Change-Id: I88040e39c51986b14e3a764e7bb9e2c8c05ed86b
2013-11-05 09:05:50 -08:00
Ying Wang
d74b538d9a Add the FRAMEWORKS_BASE_JAVA_SRC_DIRS to aidl includes
only if the module is built against the platform, not the SDK.
Previously it added it if it's doing a platform build.
But we can do an apps_only build inside the platform source tree and
such a build may build modules against the platform.
This fixes the apps build in the platform source tree.

Change-Id: I73e32a8f0e505349790a102321f88e77fba472cd
2013-10-01 18:16:45 -07:00