Commit graph

434 commits

Author SHA1 Message Date
Ying Wang
79e8319b2e Try to catch more misuse of $(my-dir).
Change-Id: I0c07d7115c66b30ba1383dfaa133f0cc40a33ad7
2014-02-28 18:23:06 -08:00
Ying Wang
cefca29a4c am 8e286fbf: am cf1b7d4b: Merge "Select src arch for prebuilts."
* commit '8e286fbfc712ed695008f786592fe83e4a1331a7':
  Select src arch for prebuilts.
2014-02-28 02:33:29 +00:00
Ying Wang
6c930fc1c9 Select src arch for prebuilts.
Change-Id: I2d08f923d28d59cfef93ff0bd9893352baaee60b
2014-02-27 18:25:29 -08:00
Ying Wang
c0adfb76cd Select src arch for prebuilts.
Change-Id: I2d08f923d28d59cfef93ff0bd9893352baaee60b
2014-02-27 17:24:12 -08:00
Torne (Richard Coles)
e665992cb8 am 63002088: Merge "Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS."
* commit '630020883abc6c8b2c13876e3195ed6abcf4890f':
  Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS.
2014-02-26 11:09:29 +00:00
Torne (Richard Coles)
db7dcc210a Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS.
For host executables and shared libraries, the global LDFLAGS were being
inserted into the linker command line after the module-specific ones,
making it impossible to override the default settings. Change the order
to match target linker invocations.

Change-Id: Icd5f6f83df9f27a5be97ddb197ee245c1ab8c2be
2014-02-25 13:33:30 +00:00
Hui Shu
e8af17eb27 Add removed.txt for doclava api consistency check
BUG: b/11293324
Change-Id: Ie7cda9bc7d3a1e6c433eb073cc878b149cead8a0
2014-02-21 17:59:45 -08:00
Ying Wang
d4fe0bdfcb am 9b996f80: am eb9b62e0: Merge "Make -rpath-link work with multilib."
* commit '9b996f80a95f48bae153c35bacc0360c004e5258':
  Make -rpath-link work with multilib.
2014-02-22 00:58:46 +00:00
Ying Wang
9b996f80a9 am eb9b62e0: Merge "Make -rpath-link work with multilib."
* commit 'eb9b62e08d25ec9067a3f47634a2b8cf750230d8':
  Make -rpath-link work with multilib.
2014-02-22 00:45:52 +00:00
Ying Wang
9fb3526648 Make -rpath-link work with multilib.
Change-Id: If69ea6ed6cdbb657ed4005f8217d653e29626783
2014-02-21 16:20:20 -08:00
Torne (Richard Coles)
f93beb2167 Merge "Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS." 2014-02-14 10:49:32 +00:00
Ying Wang
ca389b9048 am 5768ac91: am 5c7039fb: Merge "Remove dead code."
* commit '5768ac917ca0e08a6a356159e0a8837f1bcfc7ff':
  Remove dead code.
2014-02-13 11:27:22 +00:00
Ying Wang
5768ac917c am 5c7039fb: Merge "Remove dead code."
* commit '5c7039fb069c040759df0a5a15241dd7f8b2f9b7':
  Remove dead code.
2014-02-13 01:45:38 +00:00
Ying Wang
dc6bb0477d Remove dead code.
Change-Id: Ia36a04037e15cbf296f375f3ece9a7e977fdca1e
2014-02-12 17:38:46 -08:00
Colin Cross
84a20ac12e am 2c32144b: resolved conflicts for merge of 7cd7bd65 to klp-modular-dev-plus-aosp
* commit '2c32144b328e0191fa32bf342dc7eb01d6174b6e':
  HACK: add 64-bit directory blacklist
  add support for module supported or unsupported target architectures
2014-02-12 23:00:21 +00:00
Elliott Hughes
a0945a24f9 am 1e317e77: am 993ffb80: Merge "Add all-S-files-under."
* commit '1e317e77fa86ee0450e8a7b1b2ab5bd51720189f':
  Add all-S-files-under.
