Commit graph

325 commits

Author SHA1 Message Date
Ying Wang
157a5e1695 Load only the current product config makefile.
To reduce the start time.
With the change and previous change of doing clean step in only given paths,
start time of mm/mmm is reduced from ~5s to about 1s;
lunch time is reduced from ~40s to 3.5s.

Bug: 7186768,7169854
Change-Id: Ifd72ba1c6362a5e1125a23c505fd47947ab56675
2012-09-27 15:17:41 -07:00
Ying Wang
c6ffc00b9f Support to build executables against the NDK
Use "LOCAL_SDK_VERSION := <number>" to build against the NDK when you
include $(BUILD_EXECUTABLE).

Bug: 7170098
Change-Id: I4cebeae3355e79a4d2f2f5549ef0613ced77e3f0
2012-09-25 18:33:53 -07:00
Ying Wang
b301817223 Don't install all host modules by default.
Instead we should explicitly set up the dependency, if the module will
be used in the build process; Use LOCAL_MODULE_TAGS with eng, debug or
tests if the module is for testing; or add to PRODUCT_PACKAGES if it's
required by a product.

Change-Id: I326e97df6630dee4acc6582ce6cef2dec8289155
2012-09-24 18:17:26 -07:00
Ying Wang
d43fbfe783 am 23755396: am 55861069: am 4595d7d6: am 410420ed: am 9efa5bae: Merge "Add transform-d-to-p-args"
* commit '23755396f5c1d62103c8a6930e1bad63d26189f6':
  Add transform-d-to-p-args
2012-09-10 17:14:21 -07:00
Ying Wang
5586106944 am 4595d7d6: am 410420ed: am 9efa5bae: Merge "Add transform-d-to-p-args"
* commit '4595d7d62c0d594aa3501e4f547563348a3a5eb0':
  Add transform-d-to-p-args
2012-09-10 10:25:41 -07:00
Ying Wang
c23f4efdbb Add transform-d-to-p-args
This new indirection allows us too to output .P files when we are
generating non-.o files, such as .s or .S files.
Bug: 7127743

Change-Id: I9e46c417031764fefc9909ba4a3eb63885f34f9e
2012-09-07 17:04:06 -07:00
Ying Wang
fb12f71fe7 am 18c8d9eb: am 3a6f7589: Add LOCAL_DONT_DELETE_JAR_META_INF
* commit '18c8d9eb1e0c0776862d554f0834e7ee3018375a':
  Add LOCAL_DONT_DELETE_JAR_META_INF
2012-08-30 14:16:31 -07:00
Ying Wang
3a6f7589e8 Add LOCAL_DONT_DELETE_JAR_META_INF
To support to not delete META_INF directory from the static Java
libraries.

Change-Id: I720bfa059c43dd457a74a0c60bb6797aa408ecaf
2012-08-30 12:59:42 -07:00
Ying Wang
3e500c6356 Automatically add Java resources carried by static Java libraries.
Bug: 6892294
Change-Id: I3ff71ee3d7b9ccdfde6a5284cc350864fbffa71f

Conflicts:

	core/package.mk
2012-08-27 15:21:51 -07:00
Joe Onorato
cea08a5220 resolved conflicts for merge of 5836d3b3 to jb-mr1-dev
Change-Id: If3d84a7439717ccf7723b3f79e934d73abbb3fea
2012-08-17 00:09:27 -07:00
Joe Onorato
6a185e453d Remove support for user tags in the build system.
It is not forbidden to say LOCAL_MODULE_TAGS := user,
and if you don't say LOCAL_MODULE_TAGS, it now defaults
to optional.

Change-Id: I0a0b200bb6f1c7bf1fe3a89cdc8f69678617526c
2012-08-16 22:45:56 -07:00
Joe Onorato
918ee311f5 Don't give the user tag to host modules automatically.
Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7
2012-08-16 22:45:55 -07:00
Joe Onorato
529302d912 Remove support for user tags in the build system.
It is not forbidden to say LOCAL_MODULE_TAGS := user,
and if you don't say LOCAL_MODULE_TAGS, it now defaults
to optional.

Change-Id: I0a0b200bb6f1c7bf1fe3a89cdc8f69678617526c
2012-08-16 22:36:41 -07:00
Joe Onorato
f85cb7c936 Don't give the user tag to host modules automatically.
Change-Id: I12d0a84786e5bf2224efd8684526b6097e6105d7
2012-08-16 22:36:40 -07:00
Ying Wang
7429e21c2e Add LOCAL_CONLYFLAGS.
To pass compiler flags
LOCAL_CFLAGS: to both C and C++ files;
LOCAL_CONLYFLAGS: to only C files but not C++ files;
LOCAL_CPPFLAGS: to only C++ file.
LOCAL_CPPFLAGS and LOCAL_CONLYFLAGS can override flags in LOCAL_CFLAGS.

Bug: 6967573
Change-Id: I88d9de0980e451b94bc7ae8c741ea2030eada3e1
2012-08-15 11:02:28 -07:00
Ying Wang
939c427de2 Merge "Automatically add Java resources carried by static Java libraries." 2012-08-13 08:46:03 -07:00
Ying Wang
65d785274e Don't pass LOCAL_CFLAGS when compiling assembly code.
Bug: 6967574
Change-Id: Id428884dde3026c32fa6abcabbc88d188b7e9a38
2012-08-10 18:10:15 -07:00
Ying Wang
8548062922 Automatically add Java resources carried by static Java libraries.
Bug: 6892294
Change-Id: I3ff71ee3d7b9ccdfde6a5284cc350864fbffa71f
2012-08-09 15:24:27 -07:00
Jean-Baptiste Queru
1870b7f4f2 am a4814370: am 4733cfd2: Merge "definitions.mk: Don\'t use GCC \'@\' parameter"
* commit 'a4814370724634c0ee0bf35bc68f382f0df93668':
  definitions.mk: Don't use GCC '@' parameter
2012-08-08 13:26:40 -07:00
Andrew Boie
85f3b21971 definitions.mk: Don't use GCC '@' parameter
This parameter (which causes GCC to pull additional command line
parameters out of a file) is incompatible with ccache.

