Commit graph

384 commits

Author SHA1 Message Date
Ying Wang
c01f2dcb10 Disable .toc optimization for host modules.
Host binaries may be run during the build process and the internal
implementation of the shared libraries makes a difference for the build
result. This change makes sure host tools get re-linked and re-run when
any of its dependency libraries gets updated.
DEX2OAT is such a host tool. We also changed DEX2OAT as full dependency
of dex-preoptimization, so we rebuild the odex files if DEX2OAT itself,
or any dependency libraries changed.

Bug: 24597504
Change-Id: Idf0d9be82ccebd826d9c5b405a39cff437e0af29
2015-12-15 10:00:19 -08:00
Stephen Hines
eca3206abb Merge "Revert "Change USE_CLANG_PLATFORM_BUILD default to true."" 2015-12-13 23:06:03 +00:00
Stephen Hines
7a0c88ec3e Revert "Change USE_CLANG_PLATFORM_BUILD default to true."
This reverts commit 3c8036da53.

Change-Id: I930bbebce8396d7c0abd847530640a696d3418e7
2015-12-13 22:58:22 +00:00
Dan Albert
445bc2fc2d Use lib64 for mips64 as well.
This was previously working because for some reason prebuilts/ndk had
a tangled mess of hand assembled symlinks that pointed lib -> lib64
for the multilib architectures.

Change-Id: I294d67f58f2008b1a53790cf676f5223df449cbc
2015-12-11 15:04:59 -08:00
Chih-Hung Hsieh
3c8036da53 Change USE_CLANG_PLATFORM_BUILD default to true.
When USE_CLANG_PLATFORM_BUILD is not set, default will be clang/llvm.
USE_CLANG_PLATFORM_BUILD=false can be used to select gcc as default.

BUG: 23163853
BUG: 26102335

Change-Id: I00604c2aef4849e8c3505b2c4002eb1c46cd1fd1
2015-12-10 14:41:55 -08:00
Dan Albert
8dca15f287 Fix the mips build.
The linker can't do --hash-style=gnu for mips.

Change-Id: I66a77067f8be6fc92ca686d3e6e159beb72cf76b
2015-12-09 16:26:20 -08:00
Dan Albert
2ad9079305 Merge "Add support for LOCAL_NDK_STL_VARIANT := none." 2015-12-10 00:17:23 +00:00
Dan Albert
0e2e71dc2e Add support for LOCAL_NDK_STL_VARIANT := none.
Sometimes we don't want any STL.

Change-Id: I08b4389b7882702c0e483a1456f7775fe4da1c75
2015-12-09 15:59:17 -08:00
Dan Albert
ee629c9ffb Build NDK binaries with --hash-style=both.
Change-Id: I1c3b7415c654b783c6bb7e38a40d4c279826400f
2015-12-09 14:52:25 -08:00
Dan Willemsen
c29172c333 Sanity check LOCAL_SRC_FILES_EXCLUDE
Error out if there is a file listed in LOCAL_SRC_FILES_EXCLUDE but not in
LOCAL_SRC_FILES. This should catch typos or other mistakes that would
otherwise be missed.

Change-Id: Iaddf575a6ce35238998ac47b59591a7d05fbcd0d
2015-12-03 22:58:39 -08:00
Colin Cross
6b9bddde6f Make export_includes a restat rule
There is currently an intentional incremental rebuild issue with
import_includes.  export_includes might get updated with an identical
version, but we don't want to force everything downstream of it to
rebuild.

When BUILDING_WITH_NINJA==true, only update export_includes if it
changes, and use .KATI_RESTAT to only run downstream rules if it
changes.  import_includes will only be updated if one of the
export_includes files is updated, so object files can have a normal
dependency on import_includes instead of an order-only dependency.
All downstream object files will now be recompiled if their imported
include paths change.

