[asan] define ASAN_DYNAMIC=1 if PIC is defined

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208530 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Further fix the test from r208333.

Remove a debug print and some copypasta.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208535 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] force tls_model='initial-exec' for tsan's cur_thread_placeholder so that we don't depend on the compiler flags

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208536 91177308-0d34-0410-b5e6-96231b3b80d8
Add FreeBSD support to address sanitizer process mapping facilities

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208537 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] one more attempt to enable lsan by default (PR19521)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208545 91177308-0d34-0410-b5e6-96231b3b80d8
Define CRT_HAS_128BIT even for PPC32

r201909, which introduced CRT_HAS_128BIT, unintentionally broke self-hosting on
PPC32. We used to define CRT_HAS_128BIT only on LP64 systems, but this is not
quite right (at least for Clang-compiled code). Even though __int128 is not
supported on PPC32, SROA can (and does) still form i128 variables at the IR
level, and operations on those variables may turn into the associated runtime
calls. As a result, we still need to compile __ashlti3, __ashrti3, __lshrti3,
and perhaps others, on PPC32.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208560 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Move the "coverage" flag to common flags.

The implementation lives in sanitizer_common and will need to access that flag.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208566 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Use the proper attribute on RunStrChrTest helper functions to avoid "unused function" warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208568 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Also define USED/UNUSED in lib/sanitizer_common/sanitizer_internal_defs.h if Clang is used on Windows

Otherwise we end up with macro redefinition warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208571 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Don't run FakeStack.CreateDestroy on Windows as it OOMs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208572 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Exclude/simplify a bunch of tests to make them build on Windows

(This also requires D3720, D3725 and a few more small changes to land)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208573 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Add references to the issue tracker about malloc/free/new/delete mismatch check on Mac and Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208574 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Don't define __asan_default_options in tests on Windows as it is not supported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208575 91177308-0d34-0410-b5e6-96231b3b80d8
[CompilerRT] use .p2align, .balign instead of .align

The .align statements in ARM assembly routines is actually meant to be a power
of 2 alignment (e.g. .align 2 == 4 byte alignment, not 2).  Switch to using
.p2align.  .p2align is guaranteed to be a power-of-two alignment always and much
more explicit.

The .align in the case of x86_64 is byte alignment, use .balign instead of
.align.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208578 91177308-0d34-0410-b5e6-96231b3b80d8
CompilerRT: .align was supposed to be power-of-aligned in this case

Use .balign instead of .p2align 3.  This should fix the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208585 91177308-0d34-0410-b5e6-96231b3b80d8
__clear_cache: decorate with COMPILER_RT_EXPORT

Use COMPILER_RT_EXPORT rather than COMPILER_RT_ABI for this function.  Adding an
explicit PCS standard to the function causes a mismatch between the
declarations.  Furthermore, the function is implemented in C, and should take
the CC based on the target triple.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208591 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: add missing file

Add (missing) definition of COMPILER_RT_EXPORT which is meant to be used for
decorating functions that are meant to be exported.  This is useful for
platforms where exports and imports must be decorated explicitly (i.e. Windows).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208593 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer tests] Fix a comment that got out of sync with the #if

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208602 91177308-0d34-0410-b5e6-96231b3b80d8
Move .subsections_via_symbols directives into DEFINE_COMPILERRT_PRIVATE_FUNCTION

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208603 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Split static ASan runtime in two parts: asan and asan_cxx.

asan_cxx containts replacements for new/delete operators, and should
only be linked in C++ mode. We plan to start building this part
with exception support to make new more standard-compliant.

See https://code.google.com/p/address-sanitizer/issues/detail?id=295
for more details.


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