- With ccache 2.x, ccache will ignore this parameters, and potentially
compute invalid command line hashes since it is not reading the
parameter file

- With ccache 3.x, ccache will refuse to cache the files and error
with 'Unsupported compiler option'.

We still use the parameter file, but Make expands it instead.

Change-Id: I070c3877cbe2d058e1cf4754bac535e7f3498861
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-07-26 10:21:04 -07:00
Ying Wang
1cc65fd6ef resolved conflicts for merge of 9b76c054 to master
Change-Id: I4190ef6895b7ddb27d9a293cbacecdef1f4f20b8
2012-06-19 14:33:09 -07:00
Ying Wang
ae25ec1bcd More flexibility to keep/remove R.class in static Java library
- Usually you don't need to set LOCAL_JAR_EXCLUDE_FILES in your
  Android.mk, if your static library is directly used by an app.
- If your library will be included by another library that need
  reference the R/Manifest class, you can set
  LOCAL_JAR_EXCLUDE_FILES := none
  to keep the generated classes.
- If your library includes another static library that has Android
  resource and you want to remove the generated classes carried by
  the static library, set:
  LOCAL_JAR_EXCLUDE_FILES := $(ANDROID_RESOURCE_GENERATED_CLASSES)

With the LOCAL_JAR_EXCLUDE_FILES value "none", deprecate the old
long variable LOCAL_KEEP_R_CLASS_IN_STATIC_JAVA_LIBRARY.

Change-Id: I3b9ad5d66f0262f784feb09bc1537c5b01256258
2012-06-19 10:40:37 -07:00
Torne (Richard Coles)
bffaef246a Make building an empty static library work.
Handle the case where a static library is not built because it has no
input files (e.g. because they are conditionally included and it happens
that the computed list is empty). Previously, ar never ran because of
split-long-arguments, and anything that depended on the static library
would fail to link. Make sure that ar runs at least once.

Change-Id: If0071d7ae50c4e45fff1772dca43187af155db1f
2012-06-15 16:06:21 +01:00
Joe Onorato
9136290afa Merge commit 'bf2e8a66' into work
Change-Id: I5cd704eb59218b56b48d689afdff84638deeacf1
2012-05-17 22:10:24 -07:00
Joe Onorato
e44705a86f Add copy-many-files macro.
Change-Id: I327fc19bdf9c1ada18b3ba695fe4104e2a241156
2012-05-17 20:57:35 -07:00
Ying Wang
3ceecfa3da Check the well-formedness of an xml file before copying.
Bug: 6491991
Change-Id: I3dbf9a7e1fefd9fea2636c78a85bae63ea8391b8
2012-05-14 14:40:58 -07:00
Ying Wang
000e89a5b9 Strengthen dependencies on LOCAL_REQUIRED_MODULES
Bug: 6418863
This change expands the PRODUCT_PACKAGES with the required modules.
Before this change, since the required modules are not in the
PRODUCT_PACKAGES, they are not directly depended on by the image files.
If the dependent is not to be included in the image but the required
modules are to be included, the dependency of the image on the required
modules gets lost!
That would lead to build race condition.

Change-Id: I0b656db1538ca43d3785dbf17364ffa88b80ac41
2012-04-30 16:32:25 -07:00
Ying Wang
68f1c77a8d Make export_includes depend on the module's definition makefile.
Bug: 6383397

Note that LOCAL_MODULE_MAKEFILE is calculated in the macro my-dir,
which must be called at the beginning of your Android.mk to calculate
 LOCAL_PATH.

Change-Id: I7aa079e37253fbda25ffb85c2e5bbf0663340e27
2012-04-23 21:29:18 -07:00
Ying Wang
4394aaef7e Merge "Build system support to export include paths" 2012-04-09 12:43:09 -07:00
Doug Zongker
9296f09277 optional cross-check between OTA radio images and board-info.txt
Adds a python script which checks the version of each radio image
added with the new add-radio-file-checked macro against a file
containing sha-1 -> version string mappings and the contents of
board-info.txt, so that the build can fail if board-info.txt and the
OTA images are out of sync.

Change-Id: Icb61dc2adefc240ced9059941582c23b629089c0
2012-03-21 09:18:15 -07:00
Wink Saville
8d5610cd1b Merge "Increase java heap size." 2012-01-30 15:42:28 -08:00
Wink Saville
29b3afaf79 Increase java heap size.
I got an Out of memory while compiling, Andreas Huber suggested that
increasing the heap size, which worked.

Change-Id: Id8293ef100ef814b0fe13aa6e1b891a36a2ee853
2012-01-30 15:30:10 -08:00
Ying Wang
707328a3ef Build should fail if any proto file fails compiling
When compile multipling proto files to Java in a for loop.

Change-Id: Ie6a9d3972401b0ad6406bf911db916fcbf88037b
2012-01-30 11:56:07 -08:00
Conley Owens
015c7885e0 Merge "Get build system to work with Make 3.82" 2011-12-22 15:14:01 -08:00
Conley Owens
d7a1a9b49b Get build system to work with Make 3.82
Note: `sort` can't seem to handle newlines in 3.82.

Change-Id: Ieeaee1d19688688a02e396bbc5b4dea26e7f6943
2011-12-22 09:56:18 -08:00
Atte Peltomaki
5846050fd4 am 05e98055: am 60fe963c: build: explicitly define dependency files
* commit '05e98055fdb1d48bac80790cb719838598b687e8':
  build: explicitly define dependency files
2011-12-21 16:46:36 -08:00
Atte Peltomaki
60fe963c63 build: explicitly define dependency files
Groundwork for distcc support in Android build system,
see distcc FAQ for details on why -MF is needed:
http://distcc.googlecode.com/svn/trunk/doc/web/faq.html
2011-12-21 09:24:09 -08:00
Ying Wang
4b9d4ea2e2 Merge "Collect the GPL source files." 2011-12-16 17:00:46 -08:00
Ying Wang
5758b8ed96 Remove the R/Manifest classes when building the static Java library
Bug: 5448433

Instead of deferring the removal to building the app.
In that case any R/Manifest classes in any static Java libraries will be
deleted, no matter if they are generated from Android resource, or just
source R.java/Manifest.java in the source tree by accident.