2014-02-12 22:47:32 +00:00
Colin Cross
2c32144b32 resolved conflicts for merge of 7cd7bd65 to klp-modular-dev-plus-aosp
Change-Id: Ib4f062a59d442b29b9782fd8c0328fd551c3a32a
2014-02-12 13:09:29 -08:00
Colin Cross
02e31d240a HACK: add 64-bit directory blacklist
Change-Id: I431e8b220db81d51930dc0b3d95995df120c179a
2014-02-12 12:17:55 -08:00
Elliott Hughes
1e317e77fa am 993ffb80: Merge "Add all-S-files-under."
* commit '993ffb802ee90e07e73e67e523fd040395dfd74d':
  Add all-S-files-under.
2014-02-12 19:22:29 +00:00
Torne (Richard Coles)
a424bf781c Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS.
For host executables and shared libraries, the global LDFLAGS were being
inserted into the linker command line after the module-specific ones,
making it impossible to override the default settings. Change the order
to match target linker invocations.

Change-Id: Icd5f6f83df9f27a5be97ddb197ee245c1ab8c2be
2014-02-12 14:24:41 +00:00
Elliott Hughes
e3b044a0cc Add all-S-files-under.
Change-Id: I25416e2acc850c61226bc7a8e0536384f6eb2dce
2014-02-11 13:48:35 -08:00
Ying Wang
a87489b5c2 am 74b71317: am 2d72094f: am 960d919e: resolved conflicts for merge of 4df82b3e to klp-dev-plus-aosp
* commit '74b71317711fe4bacc6422e45de599fea840f061':
  Allow proguarding the main app and the test app in a single run.
2014-02-10 12:51:36 +00:00
Ying Wang
74b7131771 am 2d72094f: am 960d919e: resolved conflicts for merge of 4df82b3e to klp-dev-plus-aosp
* commit '2d72094f06e3cdfc78a3cfda9163cdb45ea7dbbb':
  Allow proguarding the main app and the test app in a single run.
2014-02-08 18:37:33 +00:00
Ying Wang
960d919e81 resolved conflicts for merge of 4df82b3e to klp-dev-plus-aosp
Change-Id: I7a1d9e1954ede06a818814bd05a77c69f1ed3bc6
2014-02-08 10:31:46 -08:00
Mihail Dumitrescu
4df82b3e30 Allow proguarding the main app and the test app in a single run.
Bug: 12895101
Change-Id: I6804d73306a164d3e3ec0cab4743f9582b5ef2cf
2014-02-07 19:11:24 +00:00
Colin Cross
96870b3eb4 am dc5249ab: am 717de0f5: Merge "Fix installing 2nd arch shared libraries"
* commit 'dc5249ab3c82040e21269fb69dc9a6dc89224629':
  Fix installing 2nd arch shared libraries
2014-02-06 00:06:30 +00:00
Colin Cross
5394bf1950 Fix installing 2nd arch shared libraries
2ND_TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES was not set,
which was causing the later += to act like = instead of
:=, and the dependencies would disappear as soon as
LOCAL_MODULE was cleared.

Change-Id: Idea291524fc06377deafec62f37d20eaa7f93bca
2014-02-04 19:44:09 -08:00
Colin Cross
40826c170c am 8c89a9ff: am 4695598d: am ae49acbd: am 1acb1b64: Merge changes I62504bad,I16208cca,I4e4ceec6
* commit '8c89a9ff9cd461e4bc077a91a0c7c32b17a92ebd':
  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:48:52 +00: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
Ying Wang
dd814bf8c2 Support to build executables for TARGET_2ND_ARCH
By default, an executable is built for TARGET_ARCH.
To build it for TARGET_2ND_ARCH in a 64bit product, use:
LOCAL_32BIT_ONLY := true
To skip a module for TARGET_2ND_ARCH, use:
LOCAL_NO_2ND_ARCH := true

