Commit graph

273 commits

Author SHA1 Message Date
Dan Albert
2daceaa83c Add support for ASAN in host modules.
Change-Id: Id9ed83499e0eb995f06e845c3153a50677d768b8
2014-10-20 11:37:18 -07:00
Dan Albert
358d9c0d69 am 24c1d149: am a01fa4f8: Merge "LOCAL_NATIVE_COVERAGE should imply -O0."
* commit '24c1d149678dcd03f679bfa0fc29386cee779935':
  LOCAL_NATIVE_COVERAGE should imply -O0.
2014-10-09 01:28:25 +00:00
Dan Albert
6adf02580b am 24c1d149: am a01fa4f8: Merge "LOCAL_NATIVE_COVERAGE should imply -O0."
* commit '24c1d149678dcd03f679bfa0fc29386cee779935':
  LOCAL_NATIVE_COVERAGE should imply -O0.
2014-10-09 01:14:58 +00:00
Dan Albert
4c12c0303c LOCAL_NATIVE_COVERAGE should imply -O0.
Optimization can lead to incorrect coverage results.

Change-Id: I8ade9ab246e292d26ac18821baf9970e29dc1a1f
2014-10-08 17:05:19 -07:00
Ying Wang
230afab744 am e4e50f9b: am 8330c4c5: Merge "Apply LOCAL_CXX_STL to also prebuilts."
* commit 'e4e50f9bb4ae8af11aaddf9825a09ff33241b204':
  Apply LOCAL_CXX_STL to also prebuilts.
2014-10-07 23:23:15 +00:00
Ying Wang
4019305580 am e4e50f9b: am 8330c4c5: Merge "Apply LOCAL_CXX_STL to also prebuilts."
* commit 'e4e50f9bb4ae8af11aaddf9825a09ff33241b204':
  Apply LOCAL_CXX_STL to also prebuilts.
2014-10-07 23:20:51 +00:00
Ying Wang
75e8fcbb6c Apply LOCAL_CXX_STL to also prebuilts.
Because LOCAL_CXX_STL modifies a module's required shared libaries,
we need this for also prebuilt shared libraries and executables.

Change-Id: I418c26143999a613c40aadf990f131b123e0ac3d
2014-10-07 13:07:00 -07:00
Dan Albert
0c68be8c42 resolved conflicts for merge of 55c2adff to lmp-mr1-dev-plus-aosp
Change-Id: Iaa9ac54a065109e877a2f3f88ef740193f97398c
2014-10-06 11:48:44 -07:00
Dan Albert
15cb27748f am 55c2adff: am b6361968: Merge "Remove unused my_compiler_dependencies."
* commit '55c2adfffac9b40992316938699cb36e0818fbbb':
  Remove unused my_compiler_dependencies.
2014-10-06 18:46:02 +00:00
Dan Albert
a8fd66822a Remove unused my_compiler_dependencies.
my_compiler_dependencies was never assigned to, but the way it was
included in the rules prevented the user from being able to use | in
LOCAL_ADDITIONAL_DEPENDENCIES. Since it is unneeded, just remove it.

Change-Id: I74bb59e81b97756296060eea5b7a42909be50130
2014-10-06 10:45:44 -07:00
Dehao Chen
2b0596cfa2 am 295a6d27: Add global option filtering for FDO builds.
* commit '295a6d27f6a2ea04d4ba6072738db7832fa9896f':
  Add global option filtering for FDO builds.
2014-10-02 12:38:03 +00:00
Dehao Chen
295a6d27f6 Add global option filtering for FDO builds.
Change-Id: I95e797f7f5945bb34061d17e49156ca8c8a19854
(cherry picked from commit c7ed00fc00)
2014-10-01 22:10:21 +00:00
Chih-Hung Hsieh
916a954d8c am b9b2d21c: am 4a8d5c1a: Merge "Add local Clang+target specific flags."
* commit 'b9b2d21c04d0ba65ad56a26f8306e9afa7d99694':
  Add local Clang+target specific flags.
