Commit Graph

174 Commits

Author SHA1 Message Date
Evgeniy Stepanov aeefe8c1bb Remove -arm-enable-ehabi from Android build rules. It's enabled by default.
llvm-svn: 200392
2014-01-29 12:36:45 +00:00
Tim Northover 5a8af3e136 Darwin: add x86_64h slice for Haswell.
llvm-svn: 199996
2014-01-24 13:10:55 +00:00
Evgeniy Stepanov 350fe4b1af [asan] Android logging.
This change duplicates all ASan output to system log on Android.

llvm-svn: 199887
2014-01-23 11:34:41 +00:00
Tim Northover bea1cafde8 Macho-embedded: update build script for newer Clang behaviour.
Clang now uses the *-apple-macho triples for embedded targets using MachO. The
environment makes less pretences to be running an actual Mach kernel with all
the support that would imply, so a few changes are needed to the build scripts:
    
+ The Apple way of detecting endianness applies in all cases so drop the
  __MACH__ test.
+ A quick rename since "darwin_embedded" no longer makes any sense. If there's
  no Mach going on, there's certainly no Darwin.
+ Change how we test for support for a platform. The functions we build don't
  need any SDK support (stdio.h, ...) so we don't need to check for it.

llvm-svn: 199731
2014-01-21 12:38:02 +00:00
Evgeniy Stepanov 755fc5c313 [asan] Link runtime library with -lm -Wl,-z,defs to ensure that it declares all its dependencies.
llvm-svn: 199483
2014-01-17 09:38:46 +00:00
Evgeniy Stepanov e259b658e4 [asan] Nuke ASAN_FLEXIBLE_MAPPING_AND_OFFSET.
llvm-svn: 199370
2014-01-16 10:16:19 +00:00
Bob Wilson e38cc76c32 Remove support for armv7f slice. <rdar://problem/12478440>
This was never used for anything so we should just get rid of it.

llvm-svn: 199333
2014-01-15 21:05:20 +00:00
Justin Bogner 65bb804f05 profile: Rudimentary suppport for PGO instrumentation
This is fairly minimal support for instrumentation based PGO. The data
format is inefficient, and the output file name is hardcoded to
pgo-data.

llvm-svn: 198638
2014-01-06 22:27:03 +00:00
Tim Northover 638a424b56 Only build embedded darwin variants if the compiler supports them
We need to filter out architectures that the compiler hasn't been built to
target (most likely the ARM ones) before attemptint to build a version of
libcompiler_rt.

This can result in a completely empty library (e.g. soft-float doesn't have any
x86 variants), in which case we shouldn't even try the build

llvm-svn: 197028
2013-12-11 11:25:53 +00:00
Alexey Samsonov 58e44a3447 Revert r196490 and fix include paths in makefile-based build
llvm-svn: 196492
2013-12-05 10:40:11 +00:00
Duncan P. N. Exon Smith 2f234f4908 Fixing ordering of definition of IOSSIM_SDK_PATH
llvm-svn: 195216
2013-11-20 05:36:52 +00:00
Alexander Potapenko 9ff321d18d [ASan] Don't put asan_iossim_dynamic in the list of configurations to build
if the iOS Simulator SDK is missing on the machine.

llvm-svn: 195125
2013-11-19 13:24:29 +00:00
Tim Northover 3ae5a369d8 Revert premature instructions to build __sync_fetch_*
My commits got a bit twisted when I was working on both embedded support and
__sync stuff on the same branch. Sorry about that.

llvm-svn: 194886
2013-11-15 23:26:29 +00:00
Tim Northover 084647d4c0 Add clang_darwin_embedded platform for embedded projects
This should build a separate set of embedded runtime libraries, supporting the
option product:

    {PIC, static} x { Hard-float, soft-float }

The emphasis is on ARM platforms (Cortex-M4F, Cortex-M3, Cortex-M0) but X86
variants are also built where possible.

rdar://problem/10817205

llvm-svn: 194873
2013-11-15 23:00:42 +00:00
Alexander Potapenko bf50fbfc21 [ASan] Add the configure+make rules for building the ASan runtime for iOS simulator.
llvm-svn: 194813
2013-11-15 13:13:01 +00:00
Alexander Potapenko 0706e5dd36 [ASan] Remove the stale dependency on the Foundation framework from the dynamic ASan runtime.
llvm-svn: 194583
2013-11-13 15:52:39 +00:00
Bob Wilson 64b4abd07b Push back various changes for building Apple's compiler-rt dylib.
These changes had accumulated internally at Apple for no good reason.