Bug: 11654773
Change-Id: Ieb293d25b21024bfe1b554044df338e064ac7b46
2014-01-24 13:36:30 -08:00
Ying Wang
4d2cc665ea Set up rules to build shared libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of shared_library_internal.mk.
Intermediate fils of libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/SHARED_LIBRARIES/libfoo_intermediates/
and the built libfoo.so will be in
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/lib.

Bug: 11654773
Change-Id: I58bbe5a05a65f63bce6279131552f3792000716e
2014-01-24 13:35:30 -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
Ying Wang
72b01d6121 Support to build executables for TARGET_2ND_ARCH
By default, an executable is built for TARGET_ARCH.
To build it for TARGET_2ND_ARCH in a 64bit product, use:
LOCAL_32BIT_ONLY := true
To skip a module for TARGET_2ND_ARCH, use:
LOCAL_NO_2ND_ARCH := true

Bug: 11654773
Change-Id: Ieb293d25b21024bfe1b554044df338e064ac7b46
2014-01-21 11:26:39 -08:00
Ying Wang
791fa6a909 Set up rules to build shared libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of shared_library_internal.mk.
Intermediate fils of libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/SHARED_LIBRARIES/libfoo_intermediates/
and the built libfoo.so will be in
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/lib.

Bug: 11654773
Change-Id: I58bbe5a05a65f63bce6279131552f3792000716e
2014-01-16 15:43:47 -08:00
Ying Wang
61d499b965 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-16 14:34:13 -08:00
Ying Wang
6a271ead2f resolved conflicts for merge of 948786c9 to master
Conflicts:
	core/llvm_config.mk

Change-Id: Icfe11ad432c39efdf281ba0ab3cffb1011789cce
2014-01-09 11:18:40 -08:00
Logan Chien
e6f65438a4 Allow clang to build host binaries.
Change-Id: I7e4f9dc6f69a97cfefdfa2ed55c5d7b8ad496da7
2014-01-07 14:49:20 +08:00
Ying Wang
dcdd759623 am 39139ee0: am 3d10656e: am d93df332: am 10b1ffae: Merge "enable PIE for dynamically linked Linux host executables"
* commit '39139ee09a82b232877e10b2e1832664382d4257':
  enable PIE for dynamically linked Linux host executables
2013-12-13 22:19:39 +00:00
Joshua J. Drake
b0eafa21b9 enable PIE for dynamically linked Linux host executables
Compile all host programs for Android with -fPIE and -pie. This
enables PIE (Position Independent Executables), which helps
protect these applications from exploitation due to memory
management bugs.

Note: PIE *static* executables are not supported at this time. darwin
and windows are also not supported.

Change-Id: I67c1be297711ea23064c349f97ebd02eef3eff09
2013-12-12 17:36:53 -08:00
Ying Wang
7493c39eff Add utility function find-files-in-subdirs
find-files-in-subdirs uses utility find to find given files in the given
subdirs. This function uses $(1), instead of LOCAL_PATH as the base.

Change-Id: Ib76631c97acd257d651a580cbad767606874f5d0
(cherry picked from commit 85898bca99)
2013-12-05 18:37:20 +00:00
Ying Wang
7c8c7bd4b6 Add utility function find-files-in-subdirs
find-files-in-subdirs uses utility find to find given files in the given
subdirs. This function uses $(1), instead of LOCAL_PATH as the base.

Change-Id: Ib76631c97acd257d651a580cbad767606874f5d0
2013-12-04 16:56:38 -08:00
Ying Wang
85898bca99 Add utility function find-files-in-subdirs
find-files-in-subdirs uses utility find to find given files in the given
subdirs. This function uses $(1), instead of LOCAL_PATH as the base.

