Commit graph

28 commits

Author SHA1 Message Date
Ying Wang
57d9060ffd Split [CC|CXX]_WRAPPER from [TARGET|HOST]_[CC|CXX]
- Don't overwrite [TARGET|HOST]_[CC|CXX] with the [CC|CXX]_WRAPPER prefix,
  so that we can disable the wrapper per module.
- Disable ccache on a module when FDO is enabled.

Bug: 22612634
Change-Id: Ibc04a4742d589955066c7eceb43a0da9a2b893bc
(cherry-pick from commit c671a7cf5c)
2015-07-21 14:07:50 -07:00
Elliott Hughes
a3850a976c Remove unused variables from select.mk.
I've no idea what these were meant to be for, but they're unused.

Change-Id: I978568bd83f91eb952c35a3a481bd517312062f0
2014-11-10 20:47:49 -08:00
Dan Albert
ec1b90f81f Stash original values of CC and CXX.
This way we can still access the real compiler as opposed to a wrapped
one.

Change-Id: I17ba30416a3eb8eda056c67faaa8b5957e70caea
2014-10-06 10:43:29 -07:00
Ying Wang
1b0fc43557 Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
This reverts commit a4f84fdfed.
Added "export CCACHE_CPP2 := true" to work around ccache bug with clang.
See:
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html

Change-Id: I2b1fa8fd59c3a113c4028a92a1d16018133c9792
2014-07-29 18:05:27 -07:00
Ying Wang
67ed25f3a6 Reenable ccache.
The previous commit 994c84fb virtually disabled ccache, due to the
deferred evaluation of CC_WRAPPER/CXX_WRAPPER.

Change-Id: Ie0d70a23a55190bd9b24b72edc9158b6976e1d5d
2014-06-06 11:18:04 -07:00
Primiano Tucci
994c84fb40 Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to the compiler.
This is to make it possible to wrap the compiler invocations with
custom wrappers (e.g., distcc/goma) by setting the CC_WRAPPER,
CXX_WRAPPER, JAVAC_WRAPPER variables in the build environment (without
having to know in advance the path to the compiler)

Change-Id: Ide800c24f0c2ebbb1cfb358bd8f99ec8a9d41253
2014-06-02 20:12:57 +01: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
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
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
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
1d274d2686 Load compiler environment for a second arch.
This is the first step to build 32-bit libraries in a 64-bit product.
It will work like this:
1) In the product's BoardConfig.mk, define:
TARGET_2ND_ARCH, TARGET_2ND_ARCH_VARIANT, TARGET_2ND_CPU_VARIANT.
The build system uses those variables to set up an additional compiler
environment for the second arch.

2) When parsing Android.mks, the build system sets up rules to build a
module for both the 1st arch and the 2nd arch, unless it's explicitly
asked to skip so.
Android.mk will be adapted if there is additional rule of generating
source files.
The build system will accept arch-specific LOCAL_ variables, such as
LOCAL_CFLAGS_arm, LOCAL_CFLAGS_armv7-a-neon, LOCAL_CFLAGS_cortex-a15,
LOCAL_CFLAGS_aarch64 etc. Modules use such variables to set up build for
various archs at the same time.

3) Install binary of the 2nd arch by adding "<module_name>:32" to
PRODUCT_PACKAGES. All 2nd-arch libraries linked in by "<module_name>:32"
will be installed automatically.

Bug: 11654773
Change-Id: I2df63cd5463a07bf5358bee2a109f8fb9590fe30

Conflicts:
	core/combo/TARGET_linux-arm.mk
2014-01-24 13:34:26 -08:00
Ying Wang
b2f39181c6 Run ar in Deterministic mode.
Unfortunately no such flag was found for the host ar on Mac OS X.
https://code.google.com/p/android/issues/detail?id=60705

Change-Id: Ic2f75c871f0b5ae3cf20c1255458f7b921054d67
2013-12-02 14:15:23 -08:00
Andrew Boie
1f93043c86 select.mk: Tune ccache options
With these adjustments, cached object files can now be shared across
multiple Android trees on a single workstation:

* Compiler binary modification time no longer causes cache misses,
  as a hash of the compiler binary is taken rather than looking
  at the mtime and size
* Header file modification time no longer causes cache misses,
  the headers are now always hashed
* Macros such as __DATE__ and __TIME__ no longer cause cache misses
* All paths in preprocessed source (due to use of -g) are now relative

These options require ccache 3.1 or later to be used; ccache 2.4 will
ignore these.

