Commit graph

4300 commits

Author SHA1 Message Date
Chih-Hung Hsieh
c248fa3e01 Raise x86 arch requirement to prescott.
Atomic functions used in external/libcxx/include/atomic when compiled with Clang
will require intrinsic functions exist only for prescott or newer CPUs.

BUG: 17530542
Change-Id: I0c9660ed2ffa75b940981eb8165d88934b39aec5
2014-10-22 15:25:49 -07:00
Chih-Hung Hsieh
57c8a15edd Set default to Clang integrated assembler.
BUG: 17820427
Change-Id: I10a6ddd94aad083665164d7939990e148b3b6efb
2014-10-22 09:21:53 -07:00
Ying Wang
85f24a406b Reset LOCAL_2ND_ARCH_VAR_PREFIX before referencing it.
Change-Id: I9182ce1efe09609100d19c9fae2bc4fe7358dfc0
2014-10-21 18:36:43 -07:00
Ying Wang
18cd02257d Merge "Add -Wno-unused-command-line-argument to clang cflags to enable ccache." 2014-10-21 19:19:16 +00:00
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
Dan Albert
4ffe3f5b9f We also need -rdynamic for host ASAN.
Change-Id: Iee33ca85c25d9bf126be8318a3b837074ab10076
2014-10-20 13:54:27 -07:00
Dan Albert
1f134dd06c Merge "Add support for ASAN in host modules." 2014-10-20 20:24:08 +00:00
Dan Albert
2daceaa83c Add support for ASAN in host modules.
Change-Id: Id9ed83499e0eb995f06e845c3153a50677d768b8
2014-10-20 11:37:18 -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
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
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
Chih-Hung Hsieh
29373be81d Merge "Add -fPIC as default Clang mips ASFLAGS." 2014-10-09 17:17:08 +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
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
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
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
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
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
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
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
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
Dan Albert
683c392e07 Fix detection of C++ STL for tests.
Target tests weren't approrpiately using the libc++ gtest for
libc++_static, and the hosts tests were still using the old check.

Change-Id: I13813d5f09673b144b2dfead93eb81cb4bae0e34
2014-09-26 15:45:33 -07:00
Stephen Hines
670018fdae Merge "Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables." 2014-09-26 17:53:34 +00:00
Stephen Hines
3cf2057079 Merge "Use new variable LLVM_PREBUILTS_VERSION to simplify path construction." 2014-09-26 17:53:22 +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
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
Lai Wei-Chih
8affa161fe Use new variable LLVM_PREBUILTS_VERSION to simplify path construction.
This removes the hard-coded '3.5' in the various paths and makes switching to
a new toolchain easier from the command line (m LLVM_PREBUILTS_VERSION=3.6).

Change-Id: I46b10eb2fc177a03528de9c7b433f8647f632081
2014-09-24 14:59:00 -07:00