2014-09-27 03:00:29 +00:00
Chih-Hung Hsieh
1184754c22 am b9b2d21c: am 4a8d5c1a: Merge "Add local Clang+target specific flags."
* commit 'b9b2d21c04d0ba65ad56a26f8306e9afa7d99694':
  Add local Clang+target specific flags.
2014-09-27 02:59:47 +00:00
Chih-Hung Hsieh
4a8d5c1aaf Merge "Add local Clang+target specific flags." 2014-09-27 02:40:28 +00:00
Chih-Hung Hsieh
619fdb8d77 Add local Clang+target specific flags.
BUG: 17677366
Change-Id: I75522fb56fdf4d27ea1f5f0ae15866b13ae6e206
2014-09-26 17:19:49 -07:00
Stephen Hines
7a5d35b22a am 145eddfd: am 670018fd: Merge "Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables."
* commit '145eddfd229b118fadd4f4f255dbecc1a79b5e2b':
  Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables.
2014-09-26 19:53:06 +00:00
Stephen Hines
92ca2234b3 am 145eddfd: am 670018fd: Merge "Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables."
* commit '145eddfd229b118fadd4f4f255dbecc1a79b5e2b':
  Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables.
2014-09-26 19:53:06 +00:00
Stephen Hines
f00896663e Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables.
These aren't needed now that we only use the compiler/headers that exist in
the prebuilts/clang directory.

Change-Id: I9978efb10815e92577d45629db324e0a5094f880
2014-09-25 22:35:16 -07:00
Dan Albert
b43af8807f resolved conflicts for merge of 326f9450 to lmp-mr1-dev-plus-aosp
Change-Id: I10e578a3d10a03312cbc4058a92f02ccaba1739c
2014-09-24 09:51:05 -07:00
Dan Albert
7655a97984 resolved conflicts for merge of 326f9450 to lmp-dev-plus-aosp
Change-Id: I66360da623a6e7ac04610c3252f24ed69f7e4b1e
2014-09-24 09:42:39 -07:00
Dan Albert
4bbc6c790b Add option for generating coverage info.
To enable building with coverage, the environment variable
NATIVE_COVERAGE must be set to true.

Set `LOCAL_NATIVE_COVERAGE := true` to generate coverage information for
a given component.

This is currently not supported for clang (b/17574078, b/17583330).

If static library A is included in a binary B (dynamic or static
executable, or shared library), and A is built with coverage
information, B is required to link with libgcov.a. Since the make does
not offer a good way to track this dependency, link libgcov.a even if
LOCAL_NATIVE_COVERAGE is not set (but still guarded by NATIVE_COVERAGE).
This ensures that all of the libgcov dependencies will always be
resolved, and causes no change in the resulting binary if coverage is
not used.

Bug: 10134489
Change-Id: Id5a19f2c215e4be80e6eae27ecc19b582f2f6813
2014-09-23 15:19:02 -07:00
Dan Albert
220b01ba27 am 92421720: am 98f7742a: Merge "Move selection of C++ STL into the build system."
* commit '9242172094691c7203ba7cf0a5e5db611ca9032b':
  Move selection of C++ STL into the build system.
2014-09-19 00:16:16 +00:00
Dan Albert
46edd9b103 am 92421720: am 98f7742a: Merge "Move selection of C++ STL into the build system."
* commit '9242172094691c7203ba7cf0a5e5db611ca9032b':
  Move selection of C++ STL into the build system.
2014-09-19 00:15:23 +00:00
Dan Albert
b05f2ca150 Move selection of C++ STL into the build system.
Preparing for migration from stlport to libc++. STL selection is done
with LOCAL_CXX_STL (valid values are default, none, libc++,
libc++_static, stlport, stlport_static, bionic).

The selection of the STL is as follows:

    if LOCAL_CXX_STL == 'default'
      ifdef LOCAL_SDK_VERSION
        Use whatever STL the other NDK options have selected.
      else
        Use bionic's libstdc++ for target, GNU libstdc++ for host. This
        is compatible with the existing build options.
      endif
    else
      if LOCAL_CXX_STL == 'stlport'
        Use stlport.
      else if LOCAL_CXX_STL == 'libc++'
        Use libc++.
      else if LOCAL_CXX_STL == ''
        Don't use any STL.
      endif
    endif