Bug: 25910568
Change-Id: I626f3b24ac02ac1309049cf1ce66cfe8ec816513
2015-11-30 17:33:26 -08:00
Christopher Wiley
2d91c61ef0 Fix race in C++ AIDL file generation
The export_includes file for a library needs to express a dependency on
all generated exported headers.  For aidl generated headers, express a
dependency on the .cpp file instead, since the generator promises to
generate this file last.  Unfortunately, the C++ headers generated from
a .aidl file depend on the contents of the file.

Change-Id: I9402b364e4538b502c0958ac8c7bd72cb0add724
2015-11-19 13:52:15 -08:00
Christopher Wiley
c7e936f530 Export generated AIDL headers
It is common for developers to generate/compile AIDL in a static
library, then link that library into an executable.  When doing this,
developers need to export the generated headers.

Bug: 25779424
Test: a refactoring of the aidl Android.mk shows this works

Change-Id: I4f7d471a601d2a683cb5a9da5e02e3fab576c26a
2015-11-19 11:04:18 -08:00
Shinichiro Hamaji
0e7587a9ea Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries
When a shared object is rebuilt, all dependent libraries and
executables are rebuilt. Such rebuild is unnecessary when there
is no interface change. With this patch, .toc files will be
generated for all .so files. The rule which generates .toc files
has ninja's restat=1 and .toc files are not changed ninja won't
rebuild dependent targets.

Performance:

$ m && touch bionic/libc/stdio/stdio.c && time m
Before: 1m03s (2563 targets)
After: 21s (90 targets)

Bug: 24597504
Change-Id: Ia5dd950273d143f4e99eee8bef7478f1a94cd138
2015-11-04 15:23:59 +09:00
Dan Albert
da63739767 Drop GCC back to C++11.
Our GCC does not use a valid C++14 ABI.

Bug: http://b/25022512
Change-Id: I6f4b3450137c24a6a0c00bf956bae7a0ba280094
2015-10-26 11:28:33 -07:00
Christopher Wiley
2df75d17a8 Invoke the aidl-cpp compiler to generate C++
Bug: 23599697
Test: test application compiles generated code

Change-Id: I35255517dd0b7ef7a82134be1c862093eaa3ce6b
2015-10-19 16:18:03 -07:00
Colin Cross
a04abc8e23 Add support for LOCAL_SRC_FILES_EXCLUDE
LOCAL_SRC_FILES_EXCLUDE will be used to filter files out of
LOCAL_SRC_FILES.  A common usage will be to use
LOCAL_SRC_FILES_EXCLUDE_<arch> to remove a source file that will be
replaced with an arch-optimized version.

Change-Id: I75cc6114c47fb784bab65cae8f618c4f395f07bb
2015-10-16 17:33:01 -07:00
Dan Albert
5baea14363 Merge "Use libgcov OR libclang_rt.profile, not both." 2015-10-15 18:39:42 +00:00
Peter Qiu
425e01996a Export include path to D-Bus headers for multilib builds
Bug:None

Change-Id: I6e3898c71f54ede08a27f5be93e95a2b219e5ea6
2015-10-14 16:54:48 -07:00
Dan Albert
7fbbc5d205 Use libgcov OR libclang_rt.profile, not both.
Using both can cause duplicate symbol errors.

Change-Id: Id8ee13a81d32e3248ff1cdc468f49a26ecde6b57
2015-10-08 14:16:39 -07:00
Nicolas Geoffray
3f054bdd0d am 506857e9: Merge "Make linker configurable through environment."
* commit '506857e974ed1aac60bff96a71d0eb182865bed8':
  Make linker configurable through environment.
2015-09-29 09:04:59 +00:00
Nicolas Geoffray
506857e974 Merge "Make linker configurable through environment." 2015-09-29 08:34:28 +00:00
Colin Cross
7ee3b85eba resolved conflicts for 953981db to stage-aosp-master
Change-Id: Ic1003a594ac5e5e91b124f249a569fb81123e973
2015-09-28 18:45:23 -07:00
Colin Cross
a4447e8c89 Don't add dependencies on Makefiles when using ninja
Ninja has an implicit dependency on the command being run, and kati will
regenerate the ninja manifest if any read makefile changes, so there is no
need to have dependencies on makefiles.
This won't catch all the cases where LOCAL_ADDITIONAL_DEPENDENCIES contains
a .mk file, because a few users of LOCAL_ADDITIONAL_DEPENDENCIES don't
include base_rules.mk, but it will fix the most common ones.

