Commit graph

160 commits

Author SHA1 Message Date
Stephen Hines
7b6af490e9 am 5d17a7e2: am 2e08cb6e: Merge "Add -mfpu=neon-vfpv4 if cpu is krait"
* commit '5d17a7e2adf505fd7a97782f54856c86a237369d':
  Add -mfpu=neon-vfpv4 if cpu is krait
2015-08-15 02:18:58 +00:00
Stephen Hines
2e08cb6e1b Merge "Add -mfpu=neon-vfpv4 if cpu is krait" 2015-08-15 02:04:55 +00:00
Ying Wang
c7b8ee0974 am 66c8e8c7: Don\'t prepend CC_WRAPPER to CLANG.
* commit '66c8e8c756fb1790cac792b32ba2de057c3b1b4e':
  Don't prepend CC_WRAPPER to CLANG.
2015-08-03 21:21:01 +00:00
Ying Wang
3e3d7b5ce5 Don't prepend CC_WRAPPER to CLANG.
We have deferred the CC_WRAPPER prepending to binary.mk per module.

Bug: 22612634
Change-Id: If2c0549503989d17ff7be619fdd49c26fd78f0a5
(cherry-pick from commit 66c8e8c756)
2015-08-03 14:08:54 -07:00
Ying Wang
66c8e8c756 Don't prepend CC_WRAPPER to CLANG.
We have deferred the CC_WRAPPER prepending to binary.mk per module.

Bug: 22612634
Change-Id: If2c0549503989d17ff7be619fdd49c26fd78f0a5
2015-08-03 14:06:58 -07:00
Evgenii Stepanov
436a2fb9e3 am 275e3c8c: am 2d0ec893: Merge "Use a different linker for ASan binaries."
* commit '275e3c8c105e5702b25868f80983c82c668e5664':
  Use a different linker for ASan binaries.
2015-07-15 21:27:42 +00:00
Evgenii Stepanov
8f5e67a98c Use a different linker for ASan binaries.
Another change in bionic/linker adds linker_asan/linker_asan64 that
know where to find ASan shared libraries.
Also, include linker_asan to the required packages list when building
for ASan.

