Commit graph

30 commits

Author SHA1 Message Date
Ying Wang
6c86a133c7 Use $(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES
To disentangle the host/target shared library dependencies.

Change-Id: I3122b370a7c24425861ab6dba91e6d8d84b27249
2013-02-25 18:12:11 -08:00
Ying Wang
90397c1029 Add deps on LOCAL_SHARED_LIBRARIES for prebuilts.
This is necessary for prebuilt build cache to work properly.

Change-Id: Ica28ce4d245a948142e067d82ff84ce1aef2134e
2013-02-12 12:28:45 -08:00
Ying Wang
63d94fa305 Build from source or prebuilt
With this change, you can easily switch between building from source
code and prebuilt.
Set LOCAL_PREBUILT_MODULE_FILE to the path of the prebuilt file,
relative to the top of the source tree, in the usual module definition.
The prebuilt will be used unless any of the followings satisfied:
1) ANDROID_BUILD_FROM_SOURCE is "true", which disable prebuilt globally;
2) The module name is in ANDROID_NO_PREBUILT_MODULES;
3) The LOCAL_PATH is prefixed by any of ANDROID_NO_PREBUILT_PATHS.
A developer can set ANDROID_NO_PREBUILT_MODULES or
ANDROID_NO_PREBUILT_PATHS to build only his own module(s) from source,
while build other modules from prebuilts.
You can set ANDROID_BUILD_FROM_SOURCE to true to build everything from
source.
Those variables can be set with shell environmental variable or in your
buildspec.mk.

Sometimes module B is able to be built from source only if module A is
also
built from source, for example, if B is the test apk of A.
In that case, you can use the macro include-if-build-from-source to
include B's Android.mk only if A is built from source too, or
if-build-from-source to conditionally include the definition of module
B,
if their module definitions are in the same Android.mk.

Support host-executable-hook and host-shared-library-hook.

Change-Id: Icab7cf028c87eaba0dd7efc2a7749fd6f32b44e4
2012-12-14 14:48:00 -08:00
Ying Wang
fe3f62d06b Support LOCAL_EXPORT_C_INCLUDE_DIRS for prebuilts too
Change-Id: I09e8e849f642792e3a74e2564820ab9bbf1eb28c
2012-12-03 18:24:55 -08:00
Ying Wang
13d6950ef8 NOTICE file only module
To pick up a NOTICE file in LOCAL_PATH and attach it to
/system/lib/libfoo.so, use the following syntax:

include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NOTICE_FILES
LOCAL_INSTALLED_MODULE := $(PRODUCT_OUT)/system/lib/libfoo.so
include $(BUILD_NOTICE_FILE)

Bug: 7460213
Change-Id: Ie692be72deab37be04d1b578578c131a0885a090
2012-11-01 17:29:10 -07:00
Ying Wang
b1a4e4e89e Delete the misleading var TARGET_OUT_STATIC_LIBRARIES.
Which can be replaced by TARGET_OUT_INTERMEDIATE_LIBRARIES.

Change-Id: I965ff1ebe70fc3113c19e4896277c876dcedb6a5
2012-05-15 16:12:18 -07:00
Ying Wang
616e596385 Write out export_includes whenever the module is built.
Bug: 6362268
Change-Id: If872cf8fe597a02e6ca740a181cea85f486df98e
2012-04-18 17:35:55 -07:00
Ying Wang
c32af65886 Revert "Write out export_includes whenever the module is built."
This reverts commit 40c34f3778
2012-04-18 16:55:07 -07:00
Ying Wang
40c34f3778 Write out export_includes whenever the module is built.
Bug: 6362268
Change-Id: Ic5d028c108423c694736a06c05ec13093d42f1b8
2012-04-18 16:30:17 -07:00
Ying Wang
5f074803fb Build system support to export include paths
Bug: 5573756
With this change, we can set LOCAL_EXPORT_C_INCLUDE_DIRS in the module
definition to export include dir paths.
Paths in LOCAL_EXPORT_C_INCLUDE_DIRS should be relative to the top dir
of the source tree.
If a library (shared or static) exports some include paths, any module
using it will import the include paths and add them to the compiler
command line.

Change-Id: I49aabc589d2cf214044d13ccd5532ef68209adf0
2011-11-17 10:52:32 -08:00
Doug Zongker
08d79c12de sign non-PRESIGNED prebuilt apks
Since dev keys can now vary per device, we can't assume they are
checked in with the correct signature.

Change-Id: I7577a3a6bd98d005c15936c99b2944acc4412798
2011-10-05 09:49:24 -07:00
Ying Wang
3c21fe5b12 Support for product-specific dev keys.
Change-Id: Id577a72ee9f7cd70e8ca77efcbf10a37885c7d6f
2011-10-04 10:50:08 -07:00
Ying Wang
c36b450ab1 Fix OVERRIDE_BUILT_MODULE_PATH for prebuilt shared libraries.
So that prebuilt shared libraries can be referenced with the module name
in other module's Android.mk.

