We have deferred the CC_WRAPPER prepending to binary.mk per module.
Bug: 22612634
Change-Id: If2c0549503989d17ff7be619fdd49c26fd78f0a5
(cherry-pick from commit 66c8e8c756)
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
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
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
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
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
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
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
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
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)
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.
BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
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
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
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
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
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>
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