Change-Id: Ib76631c97acd257d651a580cbad767606874f5d0
2013-12-04 16:27:06 -08:00
Guang Zhu
65ca9e6f02 follow up jar manifest change for ENABLE_INCREMENTALJAVAC
Change-Id: Id3df078691cfe5e9221ec5085a6b02ac6b6bb008
2013-09-25 15:27:20 -07:00
Guang Zhu
5c9a1a4064 enable embeded build number in jar manifest
* if a module uses LOCAL_JAR_MANIFEST
* if the manifest file has the string '%BUILD_NUMBER%' in it

Bug: 10793010

Change-Id: I1ed3dae0706e6ad26c2bce68269c1abb7b4a7325
2013-09-25 10:50:23 -07:00
Ying Wang
e260b24cde am 670a7a63: am c5b72527: am ec3c15e5: am 04c4d34d: am 7311a344: Make it easier to enable obfuscation and optimization.
* commit '670a7a6389948c325399ae9bb3dc6a678f9982f8':
  Make it easier to enable obfuscation and optimization.
2013-08-23 10:20:28 -07:00
Ying Wang
c5b72527d3 am ec3c15e5: am 04c4d34d: am 7311a344: Make it easier to enable obfuscation and optimization.
* commit 'ec3c15e5c7c11cf3a831898f286c7eb7c216e50f':
  Make it easier to enable obfuscation and optimization.
2013-08-23 10:12:26 -07:00
Ying Wang
ec3c15e5c7 am 04c4d34d: am 7311a344: Make it easier to enable obfuscation and optimization.
* commit '04c4d34d4fdb56c824abf39239d2c87806706b7e':
  Make it easier to enable obfuscation and optimization.
2013-08-23 10:09:27 -07:00
Ying Wang
7311a344be Make it easier to enable obfuscation and optimization.
With this change, use:
* LOCAL_PROGUARD_ENABLED := obfuscation  # to enable obfuscation
* LOCAL_PROGUARD_ENABLED := optimization # to enable optimization
* LOCAL_PROGUARD_ENABLED := obfuscation optimization # to enable both

Now the meaning of the LOCAL_PROGUARD_ENABLED options:
* full:
    Use the build system's default configurations:
    with shrink but no obfuscation or optimization,
    global proguard flags in build/core/proguard.flags
    are applied.
* custom:
    The same as "full" except no aapt-generated resource-related
    proguard flags.
* nosystem:
    Don't use any build system's default configurations; but
    aapt-generated proguard flags are still applied. You are
    responsible for any other flags.
* disabled:
    Disable proguard.
* obfuscation:
    The same as "full" but with obfuscation enabled.
* optimization:
    The same as "full" but with optimization enabled.
* no value (the default):
    The build system chooses the proper value: "full" if it's an
    app; "disabled" if it's a library.

You can use more than 1 of them in a meaningful combination,
for example:
LOCAL_PROGUARD_ENABLED := obfuscation optimization

Bug: 10307372
Change-Id: Id248caca3048e99547f16559fae74f4afe85c354
2013-08-22 17:12:38 -07:00
Yohann Roussel
400c48cc3b Merge "Support dx generating multiple dex files." 2013-08-22 08:31:14 +00:00
Yohann Roussel
8ffe9c3e79 Support dx generating multiple dex files.
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.

Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
2013-08-20 20:53:40 +02:00
Ying Wang
a3b7593546 Support to optionally run rmtypedefs.
Bug: 10330586
Change-Id: I6ddfca2ec986cf2c82b0942b7a5360508f095e9a
2013-08-14 18:20:54 -07:00
Jean-Baptiste Queru
8a7cd65585 am 50a402af: am f1534b62: Merge "Added generic hook for loading vendor specific defintions"
* commit '50a402af7ae550c96b9142ab56d3a23a8a8d22b1':
  Added generic hook for loading vendor specific defintions
2013-07-30 10:28:17 -07:00
Jean-Baptiste Queru
50a402af7a am f1534b62: Merge "Added generic hook for loading vendor specific defintions"
* commit 'f1534b6292a609bb5f55c4a617f3cd1054f90a81':
  Added generic hook for loading vendor specific defintions