Change-Id: I8ebe7c0091bbeb0c135708a891d33d9844373d37
2015-07-14 11:10:40 -07:00
Pirama Arumuga Nainar
2d5a50e686 Add -mfpu=neon-vfpv4 if cpu is krait
Upstream clang r239152 (http://reviews.llvm.org/D10239) caused a pretty
significant change in behavior.  Passing an FPU feature via -mfpu
disables any feature not supported by those flags (in addition to the
old behavior of enabling features supported by the flags).  For e.g.,
-mfpu=neon used to just pass +neon, +vfp3 as target features to the
backend.  Now, -mfpu=neon also passes -vfp4, -fp16, -fp-armv8.

The backend has always disabled implied feature bits if a feature is
disabled.  Upon seeing the target feature -vfp4, it will disable any
processor/feature that implies vfp4, including the bit that the
processor is a Krait.  Since Krait has both Neon and vfp4, it is safe to
pass '-mfpu=neon-vfpv4'.

Change-Id: Ibbb992e80b8cbc8dc36d5df556885d0912baea22
2015-07-09 12:55:00 -07:00
Ying Wang
91a38d07d0 am 68787b3d: am bbaeaa58: Merge "Configure synci generation explicitly"
* commit '68787b3d1e0b230f3fd812759be03736f73daaf4':
  Configure synci generation explicitly
2015-07-02 06:39:10 +00:00
Ying Wang
bbaeaa5879 Merge "Configure synci generation explicitly" 2015-07-01 18:58:52 +00:00
Evgenii Stepanov
ff57fb45c7 am be8dd615: am 473dfdf7: Merge "Move sanitized vendor libraries to /data/vendor/lib(|64)."
* commit 'be8dd6154b021b78422df44c4a7841899cc24866':
  Move sanitized vendor libraries to /data/vendor/lib(|64).
2015-06-30 22:02:47 +00:00
Evgenii Stepanov
bf140974b2 Move sanitized vendor libraries to /data/vendor/lib(|64).
Sanitized RPATH now mentions /system/vendor/lib to preserve overlay
in the case when a sanitized version of a vendor library can not be
built.

Bug: 22199458
Change-Id: I3222d2e1d6c08fdd1e0404fcb7db347aa4a92bb7
2015-06-30 14:04:45 -07:00
Evgenii Stepanov
a43f213c78 am 5f41fc3d: am eac1f6ed: Merge "With SANITIZE_TARGET, move shared libraries to /data."
* commit '5f41fc3d4d12cd5d1dd195c7369661e5b516c310':
  With SANITIZE_TARGET, move shared libraries to /data.
2015-06-19 21:27:42 +00:00
Dan Albert
6f3527fe60 am cf66a791: am 4fbb83dd: Merge "Add support for LOCAL_SANITIZE := integer."
* commit 'cf66a79130a7382a583f20197f42436a5c1d4095':
  Add support for `LOCAL_SANITIZE := integer`.
2015-06-19 18:16:24 +00:00
Evgenii Stepanov
4d3d4141ae With SANITIZE_TARGET, move shared libraries to /data.
A fully (or even mostly) asan-instrumented device will have 2 copies of each
shared library, which might not fit on system partition. Moving instrumented
libraries to /data.

Bug: 21785137
Change-Id: I64184261da2eb24a1382c67e4931c34a5a38b3c0
2015-06-19 11:15:50 -07:00
Dan Albert
abf4bc916a Add support for LOCAL_SANITIZE := integer.
This also does a bit of cleanup in config_sanitizers.mk. The result is
that `LOCAL_SANITIZE := <any arbitrary ubsan group>` should function
fine for both host and target.

This is a superset of LOCAL_DETECT_INTEGER_OVERFLOWS, so remove that.
This also checks integer division by zero.  It's supposed to cover
shifting undefined behaviors as well, but apparently it does not
(though `LOCAL_SANITIZE := shift` works fine).

Change-Id: I4ac99eafa6920a3f8cb82af37ce56ff0fdb95223
2015-06-19 10:28:06 -07:00
Elliott Hughes
4159f578ef am e6faff17: am 40990c83: Merge "Revert "[MIPS] Do not use compact branches until GDB supports them""
* commit 'e6faff17ffa23245d480da6192a75986e02707d3':
  Revert "[MIPS] Do not use compact branches until GDB supports them"
2015-06-17 17:19:49 +00:00
Nikola Veljkovic
91091280f1 Revert "[MIPS] Do not use compact branches until GDB supports them"
This reverts commit 063ef33089.
2015-06-17 17:22:26 +02:00
Elliott Hughes
9b7356cc6d am a6b14661: am 1a81a0ef: Merge "[MIPS] Do not use compact branches until GDB supports them"
* commit 'a6b14661687d8da6a8f566dd2fb104986b411565':
  [MIPS] Do not use compact branches until GDB supports them
2015-05-29 05:07:20 +00:00
Nikola Veljkovic
063ef33089 [MIPS] Do not use compact branches until GDB supports them
GDB does not yet have support for compact branches, and is unable to
set a breakpoint on them. Turn compact branch generation off, until
GDB is fixed.

Change-Id: Ie7d6fb891e9934f8fc645fe9cf8f706be15a5f77
2015-05-25 16:27:01 +02:00
Ying Wang
d054f1f747 am 7ffd7c20: am df5c798f: Merge "[MIPS] Temporarily disable Mips shared-textrel errors"
* commit '7ffd7c207be55b86416845dbd5ffa8f69518ab68':
  [MIPS] Temporarily disable Mips shared-textrel errors
2015-05-14 16:35:30 +00:00
Duane Sand
3dfd20aea4 [MIPS] Temporarily disable Mips shared-textrel errors
Clang++ for Mips and Mips64 generates read-only exception unwind
tables that trigger DT_TEXTREL warnings at link time.  Until Clang
is fixed, ignore those performance warnings instead of failing the build.

With this patch, Mips clang++ can be (optionally) used when building
libdeqp.

NDK's Mips llvm has been using an alternate temporary fix, marking the
.gcc_exception_table section as read-write for Mips only:
   https://android-review.googlesource.com/#/c/119660/

A permanent fix using a read-only exception table is pending upstream:
   http://reviews.llvm.org/D9669

Change-Id: Ie0cd7da398acbe45dbe39adc251e7fd5b5ca1445
2015-05-13 11:07:20 -07:00
Evgenii Stepanov
6708b6c99c Fix AddressSanitizer link order and multilib setup.
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I937d202077b6e433ba476c075d31be818b662d53
2015-05-12 13:40:29 -07:00
Chih-Hung Hsieh
d88ebe7f14 am 0ba68baf: Upgrade x86 gcc to 4.9 and disable devirtualization.
* commit '0ba68bafa3b465110d10da1a57a1843ff91b2f3a':
  Upgrade x86 gcc to 4.9 and disable devirtualization.
2015-05-06 00:52:22 +00:00
Chih-Hung Hsieh
0ba68bafa3 Upgrade x86 gcc to 4.9 and disable devirtualization.
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.

BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
(cherry picked from AOSP commit 90036610dd)
2015-05-06 00:24:18 +00:00
Chih-Hung Hsieh
90036610dd Upgrade x86 gcc to 4.9 and disable devirtualization.
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.

BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
2015-05-04 14:04:58 -07:00
Chris Dearman
ab3a5f490c Configure synci generation explicitly
The default for synci generation is compiler version dependent

Change-Id: I3f94cabd98c45aaa4e5149e8bb050dc47efa61ca
2015-04-30 13:22:16 -07:00
Evgenii Stepanov
68f8620ccb am 59b0dad7: am 55f3c4c2: Merge "Fix AddressSanitizer link order and multilib setup."
* commit '59b0dad7272118e39be180eef24ffa50c0ffdf17':
  Fix AddressSanitizer link order and multilib setup.
2015-04-27 23:14:37 +00:00
Evgenii Stepanov
f0b15e173b Fix AddressSanitizer link order and multilib setup.
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I5c0cdb89e5e08a1950eb276e406da9f31a6e52dd
2015-04-27 14:48:35 -07:00
Dan Albert
c2bc25496d am 07607526: am 63082eab: am b6874440: Merge "Add support for a partial ubsan build."
* commit '07607526b8701f471869aecbd89fe4ea1990251e':
  Add support for a partial ubsan build.
2015-04-17 20:14:13 +00:00
Dan Albert
b5b2ffe3be Add support for a partial ubsan build.
Some of the ubsan checks expose a few pathological performance cases
in clang, and thus aren't suited to be used in SANITIZE_HOST.

This mode is also supported on the target despite not having the
target runtime libraries for ubsan by generating traps.

Change-Id: I0b0f0a08ca84d72e44e2174a66726b1c5e5cad7e
2015-04-17 11:37:03 -07:00
Dan Albert
97952ce8ac am 3bc25d69: am 683a387e: am 4ed95088: Merge "Add support for ubsan."
* commit '3bc25d69580b5cdedd834fe6accf9cc27c0fb102':
  Add support for ubsan.
2015-04-15 22:56:21 +00:00
Dan Albert
4ed9508842 Merge "Add support for ubsan." 2015-04-15 22:06:15 +00:00
Pirama Arumuga Nainar
30314ea5ff am 1a2fd2eb: am 05130993: am dbecad05: Merge "Use -Wno-format-pedantic to disable overly aggressive format string warning."
* commit '1a2fd2eb1ac5160feb020b65a030c9b2c66d5dfc':
  Use -Wno-format-pedantic to disable overly aggressive format string warning.
2015-04-10 21:58:51 +00:00
Stephen Hines
b992bfcf33 Use -Wno-format-pedantic to disable overly aggressive format string warning.
Bug: 20148343

The latest clang warns on "%p" being used with non-void pointer types, which
would require a great deal of cleanup in several sub-projects.

Change-Id: I4175d5cf8709504455067c906a2eb8ccc8e25432
2015-04-10 09:12:38 -07:00
Dan Albert
08cca28f92 Add support for ubsan.
Rather than adding LOCAL_UB_SANITIZER, LOCAL_THREAD_SANITIZER, etc for
each new sanitizer, deprecate LOCAL_ADDRESS_SANITIZER in favor of
LOCAL_SANITZE that mirrors the behavior of -fsanitize=<sanitizers>.

For example, the following will use both asan and ubsan:

    LOCAL_SANITIZE := address undefined

We'll leave LOCAL_ADDRESS_SANITIZER around for compatibility until we
can clean up the tree.

Change-Id: I8a62315129d4753f8e992584ca6db1e5dfdd4d2a
2015-04-08 15:52:04 -07:00
Elliott Hughes
3101e61f5e resolved conflicts for merge of e04e91b1 to master
Change-Id: I537065b0810ea8525401778824c4810c5e7ef433
2015-04-03 07:43:46 -07:00
Chih-Hung Hsieh
9205bc1da6 Filter out gcc flags that are not recognized by clang.
Change-Id: I04e95fc3b0cb2825bf90a55916f89d25fa9fc475
2015-04-02 14:42:20 -07:00
Dan Albert
57d71306a5 am 8f7338d9: am dc8d7092: am 0064c51e: Merge "Use prebuilt libclang_rt.profile."
* commit '8f7338d9b145379ea9c51b7e551509a2d8f0f24e':
  Use prebuilt libclang_rt.profile.
2015-04-02 18:49:26 +00:00
Dan Albert
343ed674e3 Use prebuilt libclang_rt.profile.
Bug: 17574078
Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
2015-04-01 19:03:22 -07:00
Stephen Hines
55ae50dc1d am 95212b90: am 31f35975: am 9a98c47c: Merge "Don\'t warn on definition of possibly reserved identifiers."
* commit '95212b900b7a9a205d6f8b79dc3fcc07576c18cd':
  Don't warn on definition of possibly reserved identifiers.
2015-04-01 22:09:03 +00:00
Stephen Hines
9a98c47c64 Merge "Don't warn on definition of possibly reserved identifiers." 2015-04-01 18:50:29 +00:00
Chih-hung Hsieh
cdac639599 am 29b415aa: am 1e9b11f4: am d63c78e0: Merge "Allow -mcpu=cortex-a15 for clang"
* commit '29b415aa7781b27fc4948307acc5961cd702dac2':
  Allow -mcpu=cortex-a15 for clang
2015-03-27 23:49:27 +00:00
Stephen Hines
f68002187a Don't warn on definition of possibly reserved identifiers.
Change-Id: Icfcfa94aac0503c97dee0ff4d0cd49107201526d
2015-03-25 17:28:57 -07:00
Bernhard Rosenkränzer
a24a9a8e62 Allow -mcpu=cortex-a15 for clang
Clang 3.6 (including the snapshot present in AOSP) added support for
-mcpu=cortex-a15 -- there's no need to fall back to generic armv7-a
anymore.

Change-Id: I8a582261ac35e32f8f1def1d244cf83f2096520d
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2015-03-25 16:59:46 +01:00
Chih-Hung Hsieh
7e44d7febf Filter out gcc only flags.
They are currently used in some vendor projects.

Change-Id: Iff30966cba3b2941a8921cc35bb3ed1e4fea0bad
2015-03-19 15:17:06 -07:00
Chih-Hung Hsieh
78df832481 Filter out unsupported flag: -fprefetch-loop-arrays
Change-Id: I55ba9045948a910ebd76c09f9f4ebb6b37eed1e7
2015-03-05 16:02:04 -08:00
Chih-Hung Hsieh
73e734bea5 Disable tail call optimization and use -mstackrealign to boot up on fugu.
http://llvm.org/bugs/show_bug.cgi?id=15086,
llvm tail call optimization is wrong for x86.

For Android/x86 to use SSE* instructions safely, stack should be 16-byte
aligned before JNI function call, which isn't true for all x86 device,
so -mstackrealign should be the default.

BUG: 19234330
Change-Id: I4c6676366788772dbe64fd7f0dd33b3ed5c9b80e
2015-03-02 16:50:39 -08:00
Miao Wang
9b2908b4f6 Make bcc-compat able to pick the right mtriple flag for Renderscript
Compat Lib.

Change-Id: Ifb3093ebc392d107e874cee3a67b5f6e942c6e0a
2015-01-12 17:20:28 -08:00
Tim Murray
7c40fb95dc disable Krait for Mac builds to avoid assembler issues
Change-Id: Ie98f4dbc2cef92798ec08b43b93e7e0339a92a92
2014-12-09 14:28:57 -08:00