summaryrefslogtreecommitdiff
path: root/lib/safestack/CMakeLists.txt
AgeCommit message (Collapse)Author
2016-08-26[CMake] Connect Compiler-RT targets to LLVM Runtimes directoryChris Bieneman
This patch builds on LLVM r279776. In this patch I've done some cleanup and abstracted three common steps runtime components have in their CMakeLists files, and added a fourth. The three steps I abstract are: (1) Add a top-level target (i.e asan, msan, ...) (2) Set the target properties for sorting files in IDE generators (3) Make the compiler-rt target depend on the top-level target The new step is to check if a command named "runtime_register_component" is defined, and to call it with the component name. The runtime_register_component command is defined in llvm/runtimes/CMakeLists.txt, and presently just adds the component to a list of sub-components, which later gets used to generate target mappings. With this patch a new workflow for runtimes builds is supported. The new workflow when building runtimes from the LLVM runtimes directory is: > cmake [...] > ninja runtimes-configure > ninja asan The "runtimes-configure" target builds all the dependencies for configuring the runtimes projects, and runs CMake on the runtimes projects. Running the runtimes CMake generates a list of targets to bind into the top-level CMake so subsequent build invocations will have access to some of Compiler-RT's targets through the top-level build. Note: This patch does exclude some top-level targets from compiler-rt libraries because they either don't install files (sanitizer_common), or don't have a cooresponding `check` target (stats). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11[compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron
Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-27[CMake] Unify build rules for sanitizer_common for Apple and non-Apple ↵Alexey Samsonov
platforms. Additionally, link safestack runtime on OS X with nolibc version of sanitizer_common runtime, as we do on Linux. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@246227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25[CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime ↵Chris Bieneman
into a single function Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists. This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: beanz, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D12292 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245970 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-19Fix typo in lib/safestack/CMakeLists.txt that prevents safestack static ↵Kuba Brecka
library from being built on OS X. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245438 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-18[CMake] Backing out part of r245317. Turns out safestack and profile don't ↵Chris Bieneman
work correctly on the iOS simulator and enabling it breaks tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245326 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-18[CMake] Refactoring add_compiler_rt functions for darwin runtimes.Chris Bieneman
Summary: This patch consolidates add_compiler_rt_osx_static_runtime and add_compiler_rt_darwin_dynamic_runtime into a single new function add_compiler_rt_darwin_runtime. Reviewers: filcab, samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12106 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245317 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23[sanitizer] Implement logging to syslog.Evgeniy Stepanov
Previously, Android target had a logic of duplicating all sanitizer output to logcat. This change extends it to all posix platforms via the use of syslog, controlled by log_to_syslog flag. Enabled by default on Android, off everywhere else. A bit of cmake magic is required to allow Printf() to call a libc function. I'm adding a stub implementation to support no-libc builds like dfsan and safestack. This is a second attempt. I believe I've fixed all the issues that prompted the revert: Mac build, and all kinds of non-CMake builds (there are 3 of those). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23Revert r242975.Evgeniy Stepanov
Breaks Mac build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242978 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22[sanitizer] Implement logging to syslog.Evgeniy Stepanov
Previously, Android target had a logic of duplicating all sanitizer output to logcat. This change extends it to all posix platforms via the use of syslog, controlled by log_to_syslog flag. Enabled by default on Android, off everywhere else. A bit of cmake magic is required to allow Printf() to call a libc function. I'm adding a stub implementation to support no-libc builds like dfsan and safestack. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242975 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-15Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239763 91177308-0d34-0410-b5e6-96231b3b80d8