2013-07-30 07:33:53 -07:00
Ying Wang
54d9cc3fac am cd9cadbc: am 7768c91c: am 94de1eba: Put a copy of the radio/bootloader files in the dist dir.
* commit 'cd9cadbcf68bfe07ac994e61aa00969572ae3fd5':
  Put a copy of the radio/bootloader files in the dist dir.
2013-07-26 13:00:20 -07:00
Ying Wang
cd9cadbcf6 am 7768c91c: am 94de1eba: Put a copy of the radio/bootloader files in the dist dir.
* commit '7768c91c1c90e7c13390396d895a3afd5fda3e0f':
  Put a copy of the radio/bootloader files in the dist dir.
2013-07-26 12:57:19 -07:00
Ying Wang
94de1eba0e Put a copy of the radio/bootloader files in the dist dir.
Bug: 10035750
Change-Id: I3b51e61ec737899d9264885a1e66c89a7a740d54
2013-07-26 12:19:20 -07:00
Marie Lennerhagen
9e5efceff9 Added generic hook for loading vendor specific defintions
Change-Id: I6dec9c378ed0aabf9e60f8dcb05c6043bbcc30e5
2013-07-26 18:12:36 +00:00
Ying Wang
5efaa72ac1 am 51aab877: am 5d1db8b4: Merge "Allow proto builds to pass in java proto params."
* commit '51aab8775ab86990abef411d00f5686e41022eee':
  Allow proto builds to pass in java proto params.
2013-07-25 17:04:20 -07:00
Ulas Kirazci
6e485b545a Allow proto builds to pass in java proto params.
Change-Id: I65fe0cd96f818f59267da6159e6bd2ad28f07a11
2013-07-25 13:40:53 -07:00
Ulas Kirazci
24c7289d24 Revert "Allow proto builds to pass in java proto params."
This reverts commit 28b46fc16c.

Change-Id: Iaca9fa749c6f460911cc46e08e6b3ae2555b8bcc
2013-07-25 19:35:28 +00:00
Ben Murdoch
fc2bad5c36 Revert "Allow proto builds to pass in java proto params."
This reverts commit 28b46fc16c.

Speculative fix for master builds. I cannot repro the break the bots
are seeing locally, but it seems related to building protobufs and this
CL was in the first broken build.
2013-07-25 11:44:53 +01:00
Ulas Kirazci
dd3d8f4ca9 am 6a5fc54f: am a825aa13: Merge "Allow proto builds to pass in java proto params."
* commit '6a5fc54fe9904214a7df1d34c9d48ad0310d867e':
  Allow proto builds to pass in java proto params.
2013-07-25 00:47:09 -07:00
Ulas Kirazci
28b46fc16c Allow proto builds to pass in java proto params.
Also source files which have dependencies need to be bundled together
(at least the way the build system is set up now). Move
--proto_path=$(TOP) to the end so that it does not take precedence
over user-supplied --proto_path flags.

Change-Id: Ia532647fe8811d39230a23ba3671685b0388cbe0
2013-07-24 18:02:57 -07:00
Jeff Brown
ae859f9b64 Split framework jar.
Change-Id: I38c68ac169a4ea10e4640b5d8e24298a6caaf441
2013-07-17 21:08:18 -07:00
JP Abgrall
1390cac3ce core: don't hardcode "out" during findleaves.py invocations.
"out" can be $OUT_DIR

Bug: 7183057
Change-Id: I7b52d40de4398f481e47f6d6d719fb550d874f73
2013-07-11 19:08:06 -07:00
Ying Wang
d6b1d61d84 Do vendor check on modules installed by LOCAL_SHARED_LIBRARIES
Since commit 6c86a1 we have split LOCAL_SHARED_LIBRARIES out of
LOCAL_REQUIRED_MODULES and the vendor check does no longer cover the
installed modules introduced by LOCAL_SHARED_LIBRARIES.
This change brings back the coverage.