Bug: 15193147
Change-Id: If712ba0ae7908d8147a69e29da5c453a183d6540
2014-09-18 16:38:20 -07:00
Ying Wang
634e7df1c8 am acaada12: Use existing my_32_64_bit_suffix.
* commit 'acaada12731639e3feba1dd83d7e44765ec8556c':
  Use existing my_32_64_bit_suffix.
2014-09-10 23:32:46 +00:00
Ying Wang
acaada1273 Use existing my_32_64_bit_suffix.
Change-Id: I75d9733870c37a44ce55ae6cbcfb3f67e1387e9d
2014-09-10 16:11:41 -07:00
Tim Murray
c0bdd15b10 am fabd3c00: Merge "Pass -m32 or -m64 to llvm-rs-cc when reflecting C++." into lmp-dev
* commit 'fabd3c00b461c921cb745acd62e7b07b4e938241':
  Pass -m32 or -m64 to llvm-rs-cc when reflecting C++.
2014-09-10 22:58:37 +00:00
Tim Murray
f0020c6157 Pass -m32 or -m64 to llvm-rs-cc when reflecting C++.
bug 17417839

Change-Id: Iea4aede874f751ac732c3e3ae7a11e18613edcf5
2014-09-10 15:11:01 -07:00
Chih-Hung Hsieh
ace83ae389 am 2202dc0a: am 1051d5dc: Merge "Add LOCAL_CLANG_*FLAGS for clang only flags."
* commit '2202dc0af3ab86e2a73bf816012aaea65fb93d91':
  Add LOCAL_CLANG_*FLAGS for clang only flags.
2014-09-05 02:34:31 +00:00
Chih-Hung Hsieh
9aa69a6752 Add LOCAL_CLANG_*FLAGS for clang only flags.
To be used only for some modules.

Change-Id: I107ec37f11f738f860598f0c86c4ad7ec20c9011
2014-09-04 18:43:16 -07:00
Dehao Chen
19aa0acbf4 am 2d83365c: Merge "Add TARGET_FDO_LDFLAGS to make sure -lgcc is always linked after -lgcov." into lmp-dev
* commit '2d83365c9d852874bee790e2047178959933133e':
  Add TARGET_FDO_LDFLAGS to make sure -lgcc is always linked after -lgcov.
2014-08-21 17:52:54 +00:00
Dehao Chen
f4294cd816 Add TARGET_FDO_LDFLAGS to make sure -lgcc is always linked after -lgcov.
Change-Id: I33a94abe58391a8564ada14417b0158ddd7ed2d6
2014-08-20 16:48:17 -07:00
Dan Albert
37d058859b am 473dc3d4: am be0af1f7: Merge "Strip my_clang on assignment."
* commit '473dc3d416a29371085237c26f5df391d9698ec1':
  Strip my_clang on assignment.
2014-08-18 19:34:52 +00:00
Dan Albert
db905e7b11 Strip my_clang on assignment.
There were a few cases that my_clang was being used without being
stripped. This was causing uses like the following to fail because it
would be partially applied (use clang as the compiler, but don't strip
out incompatible cflags).

    LOCAL_CLANG := true # explanation

To avoid this problem in the future, just strip my_clang when it is
assigned.

Change-Id: I41c2f36a4d4c3aa305a25b4a151c066dad5ffe0f
2014-08-18 11:14:38 -07:00
Dehao Chen
ec1a73943b am 5b81106e: Merge "Explicitly check if LOCAL_FDO_SUPPORT is true (instead of empty). Change-Id: Icff260c7f866236254091b035782607a31e5a109" into lmp-dev
* commit '5b81106eb5c5c9a616874caae5ea91b45a45e9d6':
  Explicitly check if LOCAL_FDO_SUPPORT is true (instead of empty). Change-Id: Icff260c7f866236254091b035782607a31e5a109
