Commit graph

339 commits

Author SHA1 Message Date
Colin Cross
ae2986e51a build: delete 64-bit blacklist
The last projects in the blacklist have been fixed, delete the code.

Change-Id: I0fe7809bd18e32516374c9cb2a6f71df1d3c62ee
2014-06-17 21:35:44 -07:00
Ying Wang
e1b867dde7 Fix loophole in module expansion.
Previously we only expanded product_MODULES with LOCAL_REQUIRED_MODULES,
but not modules introduced by LOCAL_SHARED_LIBRARIES; Later we did a further
shared libary expansion in vendor_module_check.mk.
It couldn't track C in the following case:
A : B, by LOCAL_SHARED_LIBRARIES; B : C, by LOCAL_REQUIRED_MODULES.

With this change, we transformed the LOCAL_SHARED_LIBRARIES dependencies
into LOCAL_REQUIRED_MODULES dependencies before doing the required
module expansion and the loophole is closed.
All module names are now expanded to product_MODULES now and it makes
vendor_module_check.mk simpler.

Change-Id: I8835a478d2ce0ce10601a8449f446f07b01c2b7f
2014-06-10 14:30:30 -07:00
Ying Wang
7b913ce6fa Support .asm being compiled by yasm targeted for x86.
Change-Id: Icd6626a082facf920b0e49e2fbe8861e94400552
2014-06-06 11:00:36 -07:00
Ying Wang
d3ddfdf847 am b3bed595: Merge "Add a dummy build recipe for generated RS cpp files."
* commit 'b3bed5952b44e69dc9e1988beb4092303084ef61':
  Add a dummy build recipe for generated RS cpp files.
2014-05-28 23:38:46 +00:00
Ying Wang
81ab8339fe Add a dummy build recipe for generated RS cpp files.
Previously the RS cpp files are generated by the timestamp rule. Though
we have the generated RS cpp files depend on the timestamp file, we
don't have a build recipe. In such case gmake does some "optimization"
that it skip recompiling the generated cpp files, because it assumes the
generated cpp files are already up to date even if the rs files have
been updated.

Bug: 15313144
Change-Id: Ie69ecd2c788057d3619f9c7d2a125d44c4a534a1
2014-05-28 16:17:09 -07:00
Dan Albert
a5b0b1303d am 3805f619: Merge "Revert "Fix for duplicate names in whole static libs""
* commit '3805f619156163eab8ad92fd51b4a431be1287bd':
  Revert "Fix for duplicate names in whole static libs"
2014-05-27 19:44:19 +00:00
Dan Albert
3c12b5c02b Revert "Fix for duplicate names in whole static libs"
This reverts commit 0e5ce8be34.

Change-Id: I68b776cb915fd7be8299ddb2899907046dddadf3
2014-05-27 19:30:36 +00:00
Dan Albert
212772f632 am 31101623: Merge "Fix for duplicate names in whole static libs"
* commit '31101623b3e621436f6b46f49242ed4642d86164':
  Fix for duplicate names in whole static libs
2014-05-27 18:26:38 +00:00
Dan Albert
0e5ce8be34 Fix for duplicate names in whole static libs
_extract-and-include-single-(host|target)-whole-static-lib was written such that
only the first file of a given name would be extracted and included into the new
library. This patch iterates over each identically named archive member,
extracts them individually, and adds them to the new archive.

Bug: 15110069
Change-Id: Ia08c7be6f40bfc8403908a8808898ada479099b1
2014-05-23 18:23:47 -07:00
Ying Wang
cdcb6926d4 am 6cb69bd4: Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build"
* commit '6cb69bd4f20ac3ae3a7d5b5cc323c4480cf8ef75':
  Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
2014-05-23 17:44:31 +00:00
Ying Wang
6cb69bd4f2 Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build" 2014-05-23 17:39:40 +00:00
Ying Wang
a72e6f80e4 am 8a3f514d: Merge "Split the rules to build the odex file"
* commit '8a3f514d44e2c1d4920126b3edd47f7a7616b732':
  Split the rules to build the odex file