Change-Id: Ie78692e48f173a3350792eb2fee8127ff9433caa
2013-04-15 17:41:55 -07:00
Stephen Hines
8db4ccea4a Link RS compatibility files with libc and make bcc_compat a regular dep.
If we don't do "-lc", we end up missing symbols like "memset" on our non-NEON
builds. It also makes more sense to have bcc_compat as a standard dependency
for now, since it occasionally changes the way we compile/link our source
files.

Change-Id: I4b0ead66caa7c72fb7733db8804a33faa5350930
2013-03-27 16:51:38 -07:00
Tim Murray
1a6f09a48c Add support for multiple architectures with RS compat lib.
Change-Id: I310f6f72e1124c06e9c59b0f59d33f168dc1e632
2013-03-06 17:15:26 -08:00
Ying Wang
45150f8b89 Fix function call syntax error.
Change-Id: Id40e059ade0c24b62ac407192ed3a67398dfa083
2013-02-27 15:23:42 -08:00
Ying Wang
4974879c32 Merge "Switch target java library dependency file from javalib.jar to classes.jar" into jb-mr2-dev 2013-02-27 23:10:12 +00:00
Ying Wang
087d4ee3ed Switch target java library dependency file from javalib.jar to classes.jar
Previously, any target Java code that depends on framework.jar has to
wait for the library's javalib.jar.
To build javalib.jar we have to run dx, which is quite slow.
Actually when code links against framework.jar, only classes.jar is
needed.
This improves the potential parallelism of the build system.

Change-Id: I82c5926ef282a3a6096bbf49b54ef4f2a0c2c0e7
2013-02-27 12:11:37 -08:00
Stephen Hines
9ac9b53dc6 Reduce RS build verbosity.
Change-Id: I9d04198ed1b9025abd60080c5ef23b3ce5ef9e22
2013-02-27 00:51:08 -08:00
Ying Wang
9485a57bb2 Untwist the target/host shared library dependencies.
Before this, if there are duplicate module names in both the host and
target spaces, LOCAL_SHARED_LIBRARIES results in mixed dependencies.

Bug: 7026946
Change-Id: I5407e3d078a8903c94978cc6d3e256851c52340f
2013-02-22 14:32:30 -08:00
Stephen Hines
6adffc196f Remove libcompiler_rt.so dependency for RS compat lib.
Change-Id: I0d871c9c7d7946b8551fdefd201603bb59ea010e
2013-02-11 20:03:38 -08:00
Stephen Hines
90a94b4bb2 Build RS compatibility library apps with libcompiler_rt.so too.
Change-Id: Ibc14ceb473bef23ab9e28f3a6bf7e4e99d529c01
2013-02-07 14:00:27 -08:00
Tim Murray
99b060f624 Attempt #2: libclcore.bc comes from prebuilts/sdk for unbundled projects.
This change also adds the NDK library path for unbundled builds.

Bug: 7419958
Change-Id: Id8b608b5dd49d72bec697da8fa7a9393d2ab735f
2013-02-01 12:01:38 -08:00
-b master
c3ccfeee88 Build libcore without a dep on aapt.
Currently building libcore (i.e. to get the core Java libraries) has a
dependency on AAPT. This is problematic for some users that don't want to pull
in the entirety of frameworks/base, e.g. for Dalvik development.

It turns out that all definitions.mk is using aapt for in this case is 'aapt
add -k <jar> <dex>', which adds a file to a JAR while stripping path info.
This is functionally equivalent to 'zip -j', and this CL just makes that
switch.

Change-Id: I292ecaf9d0321018bb7d2e68a49b2cc81de98a20
2013-01-28 15:55:53 -08:00
Stephen Hines
ba37043835 Remove references to llvm-rs-link, which is unused.
Change-Id: I42433a9b1d2b525d1b09f778a10ab9689e34926e
2013-01-25 15:26:16 -08:00
Stephen Hines
8f199b0588 Revert "libclcore.bc comes from prebuilts/sdk for unbundled projects."
This reverts commit ba6a7e1d46