2014-08-15 11:51:02 +00:00
Dehao Chen
f7a909db63 Explicitly check if LOCAL_FDO_SUPPORT is true (instead of empty).
Change-Id: Icff260c7f866236254091b035782607a31e5a109
2014-08-14 17:54:14 -07:00
Tim Murray
96a8c9bc9f am 68301526: am b771d956: Merge "Add flag to enable default clang builds--USE_CLANG_PLATFORM_BUILD."
* commit '6830152675bf4daa9c118c686bf522498c4df3a3':
  Add flag to enable default clang builds--USE_CLANG_PLATFORM_BUILD.
2014-08-13 19:41:00 +00:00
Tim Murray
06659bc9b7 Add flag to enable default clang builds--USE_CLANG_PLATFORM_BUILD.
bug 17007253

Change-Id: Ib11c017bf8aee384e6780e2a1252221fbff3327a
2014-08-13 12:18:30 -07:00
Dan Albert
47b755b486 Fix Windows SDK build.
Bug: 16823325
Change-Id: Ia2a318957aa525f0e72b556a693a20f513146b64
(cherry picked from commit 95994def18)
2014-08-08 08:16:04 -07:00
Dan Albert
04cf315970 Inhibit implicit -Bsymolic in -shared.
Bug: 16853291

Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
(cherry picked from commit b6bb71b85d)
2014-08-08 08:15:19 -07:00
Dan Albert
908ab54fda Fix uses of -fPIC and -fPIE.
We've been using -fPIC and -fPIE together in the global cflags all this
time. These options are incompatible. The only reason we haven't been
hit by this before is because of the forced -Bsymbolic in GCC. To fix
this, pass -fpic when compiling objects for shared libraries and -fpie
when compiling objects for executables. For static libraries, also use
-fpic. We have to do this because static libraries might be included in
either a shared library or an executable. Code compiled with -fpie
cannot be included in a shared library, but code compiled with -fpic
may be included in an executable.

We've also been using -fpic and -fPIC together. These are different
options, and only the latter will take effect.
http://stackoverflow.com/a/967010

The final thing this fixes is that we had -f(PIC|PIE) flags being passed
to link commands. These are compile time flags, and don't do anything at
link time.

Bug: 16823325
Change-Id: Ic76f47e63dc2c81b7e1a8058bae1b3dc8565d606
(cherry picked from commit 4803ce2696)
2014-08-08 08:15:14 -07:00
Ying Wang
5a5d443f15 am 8ac188ff: am 6dbbb159: Merge "Consistent use of USE_MINGW"
* commit '8ac188ff0e739ea75ea02166c54428245200f088':
  Consistent use of USE_MINGW
2014-08-08 03:26:07 +00:00
Dan Albert
493c61af6a am 868b22dd: am 76c942c1: Merge "Fix Windows SDK build."
* commit '868b22dd277392cce899d9a980270fbaf8d2f9de':
  Fix Windows SDK build.
2014-08-08 02:28:11 +00:00
Dan Albert
9d6aa51a0f am e99d8947: am cbc742a1: Merge "Inhibit implicit -Bsymolic in -shared."
* commit 'e99d8947c09731d71db7e95a280cf81f51f4049a':
  Inhibit implicit -Bsymolic in -shared.
2014-08-08 00:23:56 +00:00
Dan Albert
d423e5fbdb am 897cd3d4: am afae9fd8: Merge "Fix uses of -fPIC and -fPIE."
* commit '897cd3d494272b8a6a12f0fb6d02bfe7426a309c':
  Fix uses of -fPIC and -fPIE.
2014-08-08 00:23:55 +00:00
Ying Wang
594a10ae77 Consistent use of USE_MINGW
Change-Id: I05e212e5a99639d0196006b9c2ec35072c54f399
2014-08-07 20:08:04 -07:00
Dan Albert
95994def18 Fix Windows SDK build.
Change-Id: Ia2a318957aa525f0e72b556a693a20f513146b64
2014-08-07 18:29:11 -07:00
Dan Albert
4803ce2696 Fix uses of -fPIC and -fPIE.
We've been using -fPIC and -fPIE together in the global cflags all this
time. These options are incompatible. The only reason we haven't been
hit by this before is because of the forced -Bsymbolic in GCC. To fix
this, pass -fpic when compiling objects for shared libraries and -fpie
when compiling objects for executables. For static libraries, also use
-fpic. We have to do this because static libraries might be included in
either a shared library or an executable. Code compiled with -fpie
cannot be included in a shared library, but code compiled with -fpic
may be included in an executable.

