Commit graph

16114 commits

Author SHA1 Message Date
Ying Wang
24e03369cf Add -Wno-unused-command-line-argument to clang cflags to enable ccache.
Previously ccache is disabled when it fails calling clang's preprocessor with
unused arguments (such as '-Wa,--noexecstack') in the command line.

See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html.
(-Qunused-arguments suppresses more than
-Wno-unused-command-line-argument does.)

Change-Id: I6cde307632c8395c053eb28063d7844d93070562
2014-10-20 17:21:16 -07:00
Stephen Hines
ed8206dba4 Merge "Remove unnecessary 10.8-specific build rules" 2014-10-20 18:06:35 +00:00
Dan Albert
28c2d3b985 Merge "Fix breakage for x86_64 static executables." 2014-10-18 01:05:36 +00:00
Stephen Hines
781094fa43 Remove unnecessary 10.8-specific build rules
We no longer need gcc for host builds, since those all run through clang. This
header include, however, triggers errors about SSE intrinsics by replacing
the more relevant include dirs that we should be using.

Change-Id: I26a949f0109de8e6e2d1f09cb8127be927549cc4
2014-10-17 17:36:42 -07:00
Dan Albert
403ab71eba Fix breakage for x86_64 static executables.
Yikes. Don't know how this slipped through code review.