llvm-svn: 193944
2013-11-03 07:06:29 +00:00
Evgeniy Stepanov 364f70c728 [asan] Don't require X86 to build Android runtime.
Patch by Greg Fitzgerald.

llvm-svn: 191883
2013-10-03 08:31:14 +00:00
Sergey Matveev e38dd3ff4e [lsan] Follow-up to r189010 - do the same in Makefile build.
llvm-svn: 189011
2013-08-22 13:30:01 +00:00
Bill Wendling 4f20f51090 Add missing ']'.
llvm-svn: 188927
2013-08-21 20:12:27 +00:00
Bob Wilson e7ca6f9359 For Darwin builds, locate tools using xcrun when available.
The make/platform/darwin_bni.mk file already has similar code but we
apparently neglected to add it to the clang_darwin.mk file.

llvm-svn: 188864
2013-08-21 04:42:56 +00:00
Alexey Samsonov 287fca44af [LSan] Add support for building standalone LSan runtime to Make build (compiler-rt part)
llvm-svn: 188804
2013-08-20 14:49:01 +00:00
Peter Collingbourne 5cbab07d02 DataFlowSanitizer; compiler-rt changes.
DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own.  Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

Differential Revision: http://llvm-reviews.chandlerc.com/D967

llvm-svn: 187924
2013-08-07 22:47:26 +00:00
Alexey Samsonov af4806f719 [ASan] Bump min supported Mac OS X version to 10.6 - makefile build
llvm-svn: 186410
2013-07-16 13:16:15 +00:00
Bob Wilson c4b26ad006 Revert "Temporarily disable building the armv7 variants of profile_ios on"
This reverts commit r184816.  With Chandler's change in r184929, this should
no longer be necessary.

llvm-svn: 184961
2013-06-26 16:35:16 +00:00
Chandler Carruth fc9d259c98 Revert the Darwin half of r184805: "Remove the sysroot (or isysroot)
restriction from the GCDAProfile.c"

Bill added a much more effective way of coping with the use of errno and
other system interactions for Darwin for now by disabling it on that
platform. Building against the SDK stuff is more fundamental to the
darwin build process.

llvm-svn: 184929
2013-06-26 10:05:37 +00:00
Chandler Carruth 825abd8649 Temporarily disable building the armv7 variants of profile_ios on
darwin.

After talking with Jim Grosbach pretty extensively, he was OK with me
punting on this to the Apple folks.

We agreed that the correct fix is either to extend the fake SDK headers
in compiler-rt to support the rest of libc needed by GCDAProfiling.c or
to teach the make build to test for the existence of a suitable SDK on
the system prior to building it. Both of these require someone with
access to the SDK which I don't have, and the latter (my preferred
solution) requires understanding the strange compiler-rt make build
system. Punting to Dan Dunbar or one of the others who support this
stuff on ios to write the appropriate fix, and we can let the build bots
proceed in the mean time.

llvm-svn: 184816
2013-06-25 02:15:14 +00:00
Chandler Carruth ffdf342728 Remove the sysroot (or isysroot) restriction from the GCDAProfile.c
runtime in the Makefile build system as well. Sorry for the temporary
fallout, it took me a while to find these bits.

Bill, I'm not at all confident of the change for Darwin and iOS, but as
discussed we're completely blocked on fixing this. Anyways, please
review and let me know if this will work for you guys. If necessary,
I can work with you to rig up an errno.h stub for Darwin, but I expect
that to be... moderately challenging.

llvm-svn: 184805
2013-06-25 00:57:06 +00:00
Sylvestre Ledru 6e0a254ec9 When the compiler is not providing a clean triple, we should fail
the build right from the start. 
For now, it is only done with DEBUGMAKE is provided. That makes
things harder to debug during ports of compiler-rt on other systems.