We've also been using -fpic and -fPIC together. These are different
options, and only the latter will take effect.
http://stackoverflow.com/a/967010

The final thing this fixes is that we had -f(PIC|PIE) flags being passed
to link commands. These are compile time flags, and don't do anything at
link time.

Bug: 16823325
Change-Id: Ic76f47e63dc2c81b7e1a8058bae1b3dc8565d606
2014-08-07 10:20:58 -07:00
Dan Albert
b6bb71b85d Inhibit implicit -Bsymolic in -shared.
Bug: 16853291

Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
2014-08-07 15:43:16 -07:00
Tim Murray
4f8e50d8e5 am d161be2d: am 77d93bce: Merge "fix build"
* commit 'd161be2d063565ecab6d1fce4440d496d8928abc':
  fix build
2014-07-25 01:03:35 +00:00
Tim Murray
71ecd1dd0f am eb9563f9: am 16d43086: Merge "Fix Windows SDK build to not use clang."
* commit 'eb9563f9ab610ca09bf99c6975f70c14c35683bd':
  Fix Windows SDK build to not use clang.
2014-07-25 01:03:32 +00:00
Tim Murray
f3ca3d560a fix build
Change-Id: I28799d5523e1d2d2500a82b3d323c58486aacdbc
2014-07-24 15:20:18 -07:00
Tim Murray
5ca1dc15a1 Fix Windows SDK build to not use clang.
bug 16172793

Change-Id: I7bf76cae49ec17bf50eb657b0e38234b7cb55e85
2014-07-24 14:43:33 -07:00
Tim Murray
72c70d14d4 resolved conflicts for merge of 2812b27c to lmp-dev-plus-aosp
Change-Id: I770fbf16affbd43b0750b50426298038e4b573b7
2014-07-24 14:27:05 -07:00
Ying Wang
8478ab00d0 am ebe0bacc: am 6837ac67: Merge "Refactor FDO support code to ensure arm64 can also be built with FDO."
* commit 'ebe0bacc8063f74da5bacb80c5e0b97a00a7351c':
  Refactor FDO support code to ensure arm64 can also be built with FDO.
2014-07-23 23:41:18 +00:00
Tim Murray
92d79cbb41 Switch host builds to use Clang by default.
If LOCAL_CLANG is not set to false for a host module, clang will be used instead of gcc.

This also enables the integrated assembler by default for Darwin host builds.

bug 16172793

Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-24 09:25:58 -07:00
Dehao Chen
7092c79a14 Refactor FDO support code to ensure arm64 can also be built with FDO.
Change-Id: I752c9f411b0a046a15c72b4837efc1fb0503b470
2014-07-23 16:34:07 -07:00
Dehao Chen
25671e15cc Refactor FDO support code to ensure arm64 can also be built with FDO.
Change-Id: I752c9f411b0a046a15c72b4837efc1fb0503b470
2014-07-23 16:23:46 -07:00
Ying Wang
01c4f4622b am dceddd91: am 79b46720: am 02f98a26: Merge "Fix loophole in module expansion."
* commit 'dceddd91d9a6516346e752b9f942747bea931cfa':
  Fix loophole in module expansion.
2014-06-11 20:49:20 +00:00
Ying Wang
541b1d0f7c am fe9ad097: am b1f65358: am 5ad17493: Merge "Support .asm being compiled by yasm targeted for x86."
* commit 'fe9ad0975ade10219a5fa9a77d034ba77735e393':
  Support .asm being compiled by yasm targeted for x86.