I had actually mentioned a need for cleanup in this part of the build
system earlier, since the amount of duplication between
transform-o-to-* for each arch means we might fix things incorrectly
in one of them (as I've just shown). Similarly, code reviewers are
likely to skim each one after the first if they all look close enough
(which is presumably what happened here).

Change-Id: I9b85914510f0b114485021deb97f42740712aae5
2014-10-17 16:58:38 -07:00
Dan Albert
26707ca8bb Merge "Use libstc++ for the name of bionic's STL." 2014-10-17 17:44:36 +00:00
Dan Albert
93e8cf71fc Use libstc++ for the name of bionic's STL.
It is libstdc++.so, after all, and the naming makes sense for the host
this way (since it also uses libstdc++).

Change-Id: If37ffa015f7967a928ea47a290363d7696c4ce35
2014-10-16 21:18:15 -07:00
Ian Rogers
fc82be6e77 Merge "Add LPAE to dex2oat ISA feature list." 2014-10-17 03:56:42 +00:00
Ying Wang
4e3e9ffbf3 Merge "Fix Java detection on some Linux distributions" 2014-10-16 20:58:37 +00:00
Ian Rogers
6825e3c9db Add LPAE to dex2oat ISA feature list.
Bug: 17993736

Change-Id: Ibdf0df017a582d7d807dff17f0392dbf28475e02
2014-10-16 13:07:05 -07:00
Ian Rogers
07b212ac59 Merge "Move definition of -D__ARM_FEATURE_LPAE=1 cflag to top-level." 2014-10-16 20:02:26 +00:00
Dan Albert
f2bdac77b1 Merge "Never use stlport on the host." 2014-10-16 18:01:45 +00:00
Dan Albert
b49987e2f8 Never use stlport on the host.
LOCAL_CXX_STL := stlport should just use the default STL on the host.

Change-Id: Iede1b2d8884e237a10e000e5835addb768c8f78d
2014-10-16 09:53:51 -07:00
Bernhard Rosenkraenzer
311384fec3 Fix Java detection on some Linux distributions
On some Linux distributions (spotted here on OpenMandriva Lx, but I'm
pretty sure some others do the same thing), "which javac" returns
/usr/bin/javac, which is a symlink to "../../etc/alternatives/javac",
which in turn points at whatever the JDK the user picked as his default.

Given "../../etc/alternatives/javac" is a relative symlink, the next
iteration of LSLINE=$(ls -l "$JAVAC") fails (no ../../etc/alternatives/java
relative to the build directory), causing tools.jar not to be found.

Using realpath and readlink where possible should work in all cases.

Change-Id: Ic60ac84a5b263dc1c1f2960092a7549d1024ed2e
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-10-16 14:08:32 +02:00
Ian Rogers
63e551f0ae Move definition of -D__ARM_FEATURE_LPAE=1 cflag to top-level.
LPAE indicates better instructions can be used when atomicity guarantees are
needed. However, LPAE's presence isn't advertised by clang/GCC. We fake an
ARM feature to advertise its presence on architectures where it is.
Also, add a TODO documenting that cortex-a15 is not the correct CPU variant
for krait.

Change-Id: I02a1248025c32d94eca0bc8a249dc524f1ac9c36
2014-10-15 15:44:16 -07:00
Dan Albert
c131ec09d9 Merge "Link compiler-rt in the correct order." 2014-10-14 23:59:27 +00:00
Dan Albert
e1b17e7ef5 Link compiler-rt in the correct order.
The compiler run-time library should always be the _last_ thing linked
when building static executables. This was being done correctly for
libgcc, but not when using compiler-rt.

Change-Id: I0689dc35f55caad2fe74c0cbb4cbe3008ded349a
2014-10-14 10:45:33 -07:00
Elliott Hughes
165fdf4204 Merge "Remove "-mstackrealign" option from all x86 builds." 2014-10-13 22:35:59 +00:00
Alexander Ivchenko
ae2d47a47f Remove "-mstackrealign" option from all x86 builds.
For ndk docs change, please refer to:
https://android-review.googlesource.com/#/c/110100/

Change-Id: I8428e7a979eb02441066aeeee43ce693d4d0dc8d
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
2014-10-13 19:08:01 +04:00
Ying Wang
f1794738b1 Merge "Introduce per-product per-module dex-preopt config" 2014-10-10 02:13:10 +00:00
Clay Murphy
fb68db0800 Merge "Docs: Making source.android.com headers match those of developer.android.com" 2014-10-09 17:33:27 +00:00
Chih-Hung Hsieh
29373be81d Merge "Add -fPIC as default Clang mips ASFLAGS." 2014-10-09 17:17:08 +00:00
Dan Albert
a01fa4f8a3 Merge "LOCAL_NATIVE_COVERAGE should imply -O0." 2014-10-09 00:56:23 +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
Chih-Hung Hsieh
ce6300a5db Add -fPIC as default Clang mips ASFLAGS.
For mips target, gcc passes -KPIC to assembler by default,
but clang passes -KPIC only if -fPIC or -fpic is given.

BUG: 17895505
Change-Id: I7803adaf8ad7b40c6473872b67f4e0b4c502b38a
2014-10-08 15:41:29 -07:00
Ying Wang
20ebd2ef08 Introduce per-product per-module dex-preopt config
- Added LOCAL_DEX_PREOPT_FLAGS to pass extra flags to dex2oat.
- Added macro add-product-dex-preopt-module-config to specify almost
  arbitrary dex-preopt config/flags to modules in product
  configuration:
  $(call \
  add-product-dex-preopt-module-config,<module_name_list>,<config_or_flags>)
  How <config_or_flags> is interpreted is decided by
  dex_preopt_odex_install.mk and dex2oat. For now if it's "disable" we
  disable dexpreopt for the given modules; otherwise pass it to dex2oat as
  command line flags.
- If there are multiple configs for the same module in the product
  inheritance, the first takes precedence.
- Added PRODUCT_DEX_PREOPT_DEFAULT_FLAGS so you can specify default
  dex2oat flags in product configuration.
- Added PRODUCT_DEX_PREOPT_BOOT_FLAGS to specify flags of building boot.oat.

Bug: 17791867
Change-Id: I1b2955e8e51039e94d1ff43a3265a8d03598632c
2014-10-08 10:11:17 -07:00
Ying Wang
8330c4c5e6 Merge "Apply LOCAL_CXX_STL to also prebuilts." 2014-10-07 21:11:30 +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
Nicolas Geoffray
9bf56c5e91 Merge "Fix typo." 2014-10-07 10:19:17 +00:00
Nicolas Geoffray
4c0c390f30 Fix typo.
Change-Id: I738ad878a2961d118b5a89bf7d434606df2fad92
2014-10-07 11:17:09 +01:00
Nicolas Geoffray
4af753c1d1 Merge "Make which dex2oat version to use configurable." 2014-10-07 09:38:18 +00:00
Nicolas Geoffray
75c08b2118 Make which dex2oat version to use configurable.
Change-Id: Ic13cf6f9dfb117193a5101781945c501d138955c
2014-10-07 08:30:18 +00:00
Dan Albert
642c81ea45 Merge "Stash original values of CC and CXX." 2014-10-06 18:33:59 +00:00
Dan Albert
b6361968f8 Merge "Remove unused my_compiler_dependencies." 2014-10-06 18:33:42 +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
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
Clay Murphy
fbdac37416 Docs: Making source.android.com headers match those of developer.android.com
Bug: 17814801
Change-Id: I128a76b32b0d92118f621062c62d72460313f4d6
2014-10-03 14:58:50 -07:00
Dan Albert
9979ae4370 Merge "Remove HAVE_(GNU|BSD)_QSORT_R from AndroidConfig.h." 2014-10-01 20:35:56 +00:00
Dan Albert
2251ea40ba Remove HAVE_(GNU|BSD)_QSORT_R from AndroidConfig.h.
Change-Id: If2018529a6c067b63e1a59c16c911d63ec2ebbf4
2014-10-01 10:12:25 -07:00
Tim Murray
35dd358cc4 Merge "Update prebuilt RS clcore location." 2014-09-30 22:34:59 +00:00
Tim Murray
00fa757d7d Update prebuilt RS clcore location.
Change-Id: Iebf255d7cc093b74e08b1f1378d9b397fd9dd3b9
2014-09-30 15:08:03 -07:00
Chih-Hung Hsieh
09cdd5000c Merge "Clear all LOCAL_CLANG_*FLAGS*." 2014-09-30 22:05:09 +00:00
Chih-Hung Hsieh
78b6cea65e Clear all LOCAL_CLANG_*FLAGS*.
Although only some of these flags will be used for some
targets or hosts, they must all be cleared to avoid carrying
over from one project to another.

BUG: 17677366
Change-Id: I6d26fa7e5bf2ff11758728810d4874f3759aebe7
2014-09-30 21:50:58 +00:00
Ying Wang
326363b823 Merge "java_alternative_checked_module takes precedence." 2014-09-30 00:18:54 +00:00
Ying Wang
8260562434 java_alternative_checked_module takes precedence.
java_alternative_checked_module takes precedence over
LOCAL_BUILT_MODULE.

Change-Id: I84f0d65dbc05f4686817aa835d003eb0101af146
2014-09-29 17:17:00 -07:00
Ying Wang
8d8560026a Merge "Don't modify LOCAL_CHECKED_MODULE." 2014-09-29 22:39:55 +00:00
Ying Wang
6c1d1cc712 Don't modify LOCAL_CHECKED_MODULE.
Use a temporary variable my_checked_module instead,
so that we don't override the 2nd_arch's checked module with the
1st_arch's in multilib build.
Note that by default we checkbuild 2nd_arch only for host modules,
but not for target modules.
We enable multlib for target modules by default, it would take too
much time to checkbuild for both archs. For 32-bit modules actually we
can checkbuild a 32-bit product.

Change-Id: I0a5ba75699225b7641442673483731a8fd360d61
2014-09-29 21:59:55 +00:00
Brian Carlstrom
00bd658ec9 Merge "Remove obsolete libffi" 2014-09-29 21:31:40 +00:00
Brian Carlstrom
894aaf4039 Remove obsolete libffi
Change-Id: I092e643be8bde9dbf00dd0d3314275e1ac3db409
2014-09-29 13:05:03 -07:00
Nick Kralevich
9d5f5d0e49 Merge "Add domains for goldfish services." 2014-09-28 00:14:49 +00:00