Change-Id: I7839637e9dacf7240bd9b7bfaa6406b1db423560
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-08-16 11:11:29 -07:00
Ying Wang
71b5cc1b8e Reference the new prebuilt ccache location.
Change-Id: I4450a8254fe82ed3a670ce653f49381d9c075c8e
2012-01-09 11:52:23 -08:00
David 'Digit' Turner
8c675d2293 am 16e7050c: am e9b1d0ee: am f8f95fc8: Merge "Allow win_sdk build with USE_CCACHE=1"
* commit '16e7050cbaa292c0f36275cdb4c56f357cbfa79a':
  Allow win_sdk build with USE_CCACHE=1
2011-03-15 04:13:24 -07:00
David 'Digit' Turner
55aad08663 Allow win_sdk build with USE_CCACHE=1
This patch allows the Window sdk build (lunch sdk-eng; make win_sdk)
to work properly when USE_CCACHE is defined in the environment.

There is no Windows ccache prebuilt, but since we're cross-compiling
from Linux, detect it and use the linux prebuilt binary instead.

Note: Depends on https://review.source.android.com//#change,21755
      for a complete solution to the problem.

Change-Id: I0b1b59efae86ee7114225258c9ecf9f257913347
2011-03-15 01:01:32 +01:00
Iliyan Malchev
b375e71d30 build: remove prelinker build build system
This patch removes support for prelinking from the build system.  By now, the
prelinker has outlived its usefulness for several reasons.  Firstly, the
speedup that it afforded in the early days of Android is now nullified by the
speed of hardware, as well as by the presence of Zygote.  Secondly, the space
savings that come with prelinking (measued at 17MB on a recent honeycomb
stingray build) are no longer important either.  Thirdly, prelinking reduces
the effectiveness of Address-Space-Layout Randomization.  Finally, since it is
not part of the gcc suite, the prelinker needs to be maintained separately.

The patch deletes apriori, soslim, lsd, isprelinked, and iself from the source
tree.  It also removes the prelink map.

LOCAL_PRELINK_MODULE becomes a no-op.  Individual Android.mk will get cleaned
separately.  Support for prelinking will have to be removed from the recovery
code and from the dynamic loader as well.

Change-Id: I5839c9c25f7772d5183eedfe20ab924f2a7cd411
2011-03-12 14:59:46 -08:00
Ying Wang
3b008f3695 am 83f69eb5: Prepend ccache to CC/CXX if necessary.
Merge commit '83f69eb5f905d47581bed141b7f5103362390339' into gingerbread-plus-aosp

* commit '83f69eb5f905d47581bed141b7f5103362390339':
  Prepend ccache to CC/CXX if necessary.
2010-10-07 13:57:29 -07:00
Ying Wang
83f69eb5f9 Prepend ccache to CC/CXX if necessary.
In case TARGET_CC is assigned with HOST_CC (eg, simulator build),
ccache will be prepended twice before this CL.
Bug: 3069576

Change-Id: I2ee44faea3a2795cf389ad6f80e4066a02b43be9
2010-10-07 10:45:02 -07:00
Bruce Beare
45ac434151 Refactor Stripper. Allow a stripper other than SOSLIM to be specified
Change-Id: I61137f5bb123dc5f610af9928ed3debdf85ba74d
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-09 12:16:46 -07:00
Jean-Baptiste Queru
9b4a81237b Get rid of $(combo_target)
The only OS-ARCH combo that would have benefited from it
is linux-x86, but it explicitly used separate configurations
for the HOST_ and TARGET_ side of things.

This makes is clear which files are related to the HOST_
configuration and which ones are related to the TARGET_
configuration, and expands $(combo_target) to the only
possible/reasonable value that it could have had in every
file.

This also cleans up the simulator, by moving it in a single
place in TARGET_linux_x86 (since the only part that's special
is to use HOST_ settings even when building TARGET_ modules).

Change-Id: I2420eeb8cfe539f5807ec99cb3177ffb9f2476d5
2010-02-23 12:36:56 -08:00
Sriram Raman
5bbd2294e9 For Ying Wang:
Fix "argument list too long" build error bug.
2009-10-07 16:27:38 -07:00
Erik Gilling
c12c518379 enable cortex branch predition errata workaround for armv7-a builds
Signed-off-by: Erik Gilling <konkers@android.com>
2009-07-17 15:58:42 -07:00
Dave Bort
952824843b core: Don't debug native modules when TARGET_BUILD_TYPE==debug
Don't make the simulator default to debug mode.

Remove all global "debug" {C,CPP}FLAGS, which are no longer used.
2009-05-04 18:12:32 -07: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
dcc08f073b Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:49 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00