Change-Id: I656f45e3cbc3796c5d4832363231480b3f1dc5b8
2011-12-15 16:36:55 -08:00
Ying Wang
bf6c611cae Don't remove R class to fix the build.
Unfortunately there is R.java checked in the source tree that gets built
into static library.
So we have to find a way to delete classes from R.java generated by the
build system on the fly.

Change-Id: I2d82d28234cecbf6dd5b02b2dd4f7dbd47e3b626
2011-12-15 15:10:04 -08:00
Ying Wang
20e2083ea0 Support to build static Java library with Android resource
Bug: 5714516

The rationale behind this change:
- the library is compiled into a jar file, but its R class is generated
  making the constant not constant (static, not final static) (aapt
  option --non-constant-id). Also the jar file does not contain the R
  class.
- this allows the integer value to not be inlined in the compiled
  class files. Note that this prevents using switch statements.
- the main project use this jar file as a normal static library: it will
  add all the class files except the R.class.
- the main project uses the library res folder as a resource
  folder with lower priority than the main project (basically the
  main project is an overlay. This is accomplished using aapt's
  --auto-add-overlay to handle resources only in the main project
  (which the normal overlay mechanism doesn't allow).
- the main project creates R classes in the main project's
  package but also in the library's package. This is done with
  aapt's --extra-packages which accept as many packages as
  needed, separated by a :.
- manifest merging is not done yet, so
  activities/services/permissions/etc... have to be manually declared in
  the main app.

To use a static library with Android resource in your app,
1. Add the library's resource dir to your app as an overlay:
LOCAL_RESOURCE_DIR := <app_resource_dir> <static_library_resource_dirs>
2. Set the proper aapt flags:
LOCAL_AAPT_FLAGS := <apps_own_flags> --auto-add-overlay \
  --extra-packages <lib1_package_name>:<lib2_package_name>:...

Change-Id: Ifb4d2300b952ea4aaee74da1bb0c6c72ea0698a3
2011-12-14 16:04:59 -08:00
Ying Wang
e109a1d08d Allow to build Java module from mere static Java libraries.
With this change, we can easily turn a static Java library to a shared
Java library.

Change-Id: I9915992cd19879846511d6272483d7a0a934e7eb
2011-12-12 17:52:03 -08:00
Ying Wang
fd626f2d21 Collect the GPL source files.
Bug: 5693205
Change-Id: I045b83949f8b29d7c5cf5c0ab32c5b83cf398e71
2011-12-12 12:57:38 -08:00
Stephen Hines
914f7a2990 Enable -Wall/-Werror with LOCAL_RENDERSCRIPT_FLAGS.
Change-Id: Ia2a058e6711839d89072c2e96f0c60aa4cedda6b
2011-12-07 11:41:28 -08:00
Ying Wang
99bcbeb355 Print more info of the image size stats.
Bug: 5620615
Before this change it only reports the limit if the real size exceeeds
or approaches the limit.

Change-Id: Ie1737d6ba2dc2d57ad82c487990e109882526d6e
2011-12-02 10:34:45 -08:00
Jeff Hamilton
293f9392ba Bypass alias for grep in the tapas command.
Change-Id: I82705535bda927ddc7e9aebb9610d712b68a50d2
2011-11-18 17:24:13 -06: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
Conley Owens
e04c2c21ee am e915ab45: Place linker arguments after objects for gcc
* commit 'e915ab45a11f88c4fa5f2561c1aaca4b7d3d7593':
  Place linker arguments after objects for gcc
2011-11-10 19:01:36 +00:00
Conley Owens
e915ab45a1 Place linker arguments after objects for gcc
gcc 4.6.1 does not properly link if libraries are specified before
objects.

Change-Id: Iabe3eac831fe597abe8a93a946ab7a22d584db46
2011-11-10 10:55:13 -08:00
Conley Owens
d9e7d25741 Place linker arguments after objects for gcc
gcc 4.6.1 does not properly link if libraries are specified before
objects.

Change-Id: Iabe3eac831fe597abe8a93a946ab7a22d584db46
2011-11-10 09:57:40 -08:00
Joe Onorato
c72b1403e4 Add a tool to let you enforce layering between packages in a java module.
And build system support for it too.

Change-Id: I4dd5ed0b9edab6e8884b0d00cfeeae5fa38d967a
2011-10-30 21:37:35 -07:00
Bjorn Bringert
cec077521e Merge "Compile each proto file separately" 2011-10-18 09:48:20 -07:00
Bjorn Bringert
20f5efd82c Compile each proto file separately
Before, if a module had several proto source files,
they would all be compiled in a single invocation
of aprotoc. If any of the files imported one of the
other files, you got an aprotoc error about duplicates.
And if you removed the files that were imported
from the list of source files, no Java code
would be generated for the imported files,
causing a Java compile time error.

This changes compiles each proto file separately, which
avoids both of the problems above. It's slightly more
inefficient, but aprotoc is really fast.

Change-Id: I7bd8092ec2953c20269367a1c68ff84acceea3be
2011-10-18 16:08:27 +01:00
Dianne Hackborn
9baabf8d7e am a0f464a8: New PRODUCT_AAPT_PREF_CONFIG.
* commit 'a0f464a8e7f006177db084df7e925bbb8e5ffed3':
  New PRODUCT_AAPT_PREF_CONFIG.
2011-10-17 11:31:38 -07:00
Dianne Hackborn
a0f464a8e7 New PRODUCT_AAPT_PREF_CONFIG.
To use the new aapt --preferred-configurations option.  For use with Prime
to be able to strip everything but xhdpi density bitmaps selectively,
not stripping when this would result in no data for the resource.

Change-Id: I4e1012929b8f9b0b1e79c06496647f69661ba1f2
2011-10-14 19:37:57 -07:00
Ying Wang
d89452976b Merge "Use shell variable to eliminate $(eval) in commands." 2011-10-11 10:11:44 -07:00
Ying Wang
f1054bf22e Merge "Discard hidden files when rounding up resource." 2011-09-08 14:16:23 -07:00
Stephen Hines
c963eae72c Update build to properly use prebuilt llvm-rs-cc.
Change-Id: I52a83066b6c08d05d69db4f93631eeaf9c0b41c6
2011-08-10 17:01:43 -07:00
Ying Wang
6ab5d6aa16 Discard hidden files when rounding up resource.
Aapt will discard the hidden files anyway.
With this change, we can avoid unnecessary rebuild if a module has only
hidden files in its resource dir.

Change-Id: Iaf0a13e038cca5fb60012c550cc90f7abbe967e1
2011-08-10 16:05:51 -07:00
Ying Wang
6e7db38de7 Use shell variable to eliminate $(eval) in commands.
$(eval) in the commands does not evaulate in the same order in emake as
in gmake. Using shell vars work in both makes.

Change-Id: I4e95adb2bc6f4600e29b9a8524275a099f47a401
2011-07-27 12:57:37 -07:00
Ying Wang
7e8d442ca4 Uniq the system properties.
If multiple items with the same key appear in a config variable,
only the first item is taken.

Change-Id: Icf57befafb36ec35dd4d48c8c3ec595f353f68e7
2011-06-17 17:10:04 -07:00
Ying Wang
194a8ec8ae Use arg list file to pass arguments to jar.
To fix error "/bin/bash: Argument list too long"

Change-Id: Ie336b18f9a7eba38d94a6e32c07a88589ce9f1fd
2011-06-06 14:34:52 -07:00
Ying Wang
4387dc3ee1 am 823f6389: am 3487736b: am 7d83ef8f: Support custom RenderScript compiler
* commit '823f63894fb4ad5c1280a5ee7eb004792223a488':
  Support custom RenderScript compiler
2011-06-02 16:49:33 -07:00
Doug Kwan
e804fc92ec Merge "Allow enabling RTTI in a module." 2011-06-01 11:23:20 -07:00
Joe Onorato
149dd914b8 Switch the java encoding from ascii to utf8.
Change-Id: Iee0972df68b44fc8c653812cf165b57350a7ec5d
2011-05-31 18:21:07 -07:00
Ying Wang
823f63894f am 3487736b: am 7d83ef8f: Support custom RenderScript compiler
* commit '3487736bac5625bef8ff9bc4ef311b29348055d9':
  Support custom RenderScript compiler
2011-05-27 15:38:10 -07:00
Ying Wang
7d83ef8ff7 Support custom RenderScript compiler
Change-Id: I85e38e84565e04f99dd26217f280274883dc322d
2011-05-27 13:47:17 -07:00
Doug Kwan
9a8ecf970b Allow enabling RTTI in a module.
Change-Id: Ie8ce920e3ccb7e53bdf917d8ac5a386df3e7836a
2011-05-10 21:50:58 -07:00
Ying Wang
fcdabd4bdb Add LOCAL_GROUP_STATIC_LIBRARIES
Set LOCAL_GROUP_STATIC_LIBRARIES := true to group the static libraries,
in case we need gcc flags "-Wl,--start-group" and "-Wl,--end-group" to
fix circular references.

Change-Id: I03c4901670112fcdd2bb0fe660b6924e5776fcf8
2011-04-25 14:22:41 -07:00
Ying Wang
ddbcad8c85 Add TARGET_PROJECT_INCLUDES as system includes
And do the same to host modules.

Bug: 4279745
Change-Id: I5b0cd0e13e0e61b5051537b5834eba48e5f822f8
2011-04-18 11:45:44 -07:00
Ying Wang
4761e56a71 Pass TARGET_C_INCLUDES as system include directories to gcc
So warnings from those headers can be suppressed.
Bug: 4279745

Change-Id: Id69b253c5566de53153b87ef69eff15b8a47c832
2011-04-12 12:49:04 -07:00
Ying Wang
bb9c230b68 Set the default app sdk verstion to LOCAL_SDK_VERSION
Instead of using the DEFAULT_APP_TARGET_SDK, which is the hardcoded in
the build system, ie the sdk version of the current source tree.

Change-Id: I2fae3521300cc6b2449df3659ded7f7a397609c0
2011-04-08 17:27:35 -07:00
Brian Carlstrom
bb7c6d88c6 Tracking merge of dalvik-dev to master
git cherry-pick --no-commit  5fac8d8f7096d8a950acad1ad0a8b963cef72e03

git cherry-pick --no-commit  1a8210710b46a0796ff2f8e76b6beb3a54f89019

git cherry-pick --no-commit  4fe2ac9f7284b838393aec8f0f48caef2510fd46

git cherry-pick --no-commit  7beb710a8f976fc4cb1e8be780644386870c4975

Change-Id: Ib10348e5509c906c6b95fa4accd6a18900bfe748
2011-04-01 15:45:58 -07:00
Ying Wang
cd4e323e0e am ce467097: am 54aa74ef: am a9e5bb8a: am f78fb1d1: Merge "Use my-dir in a consistent way as others"
* commit 'ce4670977d0367983e40ed339da793792fdb6e06':
  Use my-dir in a consistent way as others
2011-03-31 15:16:36 -07:00
Ying Wang
ce4670977d am 54aa74ef: am a9e5bb8a: am f78fb1d1: Merge "Use my-dir in a consistent way as others"
* commit '54aa74ef5da0a76a0fc1afdabaa24d2fb0744cd1':
  Use my-dir in a consistent way as others
2011-03-31 15:14:32 -07:00
Ying Wang
4f1ab92aac Move screen density config from PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG
With this change, PRODUCT_LOCALES will contain only locales.
Other aapt config flags, such as *dpi, small/normal/large/xlarge,
should go to PRODUCT_AAPT_CONFIGS.
Bug: 4086309

Change-Id: I922f153d79777a9522c542a3907111193b40e7b7
2011-03-15 13:19:30 -07:00
Iliyan Malchev
b375e71d30 build: remove prelinker build build system
This patch removes support for prelinking from the build system.  By now, the
prelinker has outlived its usefulness for several reasons.  Firstly, the
speedup that it afforded in the early days of Android is now nullified by the
speed of hardware, as well as by the presence of Zygote.  Secondly, the space
savings that come with prelinking (measued at 17MB on a recent honeycomb
stingray build) are no longer important either.  Thirdly, prelinking reduces
the effectiveness of Address-Space-Layout Randomization.  Finally, since it is
not part of the gcc suite, the prelinker needs to be maintained separately.

The patch deletes apriori, soslim, lsd, isprelinked, and iself from the source
tree.  It also removes the prelink map.

LOCAL_PRELINK_MODULE becomes a no-op.  Individual Android.mk will get cleaned
separately.  Support for prelinking will have to be removed from the recovery
code and from the dynamic loader as well.

Change-Id: I5839c9c25f7772d5183eedfe20ab924f2a7cd411
2011-03-12 14:59:46 -08:00
Chih-Wei Huang
e73c4bbc50 Use my-dir in a consistent way as others
Change-Id: I3fd0cc58b48d621b431d7dd05fb689c1917b530d
2011-03-11 11:48:48 +08:00
Ying Wang
a67ce69e9a Handle MODULE_LICENSE_MPL the same as MODULE_LICENSE_GPL.
Change-Id: Iefc6df3f3401a591f53ec3f22202044c60acf460
2011-03-03 14:57:10 -08:00
Jeff Brown
bd528a82a2 Build system tweaks for Valgrind.
Added LOCAL_NO_CRT to enable building executables that do not link
to the C runtime library.

Removed support for LOCAL_MODULE_SUBDIR since it was broken
and unused.  (Was going to use it but ended up using LOCAL_MODULE_PATH
instead.)

Change-Id: Ifed4ffe17003d90370c711ea6606e2b75e841dee
2011-02-16 15:06:30 -08:00
David 'Digit' Turner
d6b413a904 am 3be47af9: am b3f59bde: am 86a90364: Merge "core/binary.mk: Add missing Objective-C objects to the build."
* commit '3be47af9491b7fd93b74122cb7f979f2b86c1634':
  core/binary.mk: Add missing Objective-C objects to the build.
2011-02-15 11:03:57 -08:00
David 'Digit' Turner
3be47af949 am b3f59bde: am 86a90364: Merge "core/binary.mk: Add missing Objective-C objects to the build."
* commit 'b3f59bde44fc16fa43b6a01a890c4b42cf446292':
  core/binary.mk: Add missing Objective-C objects to the build.
2011-02-15 10:40:24 -08:00
David 'Digit' Turner
5ca286d58b core/binary.mk: Add missing Objective-C objects to the build.
For some reason, all_objects was not listing objects generated from
objective-C sources. We need these for the emulator (which builds its
own version of SDL which uses Quartz on OS X).

+ Fix a typo in transform-host-m-to-o definition.

This also explains why https://review.source.android.com/#change,21074
had to be reverted, since it gets rid of the prebuilt SDL libraries when
building the emulator.

Change-Id: I173811cf11cdb5b045073aade59364236145bc77
2011-02-11 17:52:52 +01:00
Ying Wang
4a2ecaf5dc Fix the case image-size-from-data-size returns 0.
This time with correct escaping.

Change-Id: I660887ac62425e9960e266391b52979a7dff4617
2011-02-09 17:24:27 -08:00
Ying Wang
bfaf531e05 Revert "Fix the case BOARD_FLASH_BLOCK_SIZE smaller than BOARD_NAND_PAGE_SIZE, eg generic_x86"
This reverts commit 279f3084bb.

Change-Id: I27069190503e586d3d77a933d92459a34eb55cb8
2011-02-09 16:15:21 -08:00
Ying Wang
389cf7ac4e Merge "Fix the case BOARD_FLASH_BLOCK_SIZE smaller than BOARD_NAND_PAGE_SIZE, eg generic_x86" 2011-02-09 13:21:09 -08:00
Ying Wang
279f3084bb Fix the case BOARD_FLASH_BLOCK_SIZE smaller than BOARD_NAND_PAGE_SIZE, eg generic_x86
Also don't build ota package for generic_x86.

Change-Id: I7606d56b312ac2e0c3514a8f250e005e0c05a3f1
2011-02-09 13:11:50 -08:00
Jeff Brown
703e7c6d50 Build system tweaks for Valgrind.
Added LOCAL_NO_CRT to enable building executables that do not link
to the C runtime library.

Removed support for LOCAL_MODULE_SUBDIR since it was broken
and unused.  (Was going to use it but ended up using LOCAL_MODULE_PATH
instead.)

Change-Id: I3b6f5ab7e5ae6aaa7119899adccece2b4ab1cbb3
2011-02-08 16:38:56 -08:00
Ying Wang
3a7e4ccad9 Unify use of $(hide).
Change-Id: Ib7e17bbb4682caecce5812e63de872b676403d64
2011-01-28 14:14:47 -08:00
Ying Wang
a02d3d9f74 Break down the buge shell command line preparing whole static libraries.
This can fix the "@: command not found" messages, which is caused by "@"
in the middle of the shell command line.

Change-Id: I444827458045efcbc70a6e1e43bf4ee040e71b79
2011-01-27 18:48:00 -08:00
Jean-Baptiste Queru
c61d4c91b6 Extra protobuf-related support
Change-Id: I375d32f0bcb695ccb0603743133034941d584163
2011-01-27 13:49:30 -08:00
Jean-Baptiste Queru
79ee7bf896 Protobuf compiler support in the build system 2011-01-27 12:44:30 -08:00
Ying Wang
80e6cce93e Correct misuse of target/host vars.
Change-Id: Ide41aeddc44ca05d85a36035c2d55ea453cfd216
2011-01-24 23:25:36 -08:00
Ying Wang
015edd2c1b Add modifier goal incrementaljavac
With "incrementaljavac" on your make command line, you will recompile
only Java source files that have been changed since last build.
Nothing is changed if "incrementaljavac" is not among your make goals.

Change-Id: Iae591459827df81ac91e95292464db5e9828343a
2011-01-21 17:49:30 -08:00
Ying Wang
84ed6fa27b Disable "-t" for acp.
Acp can not handle high resolution file timestamp on ext4.
We need this to fix incremental build on ext4.

Change-Id: I54e45c73ffa44c4253c7a431375d419fa4dccfd9
2011-01-19 12:15:38 -08:00
David 'Digit' Turner
60a1e88052 Add support for custom Linux host toolchains when building the SDK.
This is needed in order to build Linux SDK binaries that can run
properly on Ubuntu 8.04 (Hardy). By default, the host toolchain
on 10.04 (Lucid) generates machine code that won't run on Hardy
due to GLibc ABI mistmatches.

Note that nothing happens if the new toolchain is not in the
prebuilt tree.

Change-Id: I914f5a303f16b6871759ce5a7178585ed3060870
2011-01-16 19:14:04 +01:00
Ying Wang
085ff6a8ac am 098826bf: am 099fecd7: Use PRIVATE_CXX in HOST modules.
* commit '098826bf61cba2b14a0538100878bdb029f50790':
  Use PRIVATE_CXX in HOST modules.
2010-12-20 11:42:35 -08:00
Ying Wang
098826bf61 am 099fecd7: Use PRIVATE_CXX in HOST modules.
* commit '099fecd759ce54168fe4094880d1ca748e8906b9':
  Use PRIVATE_CXX in HOST modules.
2010-12-20 11:40:33 -08:00
Ying Wang
099fecd759 Use PRIVATE_CXX in HOST modules.
This fixes the build error:
out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_err.o:
file not recognized: File format not recognized
See also CL #84578

Change-Id: Ib91230c7a5c9809eb1935959eaa9be8fa7c596b9
2010-12-20 11:18:28 -08:00
David 'Digit' Turner
02e172e892 am efc5d814: am 15f4980d: Merge "Add support for custom Linux host toolchains when building the SDK." into gingerbread
* commit 'efc5d81428a8c7d9cf7cb7b3a5f1a8344b02a700':
  Add support for custom Linux host toolchains when building the SDK.
2010-12-14 02:45:58 -08:00
David 'Digit' Turner
efc5d81428 am 15f4980d: Merge "Add support for custom Linux host toolchains when building the SDK." into gingerbread
* commit '15f4980d510824113a4d2b71d70de9c67715f3dc':
  Add support for custom Linux host toolchains when building the SDK.
2010-12-14 02:42:10 -08:00
Brian Carlstrom
782695112d Unify target and host Java compilation
This changes tries to reconcile drift between
transform-java-to-classes.jar which is used to build java for the
target with transform-host-java-to-package which is used for the
host. Several packages such as libcore are built both ways and the
drift between these rules was making it hard to make common changes to
things such as warning options.

The new compile-javac definition tries to include as much as possible
from the two previous definitions. Some conflicts it sorts out:
- hardwired -g vs PRIVATE_JAVAC_DEBUG_FLAGS
- consistent order of arguments
- moving PRIVATE_JAVAC_FLAGS to end to allow override of arguments
- xlint_unchecked is always conditional based on LOCAL_WARNINGS_ENABLE

Now what differs between the two is clear in the
transform-java-to-classes and transform-host-java-to-package
definitions. Notable differences:
- the target case supplies a bootclasspath while the host case does not.
- .class files are cleaned up after jaring in the target case,
  but in the cost case they are left for the sake of the vm-tests target
  which expects them to be present. That should probably be fixed in the future.
- PRIVATE_EXTRA_JAR_ARGS used to package resources into the jar only
  happens for the host. Its handled by add-java-resources-to-package for the
  target after dxing.

Change-Id: I2fb28f688fbb632102ca63448c2ac911db0477ae
2010-12-13 11:29:58 -08:00
David 'Digit' Turner
0960ca7488 Add support for custom Linux host toolchains when building the SDK.
This is needed in order to build Linux SDK binaries that can run
properly on Ubuntu 8.04 (Hardy). By default, the host toolchain
on 10.04 (Lucid) generates machine code that won't run on Hardy
due to GLibc ABI mistmatches.

Note that nothing happens if the new toolchain is not in the
prebuilt tree.

Change-Id: I45c1f68e37e15a0032f885df1c5c0f297b3d8642
2010-12-13 11:52:03 +01:00
Jean-Baptiste Queru
1ee80eefc7 am dbd43691: am 3ef1d674: am 4985f06f: Merge "Make image-size-from-data-size not use hard coded values."
* commit 'dbd43691870fa64d1ad79371e3d796ed8e63b3b9':
  Make image-size-from-data-size not use hard coded values.
2010-12-06 16:45:01 -08:00
Jean-Baptiste Queru
3ef1d67480 am 4985f06f: Merge "Make image-size-from-data-size not use hard coded values."
* commit '4985f06f4e96351c77b88b20bc9ded65daefcd3e':
  Make image-size-from-data-size not use hard coded values.
2010-12-06 15:10:35 -08:00
Lars Svensson
9cb8c28352 Make image-size-from-data-size not use hard coded values.
The function image-size-from-data-size was using hard
coded values. The size of spare area and pages has become
configurable so we need to read from the variables.

Change-Id: I9461d34400ffc2cc5920860d8aa78750d559e397
2010-12-06 16:18:46 +01:00
Ying Wang
33c0d952fc Allow module-specific protoc flags.
You can add local protoc flags via LOCAL_PROTOC_FLAGS.

Change-Id: If246a4edafe1edcec6a7f193bde8ce3c83de745b
2010-11-05 11:30:58 -07:00
Ying Wang
a5fc87a937 Integrate protocol buffer compiler into the build system.
Bug: 3152546
Change-Id: Ida3ca3d633ce45704dc8e80d044cdbd3ca69aca5
2010-11-02 19:25:47 -07:00
Shih-wei Liao
c656030f7d Turn off llvm-rs-link to make launch time go faster.
Change-Id: Idbbb5e24a269e3c9a1911b47b4fbb1616cef5803
2010-10-23 03:07:13 -07:00
Doug Zongker
98582b28e8 radio files aren't modules, prebuilt or otherwise
Change-Id: Ic21cf9f7d9657819e40c6700c98e61971dab24b4
2010-10-13 13:39:56 -07:00
Ying Wang
4a5bd245ff Fix typo.
Change-Id: Iabdc6ec1ead4f37294f01ebebc1e71e188455533
2010-10-11 16:36:02 -07:00
Shih-wei Liao
f7b32bfe41 Enable LLVM_RS_LINK. No longer forking an LLVM linker inside llvm-rs-cc.
Change-Id: I2ebc6ec759daf36d1e77fa8e30147ab8e40b44fc
2010-10-11 10:36:42 -07:00
Shih-wei Liao
d01fadb6bc Make naming consistent: llvm-rs-cc and llvm-rs-link.
Change-Id: I8e8ae27548131b47fbbd037d55b472d095d7bb8f
2010-10-08 17:55:26 -07:00
Joe Onorato
e814ad4950 am 5c41c178: am 700b88e1: Pass device characteristic information through to aapt.
Merge commit '5c41c17868865d1f2e9e2ff4680b528da61d16af'

* commit '5c41c17868865d1f2e9e2ff4680b528da61d16af':
  Pass device characteristic information through to aapt.
2010-10-08 14:36:43 -07:00
Ying Wang
24e1c018ba Integrate the slang "-MD" into the build system.
So that the header dependency can be included.
Bug: 2932230

Change-Id: I4d69870049157206ce2ab637ec6d673467db0c64
2010-10-08 09:37:44 -07:00
Shih-wei Liao
c95899f46d "Slang" no longer needs "--allow-rs-prefix" option. "Slang" now knows if a function
is in a system header file. If so, the function can be prefixed by "rs". Otherwise,
"rs" prefix is rightly disallowed. So, no more "allow-rs-prefix" hacking.

Change-Id: I8d5982cd6a75d465ffa6f98ca96941ae761117a2
2010-10-08 07:14:03 -07:00
Joe Onorato
5c41c17868 am 700b88e1: Pass device characteristic information through to aapt.
Merge commit '700b88e1451f216d137d8a356496bf51712512c6' into gingerbread-plus-aosp

* commit '700b88e1451f216d137d8a356496bf51712512c6':
  Pass device characteristic information through to aapt.
2010-10-07 07:09:25 -07:00
Joe Onorato
700b88e145 Pass device characteristic information through to aapt.
A build configuration can define PRODUCT_CHARACTERISTICS, which is
a comma-separated list of device characteristics, for example
"nosdcard,grayscale".  This will be passed through to aapt with
the --product flag.

Change-Id: I902c034b2f2824dbd2d33449308ee08beeb09551
2010-10-06 10:44:33 -04:00
Ying Wang
1406613b63 am bf2ed191: am a83940fa: Move odex related files to product-specific dir.
Merge commit 'bf2ed191fe229b6a83684c19a57e11e7b50c8637'

* commit 'bf2ed191fe229b6a83684c19a57e11e7b50c8637':
  Move odex related files to product-specific dir.
2010-10-01 17:07:29 -07:00
Ying Wang
bf2ed191fe am a83940fa: Move odex related files to product-specific dir.
Merge commit 'a83940fa7851b35712e559be2246b56b5666b805' into gingerbread-plus-aosp

* commit 'a83940fa7851b35712e559be2246b56b5666b805':
  Move odex related files to product-specific dir.
2010-10-01 15:51:35 -07: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
Ying Wang
b5425fdfc8 am e52fddec: am 879779a5: Merge "framework-res is not used as regular Java library now." into gingerbread
Merge commit 'e52fddec86a808b98bcdd033704b43a83cf569ea'

* commit 'e52fddec86a808b98bcdd033704b43a83cf569ea':
  framework-res is not used as regular Java library now.
2010-09-28 18:21:39 -07:00
Ying Wang
e52fddec86 am 879779a5: Merge "framework-res is not used as regular Java library now." into gingerbread
Merge commit '879779a5806d6e09d1c852a93dd4e1793bbd96cd' into gingerbread-plus-aosp

* commit '879779a5806d6e09d1c852a93dd4e1793bbd96cd':
  framework-res is not used as regular Java library now.
2010-09-28 17:36:46 -07:00
Ying Wang
912f828605 framework-res is not used as regular Java library now.
Change-Id: Ic2b8f7d7bceab3be7884eb4a7dbe721c14bd1ccb
2010-09-28 17:27:56 -07:00
Ying Wang
509d28b2b3 resolved conflicts for merge of 3453d5f3 to master
Change-Id: If23d2817b4d74d48632776923805c2141da82257
2010-09-24 18:27:29 -07:00
Ying Wang
3453d5f3a2 am d56d69b6: Merge "Fix dependency when switching between build variants with and without Proguard." into gingerbread
Merge commit 'd56d69b621bf41b478d59b6f987b6f796a9d8652' into gingerbread-plus-aosp

* commit 'd56d69b621bf41b478d59b6f987b6f796a9d8652':
  Fix dependency when switching between build variants with and without Proguard.
2010-09-24 18:12:12 -07:00
Ying Wang
957fea52f3 Fix dependency when switching between build variants with and without Proguard.
With this change, in a user build the dependency looks like:
package.apk -> progaurd.classes.dex -> ... -> proguard.classes.jar
While in an eng build:
package.apk -> noproguard.classes.dex -> ... -> noproguard.classes.jar

Because package.apk is product-specific and removed when switching between
user and eng builds, it can always be built with the correct and up-to-date .dex file.

Bug: 3022484

Change-Id: I3a732cb3e256f193088c294dc4a0573188283cb2
2010-09-23 16:48:46 -07:00
Joe Onorato
8dc8faaaea Add option to fail when Android.mk files change PRODUCT_* variables.
It's turned off for now.

Change-Id: I0b5a3ce5fdc7693c8ebd870312f0c2e13fdb8b22
2010-09-14 13:13:27 -04:00
Jean-Baptiste Queru
4074f2377c Warn when new modules are found that use user tags
Change-Id: I49369cc1596f269e0964f0a6a88bcc7152209bde
2010-09-08 12:44:06 -07:00
Jean-Baptiste Queru
6b747cfb21 am a90f9d2c: Merge "Warn when new modules are found that use user tags - DO NOT MERGE" into gingerbread
Merge commit 'a90f9d2c299d7833b37f8a0e244a2893054d9ea5' into gingerbread-plus-aosp

* commit 'a90f9d2c299d7833b37f8a0e244a2893054d9ea5':
  Warn when new modules are found that use user tags - DO NOT MERGE
2010-09-08 10:32:52 -07:00
Jean-Baptiste Queru
39de432897 Warn when new modules are found that use user tags - DO NOT MERGE
Change-Id: Ia563765f3d0161d7c851a0162d65c2a249b4dd38
2010-09-03 17:39:10 -07:00
Ying Wang
54b634dce8 am a79db6e4: am 3dae0ee4: Fix inherited dependency when instrmentation.
Merge commit 'a79db6e47a378cb089021a56637a9c6925f14261'

* commit 'a79db6e47a378cb089021a56637a9c6925f14261':
  Fix inherited dependency when instrmentation.
2010-09-03 10:36:41 -07:00
Ying Wang
a79db6e47a am 3dae0ee4: Fix inherited dependency when instrmentation.
Merge commit '3dae0ee46cf5fcde6eb424f9ab0c69f2d901a671' into gingerbread-plus-aosp

* commit '3dae0ee46cf5fcde6eb424f9ab0c69f2d901a671':
  Fix inherited dependency when instrmentation.
2010-09-03 10:21:37 -07:00
Ying Wang
3dae0ee46c Fix inherited dependency when instrmentation.
It turns out we should also LOCAL_INSTRUMENTATION_FOR.
To disambiguate LOCAL_INSTRUMENTATION_FOR_PACKAGE_NAME is renamed to LOCAL_MANIFEST_INSTRUMENTATION_FOR.

Bug: 2902591
Change-Id: I6cb893c135736fc4170aa2259105b4c5eea798a1
2010-09-03 10:05:39 -07:00
Ying Wang
512802772a Now slang supports "-I" options.
Change-Id: I32aef6c913d9d30f9982a593397145f1562aecf9
2010-09-01 13:28:52 -07:00
Ying Wang
ebfddaa55b Now slang supports multiple rs files in a single run.
Change-Id: I26be766614ee3542d76471e3fc55f485ac65bdee
2010-08-05 12:54:30 -07:00
The Android Open Source Project
87208510ab am 85581a1b: merge from open-source master
Merge commit '85581a1ba81105740cc1e87bfad040bbac4662ec'

* commit '85581a1ba81105740cc1e87bfad040bbac4662ec':
  Allow explicit warnings for projects
2010-07-22 11:35:13 -07:00
The Android Open Source Project
85581a1ba8 merge from open-source master
Change-Id: Ide7fbe06d7f9c1a06827365f006ddc7a01ba4dab
2010-07-22 11:31:59 -07:00
Jeffrey Chyan
7adbf97d11 Allow explicit warnings for projects
Enabled compiler warnings by default and then modified javac
command to include warnings only if a project's warning flag,
LOCAL_WARNINGS_ENABLE, is set to true.

Change-Id: I5111d16a862f3afaaf1dcba2f2c2b7fc072613f1
2010-07-20 15:32:21 -07:00
Ying Wang
0bd59a0a58 Build system support for RenderScript
With this change, you can add your .rs files to LOCAL_SRC_FILES.
The .rs files will be compiled by slang and the output .java files
will be compiled into the jar, while the generated .bc files will
be put into the final apk as raw resources.

Change-Id: Icde3d6139951d6d039b4b37376e72e1fc5c8b0d4
2010-07-19 13:38:56 -07:00
Ying Wang
aabbc07cb8 am 90cf34c7: am f0f60cdd: resolved conflicts for merge of 1a08100f to gingerbread
Merge commit '90cf34c72e204eb1d23f43d1fccbf2076e8ff67b'

* commit '90cf34c72e204eb1d23f43d1fccbf2076e8ff67b':
  Support to build native libraries with prebuilt NDK
2010-07-13 17:26:00 -07:00
Ying Wang
90cf34c72e am f0f60cdd: resolved conflicts for merge of 1a08100f to gingerbread
Merge commit 'f0f60cdd8f4f74b2480774887606afdebec8d891' into gingerbread-plus-aosp

* commit 'f0f60cdd8f4f74b2480774887606afdebec8d891':
  Support to build native libraries with prebuilt NDK
2010-07-13 17:24:09 -07:00
Ying Wang
f0f60cdd8f resolved conflicts for merge of 1a08100f to gingerbread
Change-Id: I9e4183a1d5c0efb13de8655b9eb7c74d50b34cd7
2010-07-13 17:21:33 -07:00
Ying Wang
1a08100fa9 Support to build native libraries with prebuilt NDK
Bug: http://b/issue?id=2811253
Change-Id: Iabd4ab8b3d7236dffe89f1939e1142e882944026
2010-07-13 16:29:18 -07:00
The Android Open Source Project
4be5c394c1 am 0fd96df4: merge from open-source master
Merge commit '0fd96df49ccecbf3628c95dabf3b94dfc27323e5'

* commit '0fd96df49ccecbf3628c95dabf3b94dfc27323e5':
  Refactor Stripper. Allow a stripper other than SOSLIM to be specified
2010-07-09 16:05:04 -07:00
The Android Open Source Project
0fd96df49c merge from open-source master
Change-Id: I40aa6f0f885ea30dd5f9918c323fa240a4830c38
2010-07-09 16:02:03 -07:00
Bruce Beare
45ac434151 Refactor Stripper. Allow a stripper other than SOSLIM to be specified
Change-Id: I61137f5bb123dc5f610af9928ed3debdf85ba74d
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-09 12:16:46 -07:00
Ying Wang
8f5069b1be resolved conflicts for merge of 822fa972 to master
Change-Id: Ic7a7499b2058abbc6cefd94a0a06a95ef8c4d61c
2010-06-29 11:08:13 -07:00
Ying Wang
dd2c21550c am 0af605f3: Merge "Allow to override --version-code and --version-name in LOCAL_AAPT_FLAGS" into froyo
Merge commit '0af605f3b6e759f480a5124dc6b338ec58e1d40c' into gingerbread

* commit '0af605f3b6e759f480a5124dc6b338ec58e1d40c':
  Allow to override --version-code and --version-name in LOCAL_AAPT_FLAGS
2010-06-29 09:28:56 -07:00
Ying Wang
1ae607add3 Allow to override --version-code and --version-name in LOCAL_AAPT_FLAGS
Change-Id: Ibbcd626e6856d9340d9d3e2f916127feed0b6f5c
2010-06-23 13:34:22 -07:00