summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [cmake] Add a separate CMake var to control profile runtimeMichal Gorny2017-10-021-1/+1
| | | | | | | | | | | | Make it possible to control building profile runtime separately from other options. Before r313549, the profile runtime building was controlled along with sanitizers. However, since that commit it is built unconditionally which results in multiple builds for people building different runtimes separately. Differential Revision: https://reviews.llvm.org/D38441 llvm-svn: 314646
* [cmake] Make it possible to build and test profile without sanitizersVedant Kumar2017-09-181-0/+2
| | | | | | | | | | | This should fix an issue which arises when running check-compiler-rt on the coverage bot: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1590/ The bot doesn't build the sanitizers, but the check-compiler-rt target always expects the profile runtime to exist. llvm-svn: 313549
* Move libFuzzer to compiler_rt.George Karpenkov2017-08-211-0/+4
| | | | | | | | | Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 llvm-svn: 311407
* Don't build tsan/dd when COMPILER_RT_HAS_TSAN is falseFrancis Ricci2017-06-271-3/+3
| | | | llvm-svn: 306463
* Loop directly over sanitizers to build in cmakeFrancis Ricci2017-06-271-19/+6
| | | | | | | | | | | | Summary: Cleaner than computing the intersection for each possible sanitizer Reviewers: compnerd, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34693 llvm-svn: 306453
* Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is usedFrancis Ricci2017-06-271-1/+0
| | | | | | | | | | | | Summary: This allows check-all to be used when only a subset of the sanitizers are built. Reviewers: beanz, compnerd, rnk, pcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34644 llvm-svn: 306450
* Revert "Only test sanitizers that are built when ↵Francis Ricci2017-06-271-0/+1
| | | | | | | | | | COMPILER_RT_SANITIZERS_TO_BUILD is used" This breaks cfi testing in cases when the cfi runtime isn't built. This reverts commit 1c6a7b07545f0c9ce68e8b226f5397694ce48af7. llvm-svn: 306431
* Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is usedFrancis Ricci2017-06-271-1/+0
| | | | | | | | | | | | Summary: This allows check-all to be used when only a subset of the sanitizers are built. Reviewers: beanz, compnerd Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34644 llvm-svn: 306415
* Revert "[sancov] moving sancov rt to sancov/ directory"Mike Aizatsky2017-01-121-4/+0
| | | | | | | | This reverts commit https://reviews.llvm.org/rL291734 Reason: mac breakage http://lab.llvm.org:8080/green//job/clang-stage1-configure-RA_build/28798/consoleFull#1657087648e9a0fee5-ebcc-4238-a641-c5aa112c323e llvm-svn: 291736
* [sancov] moving sancov rt to sancov/ directoryMike Aizatsky2017-01-121-0/+4
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28541 llvm-svn: 291734
* build: allow building a specific set of sanitizersSaleem Abdulrasool2016-08-191-40/+31
| | | | | | | | | | | Introduce a new CMake option `COMPILER_RT_SANITIZERS_TO_BUILD` which takes either a special token `all` (default) which will preserve the current behaviour or a CMake list of sanitizers to build. It will still perform the normal checks if the sanitizer is requested. It only permits a further means to exclude a particular sanitizer. This gives finer grained control than `COMPILER_RT_BUILD_SANITIZERS` which only gives an all or nothing control. llvm-svn: 279253
* [compiler-rt][XRay] re-submitting r276117, with fixes for build breakage due ↵Dean Michael Berris2016-07-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | to extraneous and missing dependencies and attempts to build on unsupported OSes Summary: This is a fixed-up version of D21612, to address failure identified post-commit. Original commit description: This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting). Fixes include: - Gating XRay build to only Linux x86_64 and with the right dependencies in case it is the only library being built - Including <cstddef> to fix std::size_t issue Reviewers: kcc, rnk, echristo Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D22611 llvm-svn: 276251
* Revert r276117 "[XRay] Basic initialization and flag definition for XRay ↵Hans Wennborg2016-07-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | runtime" and also the follow-up "[xray] Only build xray on Linux for now" Two build errors were reported on the llvm-commits list: [ 88%] Building CXX object lib/xray/CMakeFiles/clang_rt.xray-x86_64.dir/xray_flags.cc.o /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/lib/xray/xray_init.cc:23:10: fatal error: 'llvm/Support/ELF.h' file not found #include "llvm/Support/ELF.h" ^ and In file included from /w/src/llvm.org/projects/compiler-rt/lib/xray/xray_interface.cc:16: /w/src/llvm.org/projects/compiler-rt/lib/xray/xray_interface_internal.h:36:8: error: no type named 'size_t' in namespace 'std' std::size_t Entries; ~~~~~^ llvm-svn: 276186
* [xray] Only build xray on Linux for nowReid Kleckner2016-07-201-3/+3
| | | | | | | | | | | Should fix the Windows buildbots, and maybe some other non-Linux Unix bots too. XRay currently depends on sanitizer_common, so associate it with the "build sanitizers" option and remove the option for separately controlling the XRay build. llvm-svn: 276124
* [compiler-rt] [XRay] Basic initialization and flag definition for XRay runtimeDean Michael Berris2016-07-201-0/+4
| | | | | | | | | | | | | | | Summary: This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting). Depends on D19904 Reviewers: echristo, kcc, rnk Subscribers: rnk, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D21612 llvm-svn: 276117
* [sanitizer] Initial implementation of a Hardened AllocatorKostya Serebryany2016-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: This is an initial implementation of a Hardened Allocator based on Sanitizer Common's CombinedAllocator. It aims at mitigating heap based vulnerabilities by adding several features to the base allocator, while staying relatively fast. The following were implemented: - additional consistency checks on the allocation function parameters and on the heap chunks; - use of checksum protected chunk header, to detect corruption; - randomness to the allocator base; - delayed freelist (quarantine), to mitigate use after free and overall determinism. Additional mitigations are in the works. Reviewers: eugenis, aizatsky, pcc, krasin, vitalybuka, glider, dvyukov, kcc Subscribers: kubabrecka, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D20084 llvm-svn: 271968
* [esan] EfficiencySanitizer base runtime libraryDerek Bruening2016-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds the initial version of a runtime library for the new EfficiencySanitizer ("esan") family of tools. The library includes: + Slowpath code via callouts from the compiler instrumentation for each memory access. + Registration of atexit() to call finalization code. + Runtime option flags controlled by the environment variable ESAN_OPTIONS. The common sanitizer flags are supported such as verbosity and log_path. + An initial simple test. Still TODO: common code for libc interceptors and shadow memory mapping, and tool-specific code for shadow state updating. Reviewers: eugenis, vitalybuka, aizatsky, filcab Subscribers: filcab, vkalintiris, kubabrecka, llvm-commits, zhaoqin, kcc Differential Revision: http://reviews.llvm.org/D19168 llvm-svn: 267060
* Introduce stats and stats_client libraries.Peter Collingbourne2016-01-161-0/+1
| | | | | | | | | This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16176 llvm-svn: 257972
* Cross-DSO control flow integrity (compiler-rt part).Evgeniy Stepanov2015-12-151-2/+4
| | | | | | | | | | | | | | | | | | This is an initial version of the runtime cross-DSO CFI support library. It contains a number of FIXMEs, ex. it does not support the diagnostic mode nor dlopen/dlclose, but it works and can be tested. Diagnostic mode, in particular, would require some refactoring (we'd like to gather all CFI hooks in the UBSan library into one function so that we could easier pass the diagnostic information down to __cfi_check). It will be implemented later. Once the diagnostic mode is in, I plan to create a second test configuration to run all existing tests in both modes. For now, this patch includes only a few new cross-DSO tests. llvm-svn: 255695
* Revert "[CMake] Provide options for toggling on and off various runtime ↵Chris Bieneman2015-12-101-5/+36
| | | | | | | | libraries." This reverts r255170. This change caused a bunch of bot failures and needs to be revised. llvm-svn: 255184
* [CMake] Provide options for toggling on and off various runtime libraries.Chris Bieneman2015-12-091-36/+5
| | | | | | | | | | | | | | | Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 llvm-svn: 255170
* [CFI] Make CFI tests require UBSan (for diagnostic mode).Alexey Samsonov2015-09-291-1/+2
| | | | | | | CFI itself, on the other hand, doesn't require anything, including sanitizer_common. llvm-svn: 248830
* [CMake] Add options to control building sanitizers and builtins.Chris Bieneman2015-09-141-36/+40
| | | | | | There are situations where a user may want to build only the compiler-rt builtins, or only the sanitizer runtimes. This exposes options to do that. Both default to On, so there should be no implicit change in behavior. llvm-svn: 247607
* CFI: Add a default blacklist.Peter Collingbourne2015-07-151-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D11095 llvm-svn: 242287
* Re-apply r241217 with build fixes:Peter Collingbourne2015-07-021-1/+4
| | | | | | | - Disable building of the interceptor library on 64-bit Windows. - Mangle names in /alternatename directive for 32-bit Windows. llvm-svn: 241224
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-151-0/+3
| | | | | | | | | | | | | | | | | | | compiler-rt runtime support library This patch adds runtime support for the Safe Stack protection to compiler-rt (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of compiler-rt. The patch adds basic runtime support for the safe stack to compiler-rt that manages unsafe stack allocation/deallocation for each thread. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6096 llvm-svn: 239763
* [UBSan] Embed UBSan into ASan runtime (compiler-rt part).Alexey Samsonov2015-04-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the way we use ASan and UBSan together. Instead of keeping two separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on a platform, all UBSan sources are just compiled into dummy empty object files. UBSan initialization code (e.g. flag parsing) is directly called from ASan initialization, so we are able to enforce correct initialization order. This mirrors the approach we already use for ASan+LSan. This change doesn't modify the way we use standalone UBSan. Test Plan: regression test suite Reviewers: kubabrecka, zaks.anna, rsmith, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8646 llvm-svn: 233861
* [LSan] Don't explicitly exclude LSan from Windows build - it should just ↵Alexey Samsonov2015-03-251-4/+1
| | | | | | produce dummy object files. NFC. llvm-svn: 233231
* [msan] Remove MSanDR and supporting code.Evgeniy Stepanov2014-11-181-1/+0
| | | | | | | | | | MSanDR is a dynamic instrumentation tool that can instrument the code (prebuilt libraries and such) that could not be instrumented at compile time. This code is unused (to the best of our knowledge) and unmaintained, and starting to bit-rot. llvm-svn: 222232
* Fix build on some architectures caused by r215247.Alexey Samsonov2014-08-111-1/+1
| | | | llvm-svn: 215380
* [CMake] Determine which compiler-rt libraries are supported onAlexey Samsonov2014-08-081-31/+35
| | | | | | | | 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
* Enable building of sanitizers on FreeBSDViktor Kutuzov2014-04-091-4/+4
| | | | llvm-svn: 205919
* tsan: replace deadlock detector custom build script with cmake fileDmitry Vyukov2014-03-031-0/+1
| | | | llvm-svn: 202708
* Revert r201783 until all FreeBSD fixes are submitted.Alexey Samsonov2014-02-261-4/+2
| | | | llvm-svn: 202244
* [FreeBSD] Enable building a few runtime libraries on FreeBSD.Alexey Samsonov2014-02-201-2/+4
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 201783
* [CMake] Rudimentary support for standalone CompilerRT build system.Alexey Samsonov2014-02-191-1/+1
| | | | | | | | 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
* [CMake] Simplify code for detecting/setting compiler flagsAlexey Samsonov2014-02-181-0/+2
| | | | llvm-svn: 201543
* Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov2014-02-141-10/+0
| | | | llvm-svn: 201399
* Move original compiler-rt functions (libgcc replacement) to lib/builtins ↵Alexey Samsonov2014-02-141-234/+1
| | | | | | directory llvm-svn: 201393
* Sorting ARM Sources alphabeticallyRenato Golin2014-01-311-39/+38
| | | | llvm-svn: 200552
* Enable compilation of RT on ARMRenato Golin2014-01-311-1/+65
| | | | | | | | | | | | 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. llvm-svn: 200546
* [ASan] Build ASan on Windows only if MSVC is usedAlexey Samsonov2013-11-171-1/+2
| | | | llvm-svn: 194963
* CMake: don't build sanitizer runtimes on 64-bit Windows (it's unsupported ↵Alexey Samsonov2013-11-171-9/+17
| | | | | | for now) llvm-svn: 194958
* Don't build unsupported compiler-rt pieces on WindowsAlexey Samsonov2013-11-151-2/+2
| | | | llvm-svn: 194796
* [CMake] Don't build sanitizer runtimes if LLVM_USE_SANITIZER is specifiedAlexey Samsonov2013-09-021-17/+21
| | | | llvm-svn: 189745
* cmake: fix the compiler-rt build with MSVCHans Wennborg2013-08-271-10/+12
| | | | | | | | | 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 llvm-svn: 189304
* DataFlowSanitizer; compiler-rt changes.Peter Collingbourne2013-08-071-0/+1
| | | | | | | | | | | | | 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
* Add cmake rules for building LSan common on Mac OSAlexey Samsonov2013-06-221-1/+1
| | | | llvm-svn: 184639
* [ASan] create common autogenerated config for running compiler-rt unit ↵Alexey Samsonov2013-06-061-4/+10
| | | | | | tests, and use it in ASan llvm-svn: 183401
* [ASan] lit tests: create common autogenerated config for running compiler-rt ↵Alexey Samsonov2013-06-061-0/+4
| | | | | | lit tests, and use it in ASan llvm-svn: 183400
OpenPOWER on IntegriCloud