Change-Id: I4c4b471696642694b805b71dd7605b91724ad924
2011-09-15 16:13:39 -07:00
Justin Ho
17a27047bb Revert Ic7c40c50: Support to run dex-preopt on prebuilt apks
Collect some additional system image space, moving odex files to user partition on trygon-user

Change-Id: If992536ff0da14cc5b9ba51811b8a0b76f1b8f83
2011-08-30 14:29:18 -07:00
Ji-Hwan Lee
0219e9292e Enable LOCAL_STRIP_MODULE for prebuilt binaries
Currently, prebuilt binaries with debug symbols are installed unstripped.

There are only a few of prebuilt shared library (that I'm trying to fix),
so I can do this manually by making intermediate target and applying
TARGET_STRIP, each of them, one by one.

But dynamic_binary.mk has more features than stripping binaries
(like copying unstripped binaries to symbols directory)
and if I do it manually, they will lose all the benefits.

Note that this doesn't change anything when LOCAL_STRIP_MODULE is not set.
I actually tried to force strip every BUILD_PREBUILT'ed modules,
but there were a few problems:

- Some packages are not installed (i.e. not in PRODUCT_PACAKGES)
  but are built (i.e. in ALL_MODULES).  And some of them are built in spite
  that they do not have appropriate prebuilt shared library for TARGET_ARCH.
  Stripping them causes "unknown format".

- Some prebuilt modules set LOCAL_MODULE_CLASS incorrectly.
  Example is default.supp of external/valgrind/main, which should be ETC,
  not SHARED_LIBRARY.

Both are better fixed, but I concluded that it's better to be conservative.

Bug: 4585734
Change-Id: If71723b1d76007d45b02429ea5161a8265dd5b6d
2011-07-07 11:07:18 +09:00
Ying Wang
06e2f72bc9 Support to run dex-preopt on prebuilt apks.
Change-Id: Ic7c40c502934d7588166f26bbb6e2f235d1efdea
2011-05-26 16:01:57 -07:00
Ying Wang
5b316b604d Fix dependency of prebuilt target non-static Java libraries.
Change-Id: I498b96ce737e5fc9076de39108252284ee53218f
2011-02-01 13:07:01 -08:00
Ying Wang
a83940fa78 Move odex related files to product-specific dir.
For target Java libraries, now the LOCAL_BUILT_MODULE includes both javalib.jar
and the .odex file, if dexpreopt is enabled.
These 2 files are moved to a product-specific dir in this change.
For target Java Libraries, $(intermediates) now points to the product-specific dir.
There is still a javalib.jar in the $(intermediates.COMMON) dir, which is used as dependency.
Nothing is changed for host Java libraries.

Change-Id: I2546dbb940c74537864ca002d1acb49bb731fbbc
2010-10-01 14:41:43 -07:00
Doug Zongker
f6a53aa5f2 add "EXTERNAL" as special value of LOCAL_CERTIFICATE
Setting LOCAL_CERTIFICATE to "EXTERNAL" now marks an apk (either a
prebuilt or otherwise) as needing the default test key within the
system, but one that should be signed after the target_files is
produced but before sign_target_files_apks does the rest of the
signing.  (We use this to ship apps on the system that are signed by
third parties, like Facebook.)
2009-12-15 15:06:55 -08:00
Doug Zongker
714111cbdd include pre-signed prebuilt .apks in apkcerts.txt 2009-12-14 10:14:46 -08:00
Doug Zongker
45302ff00b make prebuilt .apks require LOCAL_CERTIFICATE
Require people who check in new prebuilts to decide what keys they
should be signed with, rather than having a fire drill every time we
go to sign a build and discover new prebuilts.
2009-12-11 13:50:35 -08:00
Owen Lin
64d5a80706 Add OVERRIDE_PACKAGES support for prebuild modules.
So that some prebuild module can override existing packages.

Change-Id: I4f0d019e07b84d24cf0234903bd4b06104e0ed27
2009-10-20 22:23:37 -07:00
Brandon Ballinger
ed29246e31 Add support for LOCAL_OVERRIDES_PACKAGES to prebuilt build rules. 2009-10-20 17:41:16 -07:00
Doug Zongker
1b6d0a65fc allow prebuilts to specify LOCAL_CERTIFICATE so they can be resigned
If a prebuilt specifies a LOCAL_CERTIFICATE, stick it in the
PACKAGES.* collection so that the predexopt process can work on the
file (which only works if the new .apk can be signed).
2009-08-26 18:22:43 -07:00
Dianne Hackborn
9c0c4b7a58 Fix issue #2048267: Run zipalign on all prebuilts 2009-08-11 19:41:51 -07:00
Doug Zongker
f7c8b9adb4 reenable ranlib transform for prebuilts
An extra blank line detached the ranlib commands from the rules they
were supposed to be for.
2009-08-07 08:45:49 -07:00
Doug Zongker
1046d20624 add feature to strip "# comment" lines from prebuilt files
Change things so that when $(LOCAL_PREBUILT_STRIP_COMMENTS) is
nonempty, we copy the source file using sed to strip out all the "#
line"-style comments and blank lines, saving considerable system image
space in the case of some wifi configurations.

Bug: 2036961
2009-08-06 14:39:43 -07:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00