Commit graph

13 commits

Author SHA1 Message Date
Ying Wang
532f1127af Revert "Don't rename host libraries if only one arch is build."
This reverts commit b1f7fb7a50.

Change-Id: Id7ea4803ab52659c1316ea9f1babf8117b667441
2014-06-11 01:12:18 +00:00
Ying Wang
b1f7fb7a50 Don't rename host libraries if only one arch is build.
This makes it simpler to reference normal host modules by just their
original names even if they are built for the 2nd arch.

Change-Id: I49d32dad0dc523c458d5f9176993037d8695e6a5
2014-06-10 17:18:08 -07:00
Ying Wang
6e85f8b0de Set default LOCAL_MULTILIB only if LOCAL_MODULE_HOST_ARCH isn't restricted
Otherwise we may end up conflict between LOCAL_MODULE_HOST_ARCH and the
default multilib mode.
Also removed the unneeded variants of LOCAL_MODULE_HOST_ARCH.

Change-Id: I9e5a0144da3cb6310be0ddf098738987e51305de
2014-06-10 16:24:31 -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
6feb6d5607 Support host multilib build
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.

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

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

Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
2014-05-14 16:55:04 -07:00
Ying Wang
58f462fccf Fix prebuilt library dependency for multilib build
Also we don't need to include module_arch_supported.mk again, if we are
currently substituting the source build with LOCAL_PREBUILT_MODULE_FILE.

Change-Id: I444b0397d74c3153b398a050b762e49418062a86
2014-02-25 18:32:27 -08:00
Ying Wang
bf4a8d3069 Include $(BUILD_COPY_HEADERS) in upper-level makefiles
This makes sure copy_headers.mk only be included onces, no matter
it's for the 1st arch or the 2nd arch.

Change-Id: I80a558fbdb52861f176bd27a21c302069a5cc3ce
2014-02-20 13:54:43 -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
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
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
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00