2014-05-22 02:29:52 +00:00
Ying Wang
36142f64ae Split the rules to build the odex file
Previously the odex file is byproduct generated by the package.apk rule.
Though we have the odex file depend on the package.apk it doesn't have
its own build recipe. In case package.apk isn't updated but we still
need to update the odex file (such as changed LOCAL_MULTILIB), the odex
file will never be rebuilt.
This change split out the rules to build the odex file and make sure the
build recipe get executed if the odex file needs rebuild.

Change-Id: I60c2f32b536b3d59045301ee863aae1451734aad
2014-05-21 16:24:59 -07: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
40b49d3043 am a74ade94: Merge "Support host multilib build"
* commit 'a74ade945776e80f99f3b05d06a131cfd353c3f6':
  Support host multilib build
2014-05-15 00:41:37 +00:00
Ying Wang
6feb6d5607 Support host multilib build
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.

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

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

Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
2014-05-14 16:55:04 -07:00
Bill Yi
1e4adfa837 Merge commit '8113e43601aac7702b9ec007e81a179826143d1e' into HEAD 2014-04-29 11:32:53 -07:00
Ying Wang
faf3d5ed0f Disable host -fPIE if BUILD_HOST_static is set.
It turns out -static doesn't work with -fPIE.

Bug: 13568878
Change-Id: I66951a5517dece1c5f4f22c329cf703bd99b5163
2014-04-04 14:38:14 -07:00
Torne (Richard Coles)
3972253b0f Add GYP as a target type that requires 2nd arch.
"GYP" class targets are used by external/chromium_org for gyp's "none"
type. The processing in these targets needs a separate intermediate
directory for the primary/secondary architecture, so add it to the list
in intermediates-dir-for along with libraries/executables.

Change-Id: Id05899c83b45ed0647dfbfa6b0b2e7f61b04348b
2014-04-02 11:33:17 +01:00
Ying Wang
ce1c596e15 Remove the unnecessary indirection of TARGET_STRIP_COMMAND
Now all archs use the same strip command which can be put just in
transform-to-stripped.

Change-Id: Ief79697d47ea142fc9e63e63a7e2dace9e839165
2014-03-28 17:25:34 -07:00
Ying Wang
288bf3a377 am 266cf4f2: am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit '266cf4f2595323170fe02db05835884b4522a0f9':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-24 21:26:51 +00:00
Ying Wang
266cf4f259 am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit 'f39752e99b4e5083f1e91c46722f87def8143b49':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-24 21:21:26 +00:00
Ying Wang
f39752e99b Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
Bug: 11335547
Change-Id: Ic08b7557a288508e8e8d14a725923960c47f5ca0
2014-03-20 17:28:57 -07:00
Christopher Ferris
810cf65d71 am aea9f041: am 8b1bcc7d: Merge "Add a method to leave the symbol table in a library."
* commit 'aea9f041f72a128065691ac402ccdb72a5a7aad4':
  Add a method to leave the symbol table in a library.
2014-03-19 18:15:39 +00:00
Christopher Ferris
a6e2f9322c Add a method to leave the symbol table in a library.
When LOCAL_STRIP_MODULE := keep_symbols is set, then the normal strip rules
will be modified so that only the .debug_* sections are removed. The original
symbol table is left alone.

This allows the compilation of certain libraries so that libbacktrace library
can provide meaningful names to functions.

Bug: 12958251
Change-Id: I82bdc304a463012e29086325ccb51163464cb4a9
2014-03-18 17:34:41 -07:00
Colin Cross
9bdcdff615 HACK: add 64-bit directory blacklist
Change-Id: I431e8b220db81d51930dc0b3d95995df120c179a
2014-03-13 11:26:26 -07:00
Nicolas Geoffray
e7be6ffa98 am db48d145: am 247dd0c4: Merge "Do not remove the generated .hpp file from yacc."
* commit 'db48d145841afb9b9b6d1c124191a1681d6b4f39':
  Do not remove the generated .hpp file from yacc.
