Commit Graph

4252 Commits

Author SHA1 Message Date
Chih-Hung Hsieh 619fdb8d77 Add local Clang+target specific flags.
BUG: 17677366
Change-Id: I75522fb56fdf4d27ea1f5f0ae15866b13ae6e206
2014-09-26 17:19:49 -07:00
Ian Rogers 850a4cb72b Test __GLIBC__ is defined before using its value.
Avoids -Wundef warning.

Change-Id: I52d8223500fe31cdf7023e32e96df75e33eb2f7e
2014-09-25 17:34:40 -07:00
Dan Albert 3302924802 Merge "Add option for generating coverage info." 2014-09-24 16:03:27 +00: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
Elliott Hughes 8fe8dc83e3 Remove unused HAVE_OFF64_T.
Change-Id: I24acf64efcd0fd84d5dda342d4c4293fa59fae1a
2014-09-23 13:36:01 -07:00
Elliott Hughes 76ab00f189 Remove the unused IPC macros.
There are still a couple of references to HAVE_WIN32_IPC to be dealt with
later.

Change-Id: Id131fbf2e96d4c1c7bb98629779045375bd5f85f
2014-09-22 20:43:32 -07:00
Todd Poynor 9c226d1f9e build: remove HAVE_OOM_ADJ
This define is no longer used.

Change-Id: I6615d6e4aa09f71b7c4c435ccb83a07bba91b6dc
2014-09-22 18:47:48 -07:00
Ying Wang b69b7d7fba Merge "Fix recovery image build for 32p" 2014-09-20 00:38:08 +00:00
Elliott Hughes e2f5470606 Merge "Remove unused HAVE_EPOLL." 2014-09-19 22:54:17 +00:00
Elliott Hughes 67839a58be Remove unused HAVE_EPOLL.
The only people who appear to be using this are actually using their own
one.

Change-Id: I349ed4ce3874c1b2f9bad56c93c8ccee88ae9432
2014-09-19 15:12:56 -07:00
Brian Carlstrom b97b1e5940 Merge "Enable dalvik.vm.lockprof.threshold on eng builds in addition to userdebug" 2014-09-19 21:41:01 +00:00
Brian Carlstrom 85d56eba99 Enable dalvik.vm.lockprof.threshold on eng builds in addition to userdebug
Bug: 17572009
Change-Id: I0cfc1aa2dd93a8dac21d23d813801c74ed37079a
2014-09-19 11:30:27 -07: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
Bruce Beare 7c02ec91e8 Fix recovery image build for 32p
When building for 32p, we need to be explicit that we wish to build the 32bit
version of the binaries that will be placed in the recovery image. The recovery
image doesn't actually care... but if we are not explicit in this, the makefiles
will ask for the 64bit binaries but the Android.mk for the binaries will supply
the 32bit images (causing the build to fail)..

Change-Id: I728912bc8e07726888fe8bed4352cbb373911cb7
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2014-09-15 18:36:47 -07:00
Ying Wang 96c2af033d Enable multilib odex only if TARGET_2ND_ARCH is defined.
Bug: 17507247
Bug: 14694978
Change-Id: I160a37bc0970315054606829aa112b67eaee7d49
2014-09-15 12:12:36 -07:00
Ying Wang 2e9f639282 Support to build apk odex for both arch.
Build odex for both arch in multilib build if an app has
LOCAL_MULTILIB := both.
Refactored the common setup code to a separate file setup_one_odex.mk.

Bug: 17409149
Bug: 14694978
Change-Id: I74c9426cd74fe0b0cb4811368f740a88ac2ae022
2014-09-15 12:12:18 -07:00
Dan Albert bfbd41edcb Missed one part of removing the vbox target.
Change-Id: I8edb5252b5e71de042b79cb9eb2a497d89efb773
2014-09-10 15:58:20 -07:00
Alexander Ivchenko 388dce3192 Refine TARGET_GLOBAL_CFLAGS for x86 and x86_64:
Remove -msse2 for x86 (-mssse3 should be provided by the compiler).
       Remove -fPIC (compiler provides by default).
       Remove -fno-inline-functions-called-once.

Change-Id: Ibb29934224c4eedfff926dc72c3b6342c1861ac9
2014-09-09 17:27:32 +04:00
Ying Wang 8b3476986a Add LOCAL_POST_LINK_CMD.
For now we support LOCAL_POST_LINK_CMD only for static executables.
This fixed the hack of building linker which need to insert additional
step after link.

Bug: 17403674
Change-Id: Iefdfe1e3fab3a30c5d4ad701d46f931481eab572
2014-09-05 15:47:59 -07: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
Tim Murray 039cd7e076 Merge "Add LOCAL_NO_FPIE." 2014-09-03 22:46:45 +00:00
Tim Murray 595d0dbd5b Add LOCAL_NO_FPIE.
Not all executables should be built with -pie.

bug 15814177

Change-Id: I402e8a531866b507ee80a0bf677f9f3551ca7693
2014-09-03 15:39:50 -07:00
Ying Wang 7754e0ce89 Merge "[MIPS64] Modify the default MIPS64 build to MIPS64R6." 2014-09-03 19:20:29 +00:00
Stephen Hines 2f9fa52025 Merge "Fix build breakage due to incorrect bcc_compat RS_TRIPLE." 2014-09-03 16:02:09 +00:00
Stephen Hines 5c72544d48 Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
Bug: 17333374
Change-Id: I13582ce0cde86f7b3728aa4f45a5197438d65a2d
(cherry picked from commit 52626d2a7b)
2014-09-02 21:46:25 -07:00
Ying Wang cee38d55f8 Merge "[MIPSR6] R6 target options for clang" 2014-09-03 01:02:54 +00:00
Raghu Gandham 10326b3d7f [MIPS64] Modify the default MIPS64 build to MIPS64R6.
Change-Id: I797e4c2e5b69c6991545c26886b5b25e6f8c2a67
2014-09-02 16:30:00 -07:00
Ying Wang 7ba7d7f4f5 Default host module to 64-bit except for SDK builds.
Set "HOST_PREFER_32_BIT := true" only if "sdk" or "win_sdk" is among the
make command line goals, or it's a MinGW windows build, which only builds
host SDK tools.