llvm-svn: 184295
2013-06-19 12:59:56 +00:00
Alexey Samsonov 49eb5700e2 Revert r182465 and add lsan-common library to makefile-based build
llvm-svn: 182470
2013-05-22 13:20:37 +00:00
Nick Kledzik 69e25c45e4 <rdar://problem/13806954> enable __atomic_* functions for Darwin
llvm-svn: 182435
2013-05-21 23:02:04 +00:00
Alexey Samsonov 9711b25d4b [ASan] Nuke build of static ASan runtime on Mac OS
llvm-svn: 182261
2013-05-20 13:38:27 +00:00
Alexey Samsonov 7dcfc46253 [Sanitizer] Build sanitizer runtimes with debug info in Makefile build
llvm-svn: 182260
2013-05-20 13:35:43 +00:00
Sylvestre Ledru 7b4baa91ce Fix a typo in the comment
llvm-svn: 181708
2013-05-13 14:53:09 +00:00
Bob Wilson b1835b7947 Rewrite sw_vers makefile check to avoid error message on Linux.
When building compiler-rt on Linux, the "which sw_vers" check fails and
writes an error message into the build log. Apparently on Solaris "which"
writes the error message to stdout, so that the current test won't even
work properly. As far as I know sw_vers always lives in /usr/bin, so just
check for it there instead of using "which".

llvm-svn: 180792
2013-04-30 17:06:40 +00:00
Evgeniy Stepanov 9562bbaf9a Add -fno-rtti to ASan runtime cflags on Android.
Otherwise we are picking up an extra libstdc++ dependency.

llvm-svn: 180265
2013-04-25 14:58:23 +00:00
Bob Wilson f7405fabf5 Use the new iOS deployment target command-line options.
We now rely on the -mios-simulator-version-min option to identify the iOS
simulator target. I'm not sure if there's anything in compiler-rt where that
matters, but it's the right thing to do regardless.

llvm-svn: 180163
2013-04-23 23:52:10 +00:00
Richard Smith 1ea5b805ce Don't forget to link in the C++-specific parts of the ubsan runtime when using the Makefile build system on Darwin.
llvm-svn: 177684
2013-03-22 00:01:44 +00:00
Richard Smith e86b7b0bb9 Split ubsan runtime into three pieces (compiler-rt 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.

The Darwin ubsan runtime is unchanged.

For more details, see Clang change r177605.

llvm-svn: 177606
2013-03-20 23:49:17 +00:00
Alexey Samsonov d7ab381f53 [Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
llvm-svn: 176940
2013-03-13 09:18:30 +00:00
Nick Kledzik 2b9a65e4c4 update how libcompiler_rt.dylib links under libSystem.dylib on MacOSX
llvm-svn: 176466
2013-03-05 00:16:52 +00:00
Evgeniy Stepanov 57d6f737e6 [sanitizer] Add MSan to Makefile-based build rules.
llvm-svn: 175737
2013-02-21 13:55:54 +00:00
Daniel Dunbar a495930c1d [build/clang_darwin] Fix the case reversal in r173465.
- I got confused by the double negative, the test succends on 10.6, in which
   case we *do* want to perform the filter-out.

llvm-svn: 173977
2013-01-30 21:45:35 +00:00
Daniel Dunbar 562fe1af43 [build/clang_darwin] Don't try to run sw_vers if we don't have it.
- Also, fix the test this is guarding, which was backwards.

llvm-svn: 173465
2013-01-25 18:09:28 +00:00
Alexey Samsonov 3fd1260155 ASan: build runtime flexible mapping and offset in configure+make build as well
llvm-svn: 173016
2013-01-21 09:13:10 +00:00
Evgeniy Stepanov ab111fa511 [asan] Add soname to the dynamic runtime.
llvm-svn: 172055
2013-01-10 10:58:14 +00:00
Nick Kledzik 9fb21e57e5 Automatically create .dSYM for libcompiler_rt.dylib when using Apple's internal build system
llvm-svn: 168625
2012-11-26 22:48:51 +00:00
Alexey Samsonov 77d35747be UBSan: fix support on Darwin in 'make' build system. Patch by Jean-Daniel Dupas.
llvm-svn: 168167
2012-11-16 12:51:23 +00:00
Alexey Samsonov 11aec95f4a [UBSan] Add support for building ubsan runtime library on Linux with 'make'. Compiler-rt part.
llvm-svn: 168038
2012-11-15 12:37:55 +00:00
Richard Smith 6122d0692b Support for building the ubsan runtime when using the autoconf build system on
Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified
somewhat by me.

llvm-svn: 167889
2012-11-13 23:55:06 +00:00