2014-06-11 17:44:54 +00: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
5ad17493cd Merge "Support .asm being compiled by yasm targeted for x86." 2014-06-09 21:43:56 +00:00
Stephen Hines
d17e71f185 am 69d5bd7c: am e266873b: am 1a8f0d3b: Merge "Move comment out of recipe section"
* commit '69d5bd7cbc873c86685c463ac3dc7ab8de9e71e7':
  Move comment out of recipe section
2014-06-06 21:33:48 +00:00
Stephen Hines
8ff9252680 Move comment out of recipe section
If we keep a comment in the recipe, it prints out whenever that component
gets built.

Change-Id: Idb99a9edc02cfb87e35e59b7fd37588b928b98a5
2014-06-06 12:51:47 -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
8b73a86834 am 834ec0ea: am d3ddfdf8: am b3bed595: Merge "Add a dummy build recipe for generated RS cpp files."
* commit '834ec0ead591cf64a5f660af0210e95728e08c4f':
  Add a dummy build recipe for generated RS cpp files.
2014-05-28 23:45:29 +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
Ying Wang
5186dac02b Add a dummy build recipe for the proto generated header files
This fixed issue that gnumake skip updating the cpp file that includes
the generated header file when the .proto file gets updated.
For example:
Say a.cc includes b.pb.h, since b.pb.h is just byproduct of the rule
that generates b.pb.cc, and though we have dependency "b.pb.h :
b.pb.cc", but we don't have build recipe for that rule.
Gmake stupidly thinks that b.pb.h must not be updated in that case so
it skips all targets that depends on b.pb.h!
With the dumy build recipe, gmake now doesn't skip the depedent targets.

Bug: 13009798
Change-Id: I39adc09b7656bdd023f578fb8933667944fd974c
2014-05-28 16:15:13 -07:00
Ying Wang
9df5043594 resolved conflicts for merge of 536d4a76 to master
Change-Id: Ib655d08e5c9272aef1fd1e130b5fb2b63148a55e
2014-05-28 11:05:47 -07:00
Ying Wang
824344af00 Support LOCAL_CLANG with arch/bit suffix.
Precedence: LOCAL_CLANG_<arch> > LOCAL_CLANG_<32|64> > LOCAL_CLANG.

Bug: 15257067
Change-Id: I86b72f3bec162834591287d3b5231b5f40f9a431
2014-05-27 13:06:08 -07:00
Ying Wang
bccdab8737 am 65475feb: am 29267309: am 294301bb: Merge "Exclude libstdc++ and libgcc if libc++ is requested."
* commit '65475feb5999068096b287faac9199d1c8e18340':
  Exclude libstdc++ and libgcc if libc++ is requested.
2014-05-27 17:59:11 +00:00
Ying Wang
d90de32951 Exclude libstdc++ and libgcc if libc++ is requested.
Bug: 15174002
Change-Id: I24fe428c3520f76cd61f0660b59ba18a1f2d2dad
2014-05-23 16:42:37 -07:00
Ying Wang
8200231ae1 am e50f2d9f: am 40b49d30: am a74ade94: Merge "Support host multilib build"
* commit 'e50f2d9f32a27d8290692dbf99ab8b247ef9d553':
  Support host multilib build
2014-05-15 01:09:49 +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
Ying Wang
4908595634 Automatically export generated .pb.h files.
- Automatically export the include path of the generated .pb.h files
- Set up the dependency to make sure the .pb.h files get generated
  before any dependent c/c++ files get compiled.
With this change, any module that links a proto library doesn't need
any extra setup.

Bug: 14563418
Change-Id: Iea7d19e9d8dce8e7d479c386b7a6151a95a0a0df
2014-05-06 13:06:08 -07:00
Andrew Hsieh
293ccf9ae6 am d815dbd1: am f14ba5b9: am 8afa2555: Merge "Rename my_ndk_version_root to my_ndk_sysroot; and _include and _lib"
* commit 'd815dbd1343d05aae5f5430dc38d8846107d202b':
  Rename my_ndk_version_root to my_ndk_sysroot; and _include and _lib
