Commit Graph

27 Commits

Author SHA1 Message Date
Richard Smith cff3cde28b Split ubsan runtime into three pieces (clang part):
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
   sanitizer runtime is present.
 * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
   a C++ ABI library, and is always linked in.
 * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
   C++ ABI library, and is only linked in when linking a C++ binary.

This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).

The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).

The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.

llvm-svn: 177605
2013-03-20 23:49:07 +00:00
Evgeniy Stepanov 54b54e4772 Add MSan to the list of targets in Makefile-based builds.
llvm-svn: 175738
2013-02-21 13:59:14 +00:00
Alexey Samsonov cc42980335 UBSan: enable proper linking with UBsan runtime on Darwin. Turn on building ubsan on OS X in 'make' build system. Patch by Jean-Daniel Dupas.
llvm-svn: 168168
2012-11-16 12:53:14 +00:00
Alexey Samsonov cc9ffd1f8a [UBSan] Add support for building ubsan runtime library on Linux with 'make'. Clang part.
llvm-svn: 168039
2012-11-15 12:40:37 +00:00
Evgeniy Stepanov 04dbc2d022 Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.
This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
  LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.

llvm-svn: 166560
2012-10-24 14:05:29 +00:00
Daniel Dunbar bd847cc562 Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
llvm-svn: 165988
2012-10-15 22:23:53 +00:00
Nico Weber bec2bf1326 Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
See PR14013.

llvm-svn: 165962
2012-10-15 20:37:01 +00:00
Alexey Samsonov be5ae06dec Fixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if just-built clang can build simple 32-bit executables
llvm-svn: 165503
2012-10-09 16:03:52 +00:00
Alexey Samsonov 0bd3665a5c Make sure 32-bit ASan runtime is available on 64-bit Linux platforms
llvm-svn: 165097
2012-10-03 07:23:03 +00:00
Bob Wilson 2afa011e0b Add Clang support for iOS6.
llvm-svn: 164907
2012-09-29 23:52:58 +00:00
Alexander Potapenko 8bea579738 Run install_name_tool to fix the dynamic library ID after it has been copied.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=113

llvm-svn: 164031
2012-09-17 14:18:41 +00:00
Daniel Dunbar 1608097324 compiler-rt/darwin: Install asan_osx_dynamic with the other runtime libraries.
llvm-svn: 163941
2012-09-14 21:30:17 +00:00
Daniel Dunbar 07c43bea93 build/compiler-rt: Companion commit to r159172.
llvm-svn: 159174
2012-06-25 23:02:25 +00:00
Kostya Serebryany 66e8fab1c8 [tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt into the appropriate place at build time
llvm-svn: 156906
2012-05-16 06:36:00 +00:00
Daniel Dunbar e8092cabeb build/compiler-rt: Stop forcing off -integrated-as for compiler-rt builds.
llvm-svn: 152054
2012-03-05 20:19:03 +00:00
Rafael Espindola 1a16f49858 Use -no-integrated-as only on ARM. The X86 and X86-64 integrated as have been
the default for clang for some time now and can handle compiler-rt.

llvm-svn: 151367
2012-02-24 16:22:39 +00:00
Daniel Dunbar ba45b3faf4 runtime/Linux: Include the profile and ASAN libs on x86.
llvm-svn: 146051
2011-12-07 19:35:10 +00:00
Daniel Dunbar a48d32bc9c runtime/Linux: Initial support for tying compiler-rt build into Clang build on
Linux.
 - Currently just builds a full library, and only on x86, and only for the
   target arch.

llvm-svn: 145672
2011-12-02 02:31:32 +00:00
Daniel Dunbar 1d6469fcb1 Driver/Darwin: Add ASAN runtime library link support.
llvm-svn: 145651
2011-12-01 23:40:18 +00:00
Daniel Dunbar 4f41440cf9 clang/Darwin: Use the compiler-rt provided profile library.
llvm-svn: 144869
2011-11-17 00:36:57 +00:00
Daniel Dunbar a8c9886dcc build/make/compiler-rt: Don't attempt to build compiler-rt runtime libraries
when cross compiling under the current organization.
 - See verbose comment for explanation, justification, and how to fix.

llvm-svn: 144860
2011-11-16 23:22:07 +00:00
Bob Wilson 1c99b57b59 Install a copy of the libc++ headers with clang. <rdar://problem/10096516>
llvm-svn: 140876
2011-09-30 20:24:28 +00:00
Eric Christopher c235d0c635 Build and use libcompiler_rt whenever possible.
Patch by Jean-Daniel Dupas!

llvm-svn: 133624
2011-06-22 17:41:40 +00:00
Daniel Dunbar d107638328 Driver/Darwin: Change to use generic iOS runtime library, which we now always need.
llvm-svn: 129734
2011-04-18 23:48:36 +00:00
Nick Lewycky cc647e0937 Reapply r129561, moving the runtime/Makefile that builds compiler-rt into
runtime/compiler-rt/Makefile paving the way to put multiple different libraries
into runtime/ and build all of them.

llvm-svn: 129585
2011-04-15 18:33:24 +00:00
Owen Anderson a236485b1f Revert r129561, which broke one of the clang buildbots.
llvm-svn: 129581
2011-04-15 17:35:58 +00:00
Nick Lewycky 53ba5ee4ce Create a compiler-rt directory and move the Makefile to it. Add a makefile that
builds the subdirs from this directory. This makes the behaviour with make match
what already happens with cmake.

llvm-svn: 129561
2011-04-15 06:57:32 +00:00