2014-03-11 18:29:45 +00:00
Ying Wang
009f48b00f am a6230641: am 26bcd640: Merge "Try to catch more misuse of ."
* commit 'a623064131f23412daa0ac4b333320e2e30d85f0':
  Try to catch more misuse of $(my-dir).
2014-03-11 18:17:42 +00:00
Ying Wang
8ec7041127 am 8e286fbf: am cf1b7d4b: Merge "Select src arch for prebuilts."
* commit '8e286fbfc712ed695008f786592fe83e4a1331a7':
  Select src arch for prebuilts.
2014-03-11 18:16:49 +00:00
Torne (Richard Coles)
bbc3a3eda3 am 63002088: Merge "Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS."
* commit '630020883abc6c8b2c13876e3195ed6abcf4890f':
  Allow LOCAL_LDFLAGS to override HOST_GLOBAL_LDFLAGS.
2014-03-11 18:08:03 +00:00
Ying Wang
2c5666fc4d am eb9b62e0: Merge "Make -rpath-link work with multilib."
* commit 'eb9b62e08d25ec9067a3f47634a2b8cf750230d8':
  Make -rpath-link work with multilib.
2014-03-10 18:06:15 +00:00
Ying Wang
16ae8b4dd1 am 5c7039fb: Merge "Remove dead code."
* commit '5c7039fb069c040759df0a5a15241dd7f8b2f9b7':
  Remove dead code.
2014-03-07 02:30:02 +00:00
Elliott Hughes
77285ffc9b am 993ffb80: Merge "Add all-S-files-under."
* commit '993ffb802ee90e07e73e67e523fd040395dfd74d':
  Add all-S-files-under.
2014-03-07 02:27:16 +00:00
Colin Cross
b9ad6792c0 am 717de0f5: Merge "Fix installing 2nd arch shared libraries"
* commit '717de0f553dc3c1a2baa0cc988af1adc5b26dba8':
  Fix installing 2nd arch shared libraries
2014-03-07 02:23:35 +00:00
Nicolas Geoffray
3cb9ddbdec Do not remove the generated .hpp file from yacc.
Depending on the file extension of the generated C++ file,
bison will generate a #include of a .h or .hpp. So both files
must be kept in the generated directory.

Change-Id: Id0aac7f407bdc69c7f5012c0d021761b0fceb427
2014-03-04 14:48:55 +00:00
Ying Wang
79e8319b2e Try to catch more misuse of $(my-dir).
Change-Id: I0c07d7115c66b30ba1383dfaa133f0cc40a33ad7
2014-02-28 18:23:06 -08:00
Ying Wang
6c930fc1c9 Select src arch for prebuilts.
Change-Id: I2d08f923d28d59cfef93ff0bd9893352baaee60b
2014-02-27 18:25:29 -08: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
Ying Wang
9fb3526648 Make -rpath-link work with multilib.
Change-Id: If69ea6ed6cdbb657ed4005f8217d653e29626783
2014-02-21 16:20:20 -08:00
Ying Wang
dc6bb0477d Remove dead code.
Change-Id: Ia36a04037e15cbf296f375f3ece9a7e977fdca1e
2014-02-12 17:38:46 -08:00
Colin Cross
02e31d240a HACK: add 64-bit directory blacklist
Change-Id: I431e8b220db81d51930dc0b3d95995df120c179a
2014-02-12 12:17:55 -08:00
Elliott Hughes
e3b044a0cc Add all-S-files-under.
Change-Id: I25416e2acc850c61226bc7a8e0536384f6eb2dce
2014-02-11 13:48:35 -08: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
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
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
Logan Chien
e6f65438a4 Allow clang to build host binaries.
Change-Id: I7e4f9dc6f69a97cfefdfa2ed55c5d7b8ad496da7
2014-01-07 14:49:20 +08:00