Bug: 23566977
Change-Id: I66de882421376303ab7233c8ce7274548f6b2199
2015-09-28 16:29:52 -07:00
Nicolas Geoffray
b7c9f32765 Make linker configurable through environment.
Change-Id: I152ad7b41cfa05f2f59f51c6d8bd1e427f1a1649
2015-09-28 10:03:26 +01:00
Shinichiro Hamaji
a9bd99816f am cf448ddb: Merge "Use gomacc even for FDO build"
* commit 'cf448ddb4f95f511575e56a729e0d60a45d84e1e':
  Use gomacc even for FDO build
2015-09-28 04:43:25 +00:00
Shinichiro Hamaji
09295a82f8 Use gomacc even for FDO build
Goma's client recognizes -fprofile-use= flag so shoulde be
compatible with Android's FDO build.

Change-Id: I0d21d6f530cd05770f8dc12e9dc33a5db49a9c7d
2015-09-26 12:01:21 +09:00
Dan Albert
ded3f15eeb am 782b98ea: Merge changes I3ca9ed36,Ibd7eec5c
* commit '782b98eaa1c02d935b338f7317fef139067291bb':
  Revert "Default to hiding libgcc symbols in each object."
  Revert "Don't apply --exclude-libs for the host."
2015-09-23 23:47:37 +00:00
Dan Albert
b77aedbf1e Revert "Default to hiding libgcc symbols in each object."
This reverts commit 021b7651a5.

Bug: http://b/24166967
Change-Id: I3ca9ed36fa3b55c7eb129c209903676879720acd
2015-09-23 16:18:18 -07:00
Dan Albert
31927f76a3 Revert "Don't apply --exclude-libs for the host."
This reverts commit 1576da248c.

Bug: http://b/24166967
Change-Id: Ibd7eec5c261e85a0474243991be7ee1860c9e14d
2015-09-23 16:18:03 -07:00
Dan Albert
84a500039d am a41dd0a9: Merge "Don\'t apply --exclude-libs for the host."
* commit 'a41dd0a973ad9b890a4e2fe558ad6ed038bacdef':
  Don't apply --exclude-libs for the host.
2015-09-23 20:42:33 +00:00
Dan Albert
1576da248c Don't apply --exclude-libs for the host.
The Mac linker doesn't support this flag, and we don't actually need
it there anyway because we link dynamically to the system's compiler
runtime lib.

Bug: http://b/24166967
Change-Id: I62a926ed39d9fc487638e0c1a172762503dd633e
2015-09-23 13:32:14 -07:00
Dan Albert
0b8113ee08 am c496b259: Merge "Default to hiding libgcc symbols in each object."
* commit 'c496b259b8dddf0eac71a50f5e258da4a353d6bb':
  Default to hiding libgcc symbols in each object.
2015-09-23 20:15:37 +00:00
Dan Albert
021b7651a5 Default to hiding libgcc symbols in each object.
Bug: http://b/24166967
Change-Id: I3dba264ae70a2e13b3edee7575139e86ef49be71
2015-09-22 16:49:28 -07:00
Scott James Remnant
d8f08571b3 am 909fe8e0: Merge "build: support compiling .mm on host"
* commit '909fe8e0f7da8db09a004ef44a90e786c81df5e4':
  build: support compiling .mm on host
2015-09-17 23:15:30 +00:00
Scott James Remnant
dd86e5a0de build: support compiling .mm on host
libchrome uses .mm (Objective-C++) files to bridge C++ code with
OS X Frameworks. This adds support for compiling .mm to .o by just
using the existing C++ support.