Bug: 13751317
Change-Id: I8ec1a97a5d1af065a153b16523c2ee3434d0dd71
2014-09-02 16:04:31 -07:00
Stephen Hines ec8778e89f Merge "Fix RS_TRIPLE and RS_TRIPLE_CFLAGS." 2014-09-02 16:23:11 +00:00
Ying Wang 7852b80c05 Merge "Add missing flags to x86 (both 32- and 64-bit) arch variants. Delete x86_64-atom.mk as we don't support 64-bit on old Atom." 2014-09-01 17:47:55 +00:00
Stephen Hines 039675adb8 Fix RS_TRIPLE and RS_TRIPLE_CFLAGS.
Bug: 17333374

Add RS_TRIPLE_CFLAGS to ensure that we build with the proper defines on
targets like x86. This also changes all build targets to use the
proper 32/64-bit triples when creating their runtime libraries.

Change-Id: I8f6175b1a14af6d03ee90f32069f3688ec227fb9
2014-08-29 15:20:05 -07:00
Brian Carlstrom a4331e35b6 Add --no-include-debug-symbols to avoid bloat in user builds
Bug: 16938924

(cherry picked from commit 91b9d01b6b)

Change-Id: I0b744e0aaacc11fe8983f22f56ffc546a07ae764
2014-08-28 18:10:42 -07:00
Chih-Hung Hsieh fb482c6d5d Clang rejects -Wno-old-style-declaration flag.
BUG: 17258227
Change-Id: I2a35263298ffd8dd7cda25183e185274cbf62b7b
2014-08-26 16:37:00 -07:00
Chih-Hung Hsieh b699b0ea58 Merge "Clang does not recognize -Wno-literal-suffix." 2014-08-26 23:01:34 +00:00
Chih-Hung Hsieh 4d12b5788d Clang does not recognize -Wno-literal-suffix.
BUG: 17258227
Change-Id: I2d98e68daa780fbe0e127605840ae7edcb4e9880
2014-08-26 15:30:04 -07:00
Calin Juravle 18f23def0e Merge "Push ISA features into system properties" 2014-08-26 17:52:12 +00:00
Calin Juravle 68b246401d Push ISA features into system properties
We need to know instruction set featues at runtime as well so that the
apps get compiled on target with the proper features. The properties are
read by installd and passed to dex2oat.

Bug: 16716262

(cherry picked from commit 28be9d8884)

Change-Id: I45b363558dea17e9b049e4a83a55990b4911d9d8
2014-08-26 18:47:44 +01:00
Chih-Hung Hsieh 0278174764 Add GCC only flags to clang .mk files.
BUG: 17258227
Change-Id: Iec9fdb21a9fa31e18a17704beb27bb493c9b7192
2014-08-25 16:49:53 -07:00
Elliott Hughes 0fa6a4063d HAVE_FUTEX is unused.
I missed this the other day.

Change-Id: Ifb6912de3aae6d03593ffb08d8d9555dc9e53f4d
2014-08-20 21:26:19 -07:00
Elliott Hughes a9ec8350b0 Merge "Remove HAVE_ANDROID_PTHREAD_SETNAME_NP." 2014-08-21 04:20:34 +00:00
Elliott Hughes 10f5a420eb Merge "HAVE_OPEN_MEMSTREAM is no longer used." 2014-08-21 04:16:48 +00:00
Elliott Hughes 70f3f33c2d Remove HAVE_ANDROID_PTHREAD_SETNAME_NP.
https://android-review.googlesource.com/104945 removes the only user.

Change-Id: I303d941036ab889ab747f26561506a5e1c93f0c2
2014-08-20 20:21:29 -07:00
Elliott Hughes 31c667ed3a HAVE_OPEN_MEMSTREAM is no longer used.
Bug: 17164505
Change-Id: I8055e52019d8cdea957d0fb8cbd46ca9b52564e1
2014-08-20 16:17:28 -07:00
Dan Albert e0f44ac25d Performance improvement for whole static libs
Improves performance for LOCAL_WHOLE_STATIC_LIBS by copying the first .a
to the new .a rather than extracting and recreating

Change-Id: Iecdb5e4bb2ce987bb41a70c3393d18a6d72ae689
2014-08-20 13:58:36 -07:00
Elliott Hughes 36ba1db405 Merge "Remove unused entries from AndroidConfig.h." 2014-08-16 04:09:33 +00:00
Elliott Hughes 032ac32bdb Remove unused entries from AndroidConfig.h.
We should probably try to remove these files completely, but this at
least takes care of the stuff that's completely obsolete.

Change-Id: Ic71b7b491c119963068294e258dc6afe5a45b40d
2014-08-18 12:18:59 -07:00
Dan Albert be0af1f7fb Merge "Strip my_clang on assignment." 2014-08-16 04:09:33 +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
Elliott Hughes f8d885793d Merge "Remove HAVE_GETTID." 2014-08-16 04:09:33 +00:00
Elliott Hughes 1ac1401a06 Remove HAVE_GETTID.
Bug: 17048545
Change-Id: Ib5b72ecb451a26cb393147a44601566400ca1dd6
2014-08-18 10:49:12 -07:00