Change-Id: I2855923e67c226d39fe362342570e9ab96b885b8
2013-01-23 18:39:05 +00:00
Stephen Hines
ba6a7e1d46 libclcore.bc comes from prebuilts/sdk for unbundled projects.
This change also adds the NDK library path for unbundled builds.

Bug: 7419958

Change-Id: If22823c3890f5507d486e654a1e0296c06a2e239
2013-01-22 17:56:37 -08:00
Stephen Hines
9541f5864d Build RS compatibility objects with libcompiler-rt.a.
Change-Id: Ic49fdc30b1d4568bbdc94338e116a31a1ade1e80
2013-01-18 16:41:22 -08:00
Stephen Hines
f692513071 Clean up libRSSupport.so and libclcore.bc dependencies.
Bug: 7419958
Change-Id: I62453bb6830cc2c82ca9dbbf576b52da95eef4b1
2012-12-17 17:59:47 -08:00
Ying Wang
3a990aee1e Merge "Build from source or prebuilt" 2012-12-14 14:52:16 -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
Stephen Hines
7d6ec71965 Add -nostdlib to RS bc->so linker command line.
Change-Id: Ic715060c3d037ec9fecb0ad9b2be6c2e7052ce0a
2012-12-13 19:24:50 -08:00
Stephen Hines
e719f28d93 Build rules for Renderscript compatibility library.
Bug: 7419958
Change-Id: I2e0f0bb632e6ff22b2cf1a1b96b28364637995cc
2012-12-12 14:58:02 -08:00
Ying Wang
90304a74a3 am ae56a570: am e1f94189: am ce811261: Merge "Move check-api to definition.mk" into jb-mr1.1-dev
* commit 'ae56a570cb7e16a0853433d20691b0ee72da5cc2':
  Move check-api to definition.mk
2012-11-16 10:42:41 -08:00
Ying Wang
ae56a570cb am e1f94189: am ce811261: Merge "Move check-api to definition.mk" into jb-mr1.1-dev
* commit 'e1f94189d95084a72d206d89ecb9d38de0512fc6':
  Move check-api to definition.mk
2012-11-15 15:23:44 -08:00
Ying Wang
e1f94189d9 am ce811261: Merge "Move check-api to definition.mk" into jb-mr1.1-dev
* commit 'ce811261bc8d56d43e59b1f9fb96ae53192de126':
  Move check-api to definition.mk
2012-11-15 15:20:58 -08:00
Ying Wang
c065da2307 Move check-api to definition.mk
1) Move check-api to definition.mk, so it can be used in other places.
2) Add additional dependency to the api-stub module to consolidate the
apicheck dependency. Previously you have to run 2 "make"s in a row and
only in the 2nd run apicheck is run, due to a gnu-make optimization.

Bug: 7540265
Change-Id: Ib24ed87d9330027a9f95ed7b16dd4002cc0e3198
2012-11-14 16:00:45 -08:00
Ying Wang
31df068b38 Additional certificates support for an apk.
Change-Id: I5b35d5728ba9d65f7ece956127270a9ca2ea0efe
2012-11-13 10:56:04 -08:00
Tim Murray
a7aa8005d2 Add support for RS in C++.
Change-Id: Ib8008d6301584bd0a2cd91c4c1294e0df8ac3b73
2012-11-01 15:07:27 -07:00
Joe Onorato
50462d67e9 am 8858d2a7: Add a tool to let you enforce layering between packages in a java module.
* commit '8858d2a731f432786b7548b5f63ac93be81eb986':
  Add a tool to let you enforce layering between packages in a java module.
2012-10-20 18:15:18 -07:00
Joe Onorato
8858d2a731 Add a tool to let you enforce layering between packages in a java module.
And build system support for it too.