Bug: 24168923
Change-Id: Ia65357e2e2584dfffcb6796e214fe6b27635c3a6
2015-09-17 15:51:32 -07:00
Dan Albert
d9f9836e5e am 3ee9daac: Merge "Remove WITHOUT_(HOST|TARGET)_CLANG."
* commit '3ee9daac6a3bf8d2a9030b99f62595330f22cafa':
  Remove WITHOUT_(HOST|TARGET)_CLANG.
2015-09-16 23:31:41 +00:00
Dan Albert
32f7ff14ce Remove WITHOUT_(HOST|TARGET)_CLANG.
This is unused.

Change-Id: Ibc461fef02c82d110718003aceffb943c930ffe6
2015-09-16 15:43:00 -07:00
Dan Willemsen
749e07c648 am c8db47a0: Merge "Don\'t build windows modules with clang, fix flags"
* commit 'c8db47a0213aa5c204c140cb9268389b4175ae06':
  Don't build windows modules with clang, fix flags
2015-09-09 23:25:11 +00:00
Dan Willemsen
7728817ab9 Don't build windows modules with clang, fix flags
shamu checkbuilds set USE_CLANG_PLATFORM_BUILD, which shouldn't apply to
modules built for windows. Also fix some flags that were being set
improperly.

Bug: 23566667
Change-Id: Id4c5b7cc59966328483d90f2b7be3f35e439ecee
2015-09-09 16:10:50 -07:00
Dan Willemsen
c98d9a9d0f am f1c09d7f: Merge "Add HOST_CROSS_OS"
* commit 'f1c09d7fbd92a08cc51950a7d35fb5f7fc564a20':
  Add HOST_CROSS_OS
2015-09-09 18:19:13 +00:00
Dan Albert
4ecedbc823 am feb3ecaf: Merge "Fix name for NDK protobuf libraries."
* commit 'feb3ecaff02d2bddb82aae0fa3024d9b9a62169e':
  Fix name for NDK protobuf libraries.
2015-09-09 18:19:11 +00:00
Dan Willemsen
f1c09d7fbd Merge "Add HOST_CROSS_OS" 2015-09-09 18:13:21 +00:00
Dan Willemsen
057aaea54a Add HOST_CROSS_OS
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.

Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
2015-09-09 18:12:29 +00:00
Dan Albert
a187fb5986 Fix name for NDK protobuf libraries.
Name them *-ndk so it's clear which library is which.

Change-Id: I53544a8a97488f902e00d1aedaa021d09ee2f649
2015-09-08 10:47:03 -07:00
Dan Willemsen
d174629951 am 57ff23b0: Merge "Add support for LOCAL_SRC_FILES_(host)_(arch)"
* commit '57ff23b0ed02affce494d14d8a0f5e9e4717baf7':
  Add support for LOCAL_SRC_FILES_(host)_(arch)
2015-08-28 03:49:02 +00:00
Dan Willemsen
399c59f3aa am d5deac8d: Merge "Add _(darwin|linux|windows)"
* commit 'd5deac8db951ec0a1c9edd806ea1758b836f8c46':
  Add _(darwin|linux|windows)
2015-08-28 03:49:01 +00:00
Dan Willemsen
85ac8d2a00 Add support for LOCAL_SRC_FILES_(host)_(arch)
For boringssl, which has architecture specific host assembly files

Bug: 23566667

Change-Id: Ia4602d28e93a1b3d1400cf95417b5e446c5fb84b
2015-08-28 03:38:43 +00:00
Dan Willemsen
7a5498568f Add _(darwin|linux|windows)
So that we can support building both linux and windows binaries at the
same time on a linux host. This replaces the ifeq($(HOST_OS),...) checks
in Android.mk files.

Bug: 23566667

Change-Id: I693e11984e36d55bb6f09fa0d49bc485463e16fb
2015-08-28 03:36:22 +00:00
Christopher Wiley
3f7c5424db am 2b2c9dff: am 4e719eaf: Merge "Change .dbus.xml extension to .dbus-xml"
* commit '2b2c9dff35304c21ebe1e793a16443a882920f75':
  Change .dbus.xml extension to .dbus-xml
2015-08-21 22:24:31 +00:00