Commit Graph

301 Commits

Author SHA1 Message Date
Alexey Samsonov 6239ebc1c2 [Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.
Propagate -DSANITIZER_DEBUG definition to unit tests.
Make sure unit tests depend on compiler-rt headers.

llvm-svn: 225298
2015-01-06 20:58:40 +00:00
Rafael Espindola 0dfd240068 Avoid building compiler-rt with LTO.
During a LTO we still need to build a compiler_rt with regular object files
in the .a.

llvm-svn: 225049
2014-12-31 18:20:52 +00:00
Renato Golin 518a7b2585 Fix obvious cut&paste error on AArch64 Compiler-RT settings
llvm-svn: 224472
2014-12-17 23:43:39 +00:00
Alexey Samsonov 969902b43b [ASan] Always build shared ASan runtime on Linux.
This commit changes the strategy for building shared ASan runtime
and the way we test it:
  - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now
    always build shared ASan runtime (it is the default on Android,
    Windows and Mac, and not the default on Linux and FreeBSD).
  - Platforms, which use static runtime by default now have
    "check-asan-dynamic" testsuite. This testsuite contains instrumented
    unit tests, and ASan lit tests, and runs them with shared ASan
    runtime. This testsuite is *not* a part of "check-asan" and
    *not* a part of "check-all", as adding 1000 more test cases, which
    duplicate existing ones is costly. However, you're welcome to
    add this command to your buildbot.

llvm-svn: 224470
2014-12-17 23:14:01 +00:00
Renato Golin 398e9ccf8b Fixes wrong -march=aarch64 option in compiler-rt
llvm-svn: 224362
2014-12-16 20:31:37 +00:00
Kumar Sukhani 79c79e3e8a [UBSan][MIPS] Adding support for MIPS64
No MIPS64 architecture dependant code

reviewed by : samsonov
submitted by: sagar

llvm-svn: 224239
2014-12-15 09:20:06 +00:00
Peter Collingbourne fd860bc41a [DFSAN][MIPS] adding support of DFSAN for MIPS64
Minor changes to enable DFSAN on MIPS64

Patch by Kumar Sukhani!

Differential Revision: http://reviews.llvm.org/D6437

llvm-svn: 223517
2014-12-05 21:22:36 +00:00
Hans Wennborg 217cf22cf6 CMake: build DLLs in the right directory and include them in the 'install' target (PR21719)
When CMake builds a dynamic library on Windows, the .dll file's location is
determined by the RUNTIME_OUTPUT_DIRECTORY, which we were previously not
setting.

This means for example that clang_rt.asan_dynamic-i386.dll will get built
and installed in the same directory as the corresponding .lib file,
instead of being built in the bin/ directory and not installed at all.

Differential Revision: http://reviews.llvm.org/D6508

llvm-svn: 223387
2014-12-04 21:01:49 +00:00
Alexey Samsonov de13018874 [MSan] [MIPS] Adding support for MIPS64 (patch by Mohit Bhakkad).
Reviewed at http://reviews.llvm.org/D5906

llvm-svn: 222388
2014-11-19 21:42:33 +00:00
Alexey Samsonov 829da45631 [CMake] Detect if -Wfoo is supported instead of -Wno-foo, as GCC occasionally silently discards unknown -Wno-foo flags.
llvm-svn: 221925
2014-11-13 21:19:53 +00:00
Jay Foad 8e586617c4 InstrProf: support PowerPC64
Summary:
I don't know anything about profiling but it seems to work out of the
box on PowerPC64. At least "make check-profile" works.

A few tests needed tweaking because PowerPC64 IR declares main with
"define signext i32 @main" instead of just "define i32 @main".

This also fixes the asan asan_and_llvm_coverage_test test, which
compiles with -coverage so requires that a profiling version of
libclang_rt has been built.

Reviewers: dexonsmith, kcc, samsonov

Reviewed By: samsonov

Subscribers: samsonov, llvm-commits

Differential Revision: http://reviews.llvm.org/D6233

llvm-svn: 221877
2014-11-13 09:24:32 +00:00
Kostya Serebryany 2dd74371b2 [asan] [mips] added support of asan for mips64/mips64el, patch by Kumar Sukhani
llvm-svn: 221800
2014-11-12 18:23:16 +00:00
Will Schmidt 626963187b When run on a ppc64le based platform, the check-sanitizer build looks for
objects with the powerpc64le name. i.e. asan-powerpc64le.a
This change allows those objects to be built.

Differential Revision: http://reviews.llvm.org/D6043

llvm-svn: 221356
2014-11-05 16:35:23 +00:00
Aaron Ballman d98e197386 Reverting r220517; it seems this broke check-asan.
llvm-svn: 220869
2014-10-29 19:25:20 +00:00
Viktor Kutuzov c8f3435f0e [Tsan] Enable thread sanitizer tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D5995

llvm-svn: 220676
2014-10-27 11:28:53 +00:00
Aaron Ballman e927a17022 Cmake variables are global, which is why we would get crud like /machine:X86 in the list of compiler options for MSVC. Clear out the variable before attempting to enumerate arguments and set them.
llvm-svn: 220522
2014-10-23 22:13:52 +00:00
Aaron Ballman 5f1fdd7d90 Do not set linker flags for MSVC; they are not the same thing as compiler flags. Note, this is already done in the add_compiler_rt_test test_suite function.
llvm-svn: 220517
2014-10-23 21:58:36 +00:00
Aaron Ballman 1d1f232041 Disabling some MSVC warnings that are of questionable value. Note, these are disabled by default in LLVM as well, so there is precedence.
C4146: 'unary minus operator applied to unsigned type, result still unsigned'
C4291: ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
C4800: ''type' : forcing value to bool 'true' or 'false' (performance warning)'
llvm-svn: 220507
2014-10-23 20:39:58 +00:00
Kuba Brecka 14c0c5901d [compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, let's rename it to append_list_if
Doing s/append_if/append_list_if/, no functional change.

http://reviews.llvm.org/D5739

llvm-svn: 219860
2014-10-15 22:47:54 +00:00
Alexey Samsonov 76c875579a [CMake] Cleanup CMake rules after r219302. NFC.
llvm-svn: 219825
2014-10-15 18:23:57 +00:00
Alexey Samsonov 6c386e229b [UBSan] [MIPS] Adding support of UBSan for mipsel arch
Summary:
Changed files:
config-ix.cmake: Added mipsel to UBSAN_SUPPORTED_ARCH

Reviewers: rsmith, kcc, dsanders, petarj, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits, mohit.bhakkad, farazs, kumarsukhani

Differential Revision: http://reviews.llvm.org/D5750

llvm-svn: 219822
2014-10-15 18:04:42 +00:00
Petar Jovanovic a1ac4b2f6a [asan][mips] Adding support of asan for mipsel arch
cmake/config-ix.cmake: Enabled building of asan for mipsel arch
test/asan/CMakeLists.txt: Enabled testing of asan for mipsel

Patch by Kumar Sukhani

Differential Revision: http://reviews.llvm.org/D5615

llvm-svn: 219496
2014-10-10 13:46:55 +00:00
Renato Golin 34cb659103 Separating ARM/AArch64 Compiler-RT tests
Makes sure ARM bots don't run AArch64 and vice-versa, since not all
AArch64 systems can run AArch32 and no ARM hardware can run AArch64.

llvm-svn: 219304
2014-10-08 13:47:18 +00:00
Daniel Sanders 09c8f6f6a4 [Compiler-rt][MIPS][Profile] Adding support for MIPS32/64
Summary:
Changed cmake/config-ix.cmake to add support for different MIPS architectures: mips, mipsel, mips64, mips64el
In profile code there is no target  based dependencies, so just enabling mips flag does the work. 

Patch by Mohit Bhakkad

Reviewers: dsanders, void, petarj, kcc, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits, farazs, kumarsukhani

Differential Revision: http://reviews.llvm.org/D4880

llvm-svn: 218866
2014-10-02 12:47:55 +00:00
Evgeniy Stepanov 0f7ab59adc [sanitizer] Add i686 arch to compiler-rt.
This is needed so we can produce -i686- named libraries for
x86 Android (which is i686-linux-android).

An alternative solution would be keeping the "i386" name internally and
tweaking the OUTPUT_NAME of compiler-rt libraries.

llvm-svn: 218761
2014-10-01 12:55:06 +00:00
Evgeniy Stepanov 9e922e7d24 [sanitizer] Android build cleanup.
* Detect Android toolchain target arch and set correct runtime library name.
* Merged a lot of Android and non-Android code paths.
* Android is only supported in standalone build of compiler-rt now.
* Linking lsan-common in ASan-Android (makes lsan annotations work).
* Relying on -fsanitize=address linker flag when building tests (again,
  unification with non-Android path).
* Runtime library moved from lib/asan to lib/linux.

llvm-svn: 218605
2014-09-29 13:18:55 +00:00
Petar Jovanovic c2e0427b94 [UBSan] Adding support of MIPS32
Changed files: 
config-ix.cmake: Enabled UBSan for MIPS32
sanitizer_stacktrace.cc: Program counter for MIPS32 is four byte aligned
and a delay slot so subtracted PC by 8 for getting call site address.
cast-overflow.cpp: Added big endian support for this test case.

Patch by Sagar Thakur.

Differential Revision: http://reviews.llvm.org/D4881

llvm-svn: 218519
2014-09-26 14:16:06 +00:00
Ehsan Akhgari 045423f26d Fix a mistake in r217762
Summary:
The extra macro definition needs to go into COMPILER_RT_GTEST_CFLAGS
in order to be used for gtests on MSVC2012.

Test Plan: This is part of the fixes necessary for the ASAN tests to pass with MSVC2012.

Reviewers: timurrrr

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5493

llvm-svn: 218464
2014-09-25 20:42:49 +00:00
Alexander Potapenko bc4ce3a224 Follow-up for r217523: fix the dependencies for standalone compiler-rt build.
Patch by Kuba Brecka (kuba.brecka@gmail.com)

llvm-svn: 218444
2014-09-25 09:30:05 +00:00
Ehsan Akhgari 47d260962f Port the variadic std::tr1::tuple hack for building gtest for MSVC2012 to ASAN tests.
Summary: This is copied from llvm/utils/unittest/CMakeLists.txt.

Test Plan: This partly enables building ASAN tests with MSVC2012.

Reviewers: timurrrr

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5342

llvm-svn: 217762
2014-09-15 11:33:50 +00:00
Kuba Brecka fa2de77a14 Make compiler-rt tests work with relocatable SDKs on OS X
Reviewed at http://reviews.llvm.org/D4047

llvm-svn: 217523
2014-09-10 17:23:58 +00:00
Timur Iskhodzhanov 47030475a0 [ASan/Win] Disable warning C4391: incorrect return type for intrinsic function
This warning makes it a bit hard to define strlen and wcslen interceptors in an elegant yet portable way

llvm-svn: 216450
2014-08-26 12:33:00 +00:00
Timur Iskhodzhanov f2d24473fe [ASan] Use check_library_exists to determine if libc/libstdc++ are available
llvm-svn: 216264
2014-08-22 12:26:34 +00:00
Alexey Samsonov 6d2022b2e0 Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
when testing for supported architectures, as suggested by Andy Gibbs.

llvm-svn: 216083
2014-08-20 17:12:58 +00:00
Alexey Samsonov 266ba5586d Fix build on some architectures caused by r215247.
llvm-svn: 215380
2014-08-11 19:57:56 +00:00
Alexey Samsonov 68b9e74592 [CMake] Determine which compiler-rt libraries are supported on
a given platform in a top-level CMakeLists.txt to use it both
in lib/ and in test/ subdirectories. Move architecture/platform
checks to config-ix.

llvm-svn: 215247
2014-08-08 22:01:20 +00:00
Timur Iskhodzhanov 1b42b81549 [Sanitizers Win] Move duplicate Windows-specific compiler flags to a common CMake variable
Reviewed at http://reviews.llvm.org/D3952

llvm-svn: 209889
2014-05-30 12:42:57 +00:00
Timur Iskhodzhanov 82ee0433da [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make Windows-only tests explicitly use clang-cl.
Reviewed at http://reviews.llvm.org/D3893

llvm-svn: 209719
2014-05-28 08:38:13 +00:00
Timur Iskhodzhanov 930ffe94aa [Sanitizer tests] Don't need to use -lstdc++ thanks to --driver-mode=g++
Reviewed at http://reviews.llvm.org/D3796

llvm-svn: 209115
2014-05-19 08:19:38 +00:00
Chandler Carruth 332e1b1909 Exclude MSVC to try to unbreak their builds. We have a bad skew between
how CMake drives a windows link and how our custom command does.

llvm-svn: 208903
2014-05-15 16:33:58 +00:00
Chandler Carruth 57e0ec7d20 Teach the compiler-rt custom compilation and linking CMake rules used
for sanitizers to pass the C++ compilation and exe linking flags through
from the host CMake configuration. We pass the target flags afterward,
allowing them to trump flags as needed. This is particularly important
when the flags direct Clang, even the just-built-Clang, toward the
standard library, linker, and other tools to use.

llvm-svn: 208896
2014-05-15 15:21:11 +00:00
Timur Iskhodzhanov 2e9136c2da [Sanitizer/ASan tests] Automatically detect the presence of libstdc++
llvm-svn: 208695
2014-05-13 12:57:50 +00:00
Timur Iskhodzhanov 7d07fe20a0 [ASan tests] Add Windows-specific flags to lib/asan/tests/CMakeLists.txt
Reviewed at http://reviews.llvm.org/D3720

llvm-svn: 208682
2014-05-13 10:33:42 +00:00
Alexey Samsonov 5af5f8f0b5 [CMake] Log output of configure/build/install steps for instrumented libcxx to reduce noise
llvm-svn: 208632
2014-05-12 21:07:28 +00:00
Timur Iskhodzhanov b0279d7f7d [ASan tests] Use clang-cl to build tests on Windows
Reviewed at http://reviews.llvm.org/D3680

llvm-svn: 208526
2014-05-12 08:55:20 +00:00
Alexey Samsonov eacb4d8417 [CMake] Use ExternalProject to build MSan-ified version of libcxx for unit tests.
This change lets MSan rely on libcxx's own build system instead of manually
compiling its sources and setting up all the necessary compile flags. It would
also simplify compiling libcxx with another sanitizers (in particular, TSan).

The tricky part is to make sure libcxx is reconfigured/rebuilt when Clang or
MSan runtime library is changed. "clobber" step used in this patch works well
for me, but it's possible it would break for other configurations - will
watch the buildbots.

llvm-svn: 208451
2014-05-09 22:11:03 +00:00
Alexey Samsonov 56b6ee9833 [ASan] Optional support for dynamic ASan runtime on Linux.
Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov!

llvm-svn: 205308
2014-04-01 13:16:30 +00:00
Alexey Samsonov 78a8435fd6 [CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.
Soon there will be an option to build compiler-rt parts as shared libraries
on Linux. Extracted from http://llvm-reviews.chandlerc.com/D3042
by Yuri Gribov.

llvm-svn: 205183
2014-03-31 13:45:36 +00:00
Alexey Samsonov c41ca6d31a [CMake] Rename the variable
llvm-svn: 204602
2014-03-24 13:29:20 +00:00
Alexey Samsonov 1847401332 [CMake] Respect CMAKE_CXX_FLAGS in custom clang_compile commands
llvm-svn: 204593
2014-03-24 09:42:12 +00:00
Greg Fitzgerald 8288afb5fe fixed check_lint.sh in standalone build
Change-Id: I30d340bbe6b2028cc0f831399b62521912dcac60
llvm-svn: 204419
2014-03-21 00:45:21 +00:00
Alexey Samsonov bcce1979e3 [CMake] Build compiler-rt libraries with -std=c++11
llvm-svn: 204145
2014-03-18 12:49:22 +00:00
Alexey Samsonov fe7e28c41f [CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.
llvm-svn: 203786
2014-03-13 11:31:10 +00:00
Alexey Samsonov 32956d651a [CMake] Make append_if semantics similar to those used in LLVM
llvm-svn: 203773
2014-03-13 09:31:36 +00:00
Alexey Samsonov 4a7e96e642 [CMake] Build compiler-rt libraries with -Wall
llvm-svn: 203113
2014-03-06 12:25:02 +00:00
Alexey Samsonov d964e7cd81 [CMake] Test for libdl and libpthread presence
llvm-svn: 202847
2014-03-04 13:28:21 +00:00
Alexey Samsonov a79696d9bf [CMake] Port add_sanitizer_rt_symbols to CMake 3.0
Patch by Brad King.

Our add_sanitizer_rt_symbols macro reads the LOCATION property of a
library to compute the location of the "lib<name>.a.syms" file to
generate next to the corresponding "lib<name>.a" library file.  CMake
3.0 introduces policy CMP0026 to disallow reading of the LOCATION target
property from non-imported targets in favor of the more powerful
$<TARGET_FILE> generator expression.

Teach add_sanitizer_rt_symbols to use the $<TARGET_FILE> generator
expression to compute the location of the symbols file to generate
with a custom command.  CMake 3.0 also adds support for generator
expressions to install(FILES) so use it when available to simplify
installation of the symbols file of the proper configuration.

llvm-svn: 202797
2014-03-04 08:32:43 +00:00
Alexey Samsonov 72f17afd48 [CMake] Fix add_sanitizer_rt_symbols on multi-config CMake generators.
Patch by Brad King.

When using a multi-config generator with CMake, such as for VS or Xcode,
the LOCATION target property value contains a placeholder such as
"$(Configuration)" that is meant for substitution by the native build
tool. The install(FILES) command does not understand this name and will
not install the symbols file correctly when using these generators.

Teach add_sanitizer_rt_symbols to read the more-specific target property
LOCATION_<CONFIG> that has a per-configuration value and no placeholder.
On single-configuration generators (Makefile, Ninja), CMAKE_BUILD_TYPE
contains the name of the one configuration to be built.  On multi-config
generators (VS, Xcode), CMAKE_CONFIGURATION_TYPES contains the list of
possible configurations.  In the latter case, loop over the configs and
add a configuration-specific install(FILES) rule for each one.

Place the code block inside an if(TRUE) block so it can be made
conditional in a following change without updating indentation.

llvm-svn: 202796
2014-03-04 08:28:43 +00:00
Evgeniy Stepanov 322e89c4e2 [asan] Install asan_device_setup to bin/ when targetting Android.
asan_device_setup is a utility that prepares a device to run code built with
ASan. Essentially, it installs ASan runtime library into the system. For this
reason, it has to be at a predictable relative path from the runtime library
itself. We also plan to distribute this utility, packaged with runtime library
and maybe llvm-symbolizer, to the users.

llvm-svn: 202362
2014-02-27 08:41:40 +00:00
Alexey Samsonov 4cced3e19b [CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary work
llvm-svn: 202356
2014-02-27 07:22:59 +00:00
Alexey Samsonov e3e2a11ad9 Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmake
llvm-svn: 202353
2014-02-27 06:52:41 +00:00
Reid Kleckner 0140ce483f Append -D__func__=__FUNCTION__ to SANITIZER_COMMON_CFLAGS
This way it gets picked up for all sanitizer libs, both sanitizer_common
and asan.  I believe those are the only libs that build with asan.
There should be no need to set the __func__ definition inside
clang_compile.

llvm-svn: 202303
2014-02-26 21:54:39 +00:00
Joerg Sonnenberger 2b41390c89 Emulate C99/C++11 __func__ for Visual C++.
llvm-svn: 202296
2014-02-26 20:31:17 +00:00
Alexey Samsonov a2fee5d907 [CMake] Better support for COMPILER_RT_ENABLE_WERROR. Make sure compiler-rt libraries are build by 'make all' command
llvm-svn: 202023
2014-02-24 11:32:49 +00:00
Alexey Samsonov 150d62aa2a [CMake] Use host compiler to build unittests in standalone mode
llvm-svn: 201672
2014-02-19 13:01:03 +00:00
Alexey Samsonov de4ef2a066 [CMake] Rudimentary support for standalone CompilerRT build system.
This change allows to build compiler-rt libraries separately from
LLVM/Clang (path to LLVM build directory should be specified at
configure time). Running tests is not yet supported.

llvm-svn: 201647
2014-02-19 07:49:16 +00:00
Alexey Samsonov 1181a104e6 [CMake] Rename several variables
llvm-svn: 201575
2014-02-18 14:28:53 +00:00
Alexey Samsonov 63a4af7346 [CMake] Add top-level target for each compiler-rt library, and add 'compiler-rt' target encompassing them all.
llvm-svn: 201556
2014-02-18 09:33:45 +00:00
Alexey Samsonov 878a9a5de2 [CMake] Check for -fPIE and -ffreestanding flags for consistency
llvm-svn: 201549
2014-02-18 08:07:09 +00:00
Alexey Samsonov b73db72a17 [CMake] Simplify setting compile flag disabling RTTI
llvm-svn: 201547
2014-02-18 07:52:40 +00:00
Alexey Samsonov 9a1ffce25a [CMake] Simplify code for detecting/setting compiler flags
llvm-svn: 201543
2014-02-18 07:26:58 +00:00
Chandler Carruth 65fd238772 LLVM's GoogleTest copy has moved its source code back to the default
location, update this reference to reflect that.

llvm-svn: 194802
2013-11-15 10:21:15 +00:00
Alexander Potapenko 49034e3c33 [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib
CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib

The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code.

The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime.

llvm-svn: 194199
2013-11-07 10:08:19 +00:00
Peter Collingbourne cbdea323ac Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.
Differential Revision: http://llvm-reviews.chandlerc.com/D1984

llvm-svn: 193449
2013-10-25 23:03:34 +00:00
Alexey Samsonov 20abdf69ec Add top-level CMake 'compiler-rt' target to build all compiler-rt libraries
llvm-svn: 191747
2013-10-01 12:52:15 +00:00
Alexey Samsonov 036a5bef2d [ASan] Split ASan unit tests into two different binaries:
(1) instrumented, i.e. compiled and linked with -fsanitize=address
(2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically.

llvm-svn: 190788
2013-09-16 15:50:53 +00:00
Alexey Samsonov 5a2f073926 [sanitizer] Refine CMake rules for generating exported symbols and lint checking
llvm-svn: 189577
2013-08-29 10:49:04 +00:00
Will Dietz f967d1f947 sanitizer_common: Use PYTHON_EXECUTABLE to choose appropriate python.
Fixes build on systems where 'python' is not python2.

llvm-svn: 189486
2013-08-28 15:53:17 +00:00
Alexey Samsonov acab30e927 Properly generate lists of exported symbols for sanitizer runtimes
This change adds a Python script that is invoked for
the just-built sanitizer runtime to generate the list of exported symbols
passed to the linker. By default, it contains interceptors and sanitizer
interface functions, but can be extended with tool-specific lists.

llvm-svn: 189356
2013-08-27 15:08:02 +00:00
Alexey Samsonov e838135b6c [ASan] create default (empty) ASan blacklist file in resource directory
llvm-svn: 182380
2013-05-21 13:48:27 +00:00
Richard Smith c91e327cba Build and install .syms files alongside sanitizer runtimes. These are used to
specify which symbols are exported to DSOs when the sanitizer is statically
linked into a binary.

llvm-svn: 177784
2013-03-23 00:31:07 +00:00
Alexey Samsonov 5cb7860129 [CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
llvm-svn: 174699
2013-02-08 07:39:25 +00:00
Alexey Samsonov 7c362fb1b6 CMake: simplify build rules for compiler-rt unit tests. This fixes warnings in Ninja build tree.
llvm-svn: 173677
2013-01-28 09:07:30 +00:00
Alexey Samsonov 5311754b62 [CMake] Fix compiler-rt tests after r173617
llvm-svn: 173668
2013-01-28 07:16:22 +00:00
NAKAMURA Takumi 385bbc1594 AddCompilerRT.cmake: Try to unbreak since r173617.
llvm-svn: 173619
2013-01-27 14:12:25 +00:00
Alexey Samsonov b399118cad CMake: add functions creating universal runtime libraries for several architectures on OS X and use them in ASan and UBSan build rules
llvm-svn: 173011
2013-01-21 08:12:20 +00:00
Alexey Samsonov 4e50333684 CMake: Add add_compiler_rt_osx_object_library to create universal libraries on Mac
llvm-svn: 172979
2013-01-20 14:36:12 +00:00
Alexey Samsonov 8c2cd862b6 CMake: Add add_compiler_rt_static_runtime function and use it to build generic compiler-rt libraries
llvm-svn: 172977
2013-01-20 13:58:10 +00:00
Alexey Samsonov 163ab9d0a5 CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
llvm-svn: 172826
2013-01-18 16:05:21 +00:00
Evgeniy Stepanov f45d92bb22 MemorySanitizer unit tests.
llvm-svn: 171062
2012-12-25 12:39:56 +00:00
Alexey Samsonov 53a965e125 [Sanitizer] Don't implicitly add object files to the list of dependencies when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja.
llvm-svn: 170870
2012-12-21 08:56:14 +00:00
Evgeniy Stepanov e243708d6b [*san] Create unittests output directory, if it does not exist.
llvm-svn: 170696
2012-12-20 14:34:09 +00:00
Alexey Samsonov ca7fcf2354 Significantly change the way we build ASan unittests in CMake
build tree. Now just-built Clang is used to:
  1) compile instrumented sources (as before);
  2) compile non-instrumented sources;
  3) compile our own instrumented version of googletest;
  4) link it all together using -fsanitize=address flag
     (instead of trying to copy linker behavior in
      CMake build rules).

This makes ASan unittests pretty much self-consistent
and independent of other LLVM libraries.

llvm-svn: 170541
2012-12-19 12:33:39 +00:00
Chandler Carruth 6acfaaf3aa Remove the old, and non-functional CMake build system from CompilerRT.
I cannot build any part of this successfully on either Linux or Darwin,
and the replacement is worlds simpler by requiring that this be built as
a subproject of LLVM. If this breaks you for any reason, please let me
know, and let me know what your use case is.

llvm-svn: 154059
2012-04-04 22:12:01 +00:00
Daniel Dunbar debb79b994 Sink {config.h,ConfigureChecks}.cmake into cmake directory.
llvm-svn: 93318
2010-01-13 16:12:49 +00:00
Edward O'Callaghan 1bafa6de57 Fix cmake test suit for compiler-rt.
llvm-svn: 85339
2009-10-27 23:23:41 +00:00
Edward O'Callaghan 49dc8717a4 CMake should only pass GCC options to GCC.
llvm-svn: 82607
2009-09-23 04:57:36 +00:00
Edward O'Callaghan ccf48131d0 Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 compliant. Comment trailing endifs
llvm-svn: 78537
2009-08-09 18:41:02 +00:00
Edward O'Callaghan 032ab6f978 Fix signedness warning in mprotect call, Clean up and improve endianness.h header.
llvm-svn: 78451
2009-08-08 02:31:50 +00:00
Edward O'Callaghan df72046277 Start porting compiler-rt testsuit to Solaris with new build system. Fix some C++ style comments which are not allowed in ISO C90.
llvm-svn: 78143
2009-08-05 01:47:29 +00:00
Edward O'Callaghan 7578f80b0c Fix newlinew warning in floatundidf.c , Bulkout CMake system more, complete port to AuroraUX and Solaris.
llvm-svn: 77958
2009-08-03 05:59:48 +00:00