Change-Id: I4dd5ed0b9edab6e8884b0d00cfeeae5fa38d967a
2012-10-20 17:25:55 -07:00
Ying Wang
057eba07b8 Use PRIVATE_WARNINGS_ENABLE
Before this LOCA_WARNINGS_ENABLE never worked :-(

Change-Id: I129a0bbbbb68e4179454b0827b0b0d18d6de67a0
2012-10-18 10:54:49 -07:00
Joe Onorato
0eccce99d7 Add a tool to let you enforce layering between packages in a java module.
And build system support for it too.

Change-Id: I4dd5ed0b9edab6e8884b0d00cfeeae5fa38d967a
2012-10-18 10:21:46 -07:00
Stephen Hines
daf2ca50dd am d2637573: resolved conflicts for merge of ed38fe6f to jb-mr1-dev-plus-aosp
* commit 'd26375733992298edc036652d25170e1cd7cbd49':
  Add support for building Filterscript files.
2012-10-12 11:02:14 -07:00
Stephen Hines
d263757339 resolved conflicts for merge of ed38fe6f to jb-mr1-dev-plus-aosp
Change-Id: If699b3ccf1f3befd4df881e3eef6b90dd7c505bf
2012-10-11 22:08:57 -07:00
Stephen Hines
0a0cfe95ac Merge "Add support for building Filterscript files." into jb-mr1-dev 2012-10-11 17:25:21 -07:00
Stephen Hines
0ab6e3e6e6 Add support for building Filterscript files.
This change piggybacks Filterscript rules onto the existing Renderscript
rules. There is no real difference other than the file extension (which
llvm-rs-cc uses to apply a more stringent set of warnings/errors).

Bug: 7166741
Change-Id: I27175ff1c16c27129cafa92b4e8caabf2e5f4150
2012-10-11 15:29:10 -07:00
Ying Wang
57ddcb1bbc Support to build executables against the NDK
Use "LOCAL_SDK_VERSION := <number>" to build against the NDK when you
include $(BUILD_EXECUTABLE).
Cherry-picked from master.

Bug: 7170098
Change-Id: Ib35a294bd6aa4e969d46ecd8ebab8ca5d843e24b
2012-10-10 10:24:26 -07:00
Ying Wang
15f116b2bb am 91fd1231: Support to build executables against the NDK
* commit '91fd1231c3254bc9d0642e5a646b5657bdaedffa':
  Support to build executables against the NDK
2012-10-08 14:21:37 -07:00
Ying Wang
91fd1231c3 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-10-08 14:12:41 -07:00
Conley Owens
bda3f9427d am 9b962440: am 672b1893: am 8c37f49f: Merge "Follow symlinks when using find"
* commit '9b962440b00591ba43dd05977299216d499c84da':
  Follow symlinks when using find
2012-10-02 16:28:39 -07:00
Conley Owens
9b962440b0 am 672b1893: am 8c37f49f: Merge "Follow symlinks when using find"
* commit '672b1893688be170fad79dd35c41236d7c0e36c0':
  Follow symlinks when using find
2012-10-02 16:27:15 -07:00
Conley Owens
f435739bac Follow symlinks when using find
This allows more flexibility with symlinking subtrees within projects.
For example, a build bot with a read-only copy of the src can copy
directories which will be affected by applied patches while symlinking
to directories that will remain untouched.

Change-Id: I9c783180f3ebdd737d8daf17550f562e4f00b200
2012-10-02 14:34:36 -07:00
Ian Rogers
e88d5af2ab am 318330dd: am 9acbbf12: am 76a6dc3a: Fix common typo in comments, warning and error messages.
* commit '318330dd920977733f20eeda338d3c36892373f6':
  Fix common typo in comments, warning and error messages.
2012-10-01 17:28:18 -07:00
Ian Rogers
76a6dc3a19 Fix common typo in comments, warning and error messages.
s/can not/cannot/g

Change-Id: I1bac31157732666deb46f6f20389ff539977ffb9
2012-10-01 16:36:23 -07:00
Ying Wang
54fa8c3ff9 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-28 15:08:12 -07:00
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