2014-04-29 00:23:52 +00:00
Andrew Hsieh
140761af09 Rename my_ndk_version_root to my_ndk_sysroot; and _include and _lib
prebuilts/ndk/current/platforms/android-19/arch-x86_64/usr/lib
is renamed to usr/lib64 to be more consistent with rest of
lib paths in x86_64 toolchain, which is multilib

See https://android-review.googlesource.com/#/c/92441/

Change-Id: I4e59245505d0fa87ae3608e81e715ccfcecc5ec8
2014-04-25 23:47:10 -07:00
Stephen Hines
46df181815 am f0dda8d0: am 9661b09f: am 9956bb6a: Merge "Build changes necessary for LLVM 3.5 switch."
* commit 'f0dda8d0cbb249be24a71776289b1d9ebe17faaf':
  Build changes necessary for LLVM 3.5 switch.
2014-04-25 22:51:38 +00:00
Tim Murray
43d5e1bbc4 Build changes necessary for LLVM 3.5 switch.
Change-Id: Icb6065daada7cb1d7425206830a4ef9e23454c03

Conflicts:
	core/clang/arm.mk
2014-04-24 13:14:32 -07:00
Evgeniy Stepanov
5d8029f234 Update ASan configuration.
Change runtime library name to keep in sync with upstream.
Enable frame pointers in instrumented code for fast stack unwind.

Change-Id: I815912bb856c56c399639ea76ad4cb6b97961840
2014-04-16 10:52:10 +00:00
Ben Cheng
19b7c4d5c9 am e4d787bf: am 7e793040: am eec11d97: Merge "Decouple platform compiler and NDK library versioning."
* commit 'e4d787bfbbde83bc4b868ed804c94118c2ea0080':
  Decouple platform compiler and NDK library versioning.
2014-04-11 17:10:37 +00:00
Ben Cheng
4de6fa4069 Decouple platform compiler and NDK library versioning.
TARGET_GCC_VERSION: select compiler from prebuilts/gcc/...
TARGET_NDK_GCC_VERSION: select libraries from prebuilts/ndk/...

Change-Id: I4422a42cdc97aa92b40798014cba82c3c123bbd2
2014-04-10 22:46:26 -07:00
Colin Cross
c93c10a75b am 8295d6cd: am ce087413: am 36a67a90: Merge topic \'tests\'
* commit '8295d6cd62ba73ea66e64204d2d0ea27b4b34889':
  add support for LOCAL_MODULE_STEM_32 and LOCAL_MODULE_STEM_64
  add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
2014-03-25 23:48:13 +00:00
Colin Cross
87974056d9 add support for LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64
Some executables will need to be built for both 32-bit and 64-bit.
For tests, it will be convienient to keep the name of the executable
the same, but install them in a different location.  Add
LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64 to allow a module
to specify different paths for 32-bit and 64-bit executables.

Change-Id: I3be830e899c6d485fe55c25c66b20b3fe64c795e
2014-03-25 13:48:40 -07:00
Andrew Hsieh
1477080e34 am cde91b3e: am 0adc6431: am c550cd45: am fa97fe67: Merge "Pick gnu-libstdc++ based on TARGET_GCC_VERSION"
* commit 'cde91b3e6a42e66cb45e75eb69111f37840dffec':
  Pick gnu-libstdc++ based on TARGET_GCC_VERSION
2014-03-25 03:34:29 +00:00
Andrew Hsieh
92d50c1a10 Pick gnu-libstdc++ based on TARGET_GCC_VERSION
Previously we have only one set of include/lib paths for
LOCAL_NDK_STL_VARIANT:=gnustl_static regardless of GCC
version, which is wrong because each GCC version
come with its own libstdc++.

Change-Id: I2a01c2120b6948aedce00e2f8d08dfc6932126dd
2014-03-25 09:46:27 +08:00
Ying Wang
595f996f0d am 7a93f683: am 82a2ae71: am 5a4c783c: am 8c60a1df: Merge "Complete installed shared library dependency"
* commit '7a93f68322eca5ccf32ca9544ba63ec64548e050':
  Complete installed shared library dependency
2014-03-24 19:36:32 +00:00
Ying Wang
d8d3721240 Complete installed shared library dependency
Previously the installed shared library dependency doesn't include
modules introduced by LOCAL_SHARED_LIBRARIES_<arch>.
This change fix the problem.
It also cleans up use of the shared library variable.

Bug: 13528787
Change-Id: Id8d807cc57f0ec4a71f18b64545d91191efad8fb
2014-03-21 16:17:04 -07:00
Andrew Hsieh
96000a611a am 314b5c98: am 66a4ef8f: am d14f3cc7: am 5384c187: Merge "Add LOCAL_NDK_STL_VARIANT:=c++_static and c++_shared"
* commit '314b5c98cbd68d11e7484b5e35a1bea466cde66b':
  Add LOCAL_NDK_STL_VARIANT:=c++_static and c++_shared
2014-03-18 00:15:28 +00:00
Andrew Hsieh
73d800e519 Add LOCAL_NDK_STL_VARIANT:=c++_static and c++_shared
Add llvm libc++ static and shared libraries

Change-Id: I92af9b6ab21cbf8ea82e014a4c11aeb5455920f9
2014-03-17 20:30:45 +08:00
Ying Wang
df925cefc1 am f91a014f: am 0a196075: am 446f00c9: am ce156811: Merge "Split WITHOUT_CLANG to WITHOUT_HOST_CLANG and WITHOUT_TARGET_CLANG"
* commit 'f91a014f6f2c176f6e1f99cb3bb90d707e0be31c':
  Split WITHOUT_CLANG to WITHOUT_HOST_CLANG and WITHOUT_TARGET_CLANG
2014-03-11 02:15:11 +00:00
Ying Wang
ba8b377d89 Split WITHOUT_CLANG to WITHOUT_HOST_CLANG and WITHOUT_TARGET_CLANG
Still keep WITHOUT_CLANG, which enables both.

Bug: 13402154
Change-Id: I32cb668223997719875751bf3d64f592d6086830
2014-03-10 18:59:12 -07:00
Nicolas Geoffray
b19e62b3f6 am 77d4e8ed: am 2801735a: am d85ef325: am 460ed38a: Merge "Extend YACC and LEX handling to .yy and .ll files."
* commit '77d4e8ed4456c0d033d0740881f0843f00893248':
  Extend YACC and LEX handling to .yy and .ll files.
2014-03-03 18:15:22 +00:00
Nicolas Geoffray
9484e2e13f Extend YACC and LEX handling to .yy and .ll files.
The external mclinker project has .yy and .ll files that
require the same rules as .y and .l.

Change-Id: I2b02df9a74bac9c215f8aeb8ee2ff0d2616526ed
2014-03-03 15:58:46 +00:00
Ying Wang
031e0fb308 Generate .pb.cc/.pb.h to arch-neutral generated_sources_dir
So a library can export the proto's include path that can be used with
both archs in multilib build.

Change-Id: Ia0f92f0b40e39dc3fa426c69c52139a0a8f04077
2014-02-25 16:12:16 -08:00
Ying Wang
2bc6328ff7 am ead8944e: Generate .pb.cc/.pb.h to arch-neutral generated_sources_dir
* commit 'ead8944e8da9a4b6dbe344b8d93b2c6b2a730f68':
  Generate .pb.cc/.pb.h to arch-neutral generated_sources_dir
2014-02-25 21:47:15 +00:00
Ying Wang
ead8944e8d Generate .pb.cc/.pb.h to arch-neutral generated_sources_dir
So a library can export the proto's include path that can be used with
both archs in multilib build.

Change-Id: Ia0f92f0b40e39dc3fa426c69c52139a0a8f04077
2014-02-25 11:18:40 -08:00
Ying Wang
28edfe16f7 am 0c9c0bfc: am 9aadde67: Merge "Include in upper-level makefiles"
* commit '0c9c0bfcc6f2d10fa7235f48b0174a1a120ca599':
  Include $(BUILD_COPY_HEADERS) in upper-level makefiles
2014-02-21 04:19:45 +00: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