Cleanup Android build and provide better diagnostics

No longer need to set ANDROID if COMPILER_RT_TEST_TARGET_TRIPLE is
arm-linux-androideabi.

No need to set ANDROID_COMMON_FLAGS.  These flags are already in
CMAKE_CXX_FLAGS which are used in try_compile().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210053 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Android build after r210053

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210069 91177308-0d34-0410-b5e6-96231b3b80d8
[sancov] Fix map update logic on Android.

dlopen()/dlclose() are not interceptable on Android,
so we update .sancov.map in module constructor callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210098 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] enable detect_odr_violation=2; https://code.google.com/p/address-sanitizer/wiki/OneDefinitionRuleViolation . This feature has been working quite well so far, found a few bugs and zero false positives. The main problem is that there could be lots of true positives and users will have to disable this checking until the bugs are fixed.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210106 91177308-0d34-0410-b5e6-96231b3b80d8
[sancov] Handle spaces in module name.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210108 91177308-0d34-0410-b5e6-96231b3b80d8
[sancov] Delay opening dump file until the first module constructor.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210109 91177308-0d34-0410-b5e6-96231b3b80d8
Disable unstable test on ARM

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210140 91177308-0d34-0410-b5e6-96231b3b80d8
[sancov] Handle fork.

Reset coverage data on fork().
For memory-mapped mode (coverage_direct=1) this helps avoid loss of data
(before this change two processes would write to the same file simultaneously).
For normal mode, this reduces coverage dump size, because PCs from the parent
process are no longer inherited by the child.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210180 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Make LSan/MSan/TSan honor the "color" flag.

Based on a patch by Stephan Bergmann.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210199 91177308-0d34-0410-b5e6-96231b3b80d8
[dfsan] Fix the declaration of dfsan_add_label.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210202 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Add install rule for Android runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210216 91177308-0d34-0410-b5e6-96231b3b80d8
[Deadlock detector] Fix CMake build rules for shared runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210232 91177308-0d34-0410-b5e6-96231b3b80d8
Remove's uses of sys/timeb.h for Android.

Android is removing sys/timeb.h because it was removed in POSIX 2008.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210235 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Use -pthread instead of -lpthread in tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210255 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix lit tests setup on Android.

Pass cflags in a way that's compatible with standalone compiler-rt build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210256 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Add 'asan' to asan test deps.

This sound like a good idea in general.
Also, without this on Android we get add_lit_testsuite() with empty DEPENDS
list, and it does not work well.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210257 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] asan_device_setup: extend search path

In standalone build asan-rt is stored in yet another path.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210259 91177308-0d34-0410-b5e6-96231b3b80d8
[asancov] Faster coverage in memory-mapped mode.

Use caller pc of __sanitizer_cov_module_init to figure out
when 2 sequential calls are from the same module; skip
.sancov.map file update in this case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210267 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Reduce the stack frame size of ReportDeadlock

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210301 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] initialize fake_stack_ to 0 before we call SetThreadStackAndTls, because that may actually try to use fake_stack_ (still don't know how). Yet another case where we desperately want https://sourceware.org/glibc/wiki/ThreadPropertiesAPI

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210315 91177308-0d34-0410-b5e6-96231b3b80d8