summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2014-02-24[CMake] Better support for COMPILER_RT_ENABLE_WERROR. Make sure compiler-rt ↵Alexey Samsonov
libraries are build by 'make all' command git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202023 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24[CMake] Introduce COMPILER_RT_ENABLE_WERROR optionAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202021 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19Add rudimentary support for running compiler-rt lit tests with GCCAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201680 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Use host compiler to run lit tests in standalone modeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201674 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Use host compiler to build unittests in standalone modeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201672 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Introduce COMPILER_RT_INCLUDE_TESTS optionAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201666 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Add the way to run tests in standalone build.Alexey Samsonov
1) Depend on llvm-config (configured in LLVM_CONFIG_PATH) to get necessary LLVM source/binary directories. 2) Add basic support for running lit tests (check-xsan commands). For now this "support" is far from what we want: * unit tests are not built currently. * lit tests use Clang/compiler-rt from LLVM build directory, not the host compiler or just-built compiler-rt libraries. We should make a choice on the way we intend ti run compiler-rt lit testsuite: a) use either Clang from LLVM build tree, or the host compiler. b) use either just-built runtimes, or the runtimes shipped with the host compiler. Using just-built runtimes is tricky - we have to know where to put them, so that Clang/GCC driver would pick them up (and not overwrite the existing runtimes). Using a host compiler instead of Clang from LLVM build tree will give us a chance to run lit tests under GCC (which already has support for several sanitizers). That is, I tend to make the following choice: if we're in a standalone compiler-rt build, use host compiler with its set of runtime libraries to run lit tests. This will effectively decouple "make compiler-rt" and "make check-compiler-rt" in a standalone build - the latter wouldn't invoke the former. Note that if we decide to fix LLVM/Clang/compiler-rt build system so that it would configure/build compiler-rt with just-built Clang (as we do in Makefile-based build), this will not be a problem - we can add a dependency to ensure that clang/compiler-rt are rebuilt before running compiler-rt tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201656 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Rudimentary support for standalone CompilerRT build system.Alexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201647 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Rename several variablesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201575 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Don't build ASan for iossim if -mmacosx-version-min is specifiedAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201566 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Simplify setting compile flag disabling RTTIAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Simplify code for detecting/setting compiler flagsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201543 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move TSan lit-tests under test/tsanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201414 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move ASan lit-tests under test/asanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201413 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move MSan lit-tests under test/msanAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201412 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move LSan test suite under test/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201408 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move DFSan test suite under test/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201403 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move UBSan test suite under test/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201401 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201399 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14[asan] Android test runner for ASan lit tests.Evgeniy Stepanov
This change replaces 32- and 64- bit config.in-s with a single config template that is used to generate both 32 and 64 bits configs as well as the new arm-android config. Arm-android config is special because it can run tests on a remote device over adb (android debug bridge). We replace %clang with a script that run the compiler, upload the result to the device, and replaces it with another script. The second script runs the binary on the device and delivers stdout/stderr/exitcode back. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201394 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flagAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201213 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11Require CMake 2.8.12.1 or later on WindowsHans Wennborg
That version knows to use the /FS flag, which is needed for building lib/interception with VS2013. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201184 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10Add a copy of missing <ucontext.h> for Android and enable ASan SEGV handler.Evgeniy Stepanov
This change adds a copy of <ucontext.h> for Android found in google-breakpad that is missing from the official NDK. ASan SEGV handler is still disabled by default and can be enabled with ASAN_OPTIONS=handle_segv. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201084 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04[CMake] Fixup for r200753Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200761 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04CMake: Enable -Werror for the -fno-function-sections checkJustin Bogner
If the -fno-function-sections flag isn't recognized, the compiler emits a warning. This isn't enough to cause the check to fail, so we enable -Werror as well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200753 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-04[CMake] Check that compiler supports -fno-function-sections flagAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200746 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03[sanitizer] Resubmit r200683: disable -ffunction-sections.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200686 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03Revert r200683.Evgeniy Stepanov
-fno-function-sections is broken in Clang. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200684 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03[sanitizer] Disable -ffunction-sections.Evgeniy Stepanov
It breaks when a binary is linked with --gc-sections: parts of sanitizer interface get thrown away and inaccessible from dlopen-ed libs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200683 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31Remove /FS as it's auto-added by CMake 2.8.12.1; also, remove /wd4221 as ↵Timur Iskhodzhanov
4221 is a linker warning, not a compiler warning git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200564 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31Enable compilation of RT on ARMRenato Golin
Adding the ARM RT sources to the CMake files, and enabling some sanitizers to also build on ARM. This is far from supported or production quality, but enabling it to build will get us errors that we can actually fix. Having said that, the Compiler-RT and the Asan libraries are know to work on some variations of ARM. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30Move /FS to SANITIZER_COMMON_CFLAGSTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200485 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19[ASan] Use -isysroot instead of -Wl,-syslibroot to link the ASan iossim runtimeAlexander Potapenko
(-Wl,-syslibroot was accidentally overridden by -isysroot from Clang on OSX 10.9) -isysroot is a Clang/LLVM-GCC-specific option, but hosting libsanitizer for LLVM with GCC on Darwin shouldn't work anyway, because of the missing blocks support. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195132 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17[DFSan] Don't include public headers in dfsan runtime codeAlexey Samsonov
Summary: Definitions we use in public sanitizer headers may slightly conflict with the ones we use in private sanitizer runtimes. Moreover, we generally forbid to include any system headers (like <stdint.h>) in sanitizer runtime headers. This leads to inevitable duplication of selected interface function declarations, but we decided to live with it. Reviewers: pcc Reviewed By: pcc CC: kcc, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2179 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194955 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-07[ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-25Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1984 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01Add top-level CMake 'compiler-rt' target to build all compiler-rt librariesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29[TSan] Add a couple of compiler warnings to TSan runtime compile flagsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29[sanitizer] Refine CMake rules for generating exported symbols and lint checkingAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189577 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28cmake: Add /Oy- (don't omit frame pointer) to compile flagsHans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189488 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27cmake: fix the compiler-rt build with MSVCHans Wennborg
This sets flags and excludes things that aren't working with MSVC yet, allowing us to build the ASan runtime as part of the cmake build. Differential Revision: http://llvm-reviews.chandlerc.com/D1525 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-16[ASan] Bump min supported Mac OS X version to 10.6Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-30Always set -m32/-m64 flags for targeting i386/x86_64 respectively. ↵Alexey Samsonov
Apparently, there are platforms where the clang defaults are different from gcc git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185287 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07Drop support for 32-bit PowerPC in sanitizer tools.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183499 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06[ASan] lit tests: create common autogenerated config for running compiler-rt ↵Alexey Samsonov
lit tests, and use it in ASan git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-23[sanitizer] Interceptors for gethostbyname and friends.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08[nolibc] Disable the GCC stack protector when building sanitizer runtimes.Peter Collingbourne
This is the first in a sequence of changes designed to eliminate the libc dependency in sanitizer_common. The main motivation for these changes is to be able to provide an alternative for the current interceptor-based technique for instrumenting functions in libc. In this new technique, we compile libc with instrumentation. This has the potential advantages of being more accurate than interception and reducing the amount of custom code required for each libc function. As a side effect of this, we cannot depend on libc in the sanitizer runtime due to mutual dependency issues. This change disables the GCC stack protector, which introduces a libc dependency and is enabled by default in Ubuntu. Differential Revision: http://llvm-reviews.chandlerc.com/D755 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181422 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Explicitly list all sanitizer headers in CMake build rules. Make sure ↵Alexey Samsonov
sanitizer lit_tests depend on fresh headers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-01Change the cmake variable COMPILER_RT_CAN_EXECUTE_TESTS to be an option so ↵Michael Gottesman
that it can overwritten. The reason why this simple change is needed is that I am trying to set up a quick cmake/ninja based buildbot and apple-clang does not support using the sanitizers currently. The default behavior follows exactly what was there before implying that no ones builds should be affected at all. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178455 91177308-0d34-0410-b5e6-96231b3b80d8