summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAge
* [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko2013-11-07
| | | | | | | | | | | 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
* Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.Peter Collingbourne2013-10-25
| | | | | | 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
* Add top-level CMake 'compiler-rt' target to build all compiler-rt librariesAlexey Samsonov2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191747 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Add a couple of compiler warnings to TSan runtime compile flagsAlexey Samsonov2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189581 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Refine CMake rules for generating exported symbols and lint checkingAlexey Samsonov2013-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189577 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Add /Oy- (don't omit frame pointer) to compile flagsHans Wennborg2013-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189488 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov2013-08-27
| | | | | | | | | | 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
* cmake: fix the compiler-rt build with MSVCHans Wennborg2013-08-27
| | | | | | | | | 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
* [ASan] Bump min supported Mac OS X version to 10.6Alexey Samsonov2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186404 91177308-0d34-0410-b5e6-96231b3b80d8
* Always set -m32/-m64 flags for targeting i386/x86_64 respectively. ↵Alexey Samsonov2013-06-30
| | | | | | 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
* Drop support for 32-bit PowerPC in sanitizer tools.Alexey Samsonov2013-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183499 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] lit tests: create common autogenerated config for running compiler-rt ↵Alexey Samsonov2013-06-06
| | | | | | 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
* [sanitizer] Interceptors for gethostbyname and friends.Evgeniy Stepanov2013-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182573 91177308-0d34-0410-b5e6-96231b3b80d8
* [nolibc] Disable the GCC stack protector when building sanitizer runtimes.Peter Collingbourne2013-05-08
| | | | | | | | | | | | | | | | | | | 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
* Explicitly list all sanitizer headers in CMake build rules. Make sure ↵Alexey Samsonov2013-04-11
| | | | | | 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
* Change the cmake variable COMPILER_RT_CAN_EXECUTE_TESTS to be an option so ↵Michael Gottesman2013-04-01
| | | | | | | | | | | | | 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
* [Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual ↵Alexey Samsonov2013-03-25
| | | | | | dtors may be a problem for us, as sanitizer runtime should not generally assume libstdc++ presence. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177860 91177308-0d34-0410-b5e6-96231b3b80d8
* Support CMake build of profile runtime library on LinuxAlexey Samsonov2013-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177382 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with ↵Alexey Samsonov2013-02-08
| | | | | | -stdlib=libc++ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174699 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Copy sanitizer headers to the build tree.Evgeniy Stepanov2013-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173794 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: generalize checking for target availability and add initial support ↵Alexey Samsonov2013-01-21
| | | | | | for PowerPC native arch. With this patch, building LLVM on PowerPC native arch produces a working ASan runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173044 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: add functions creating universal runtime libraries for several ↵Alexey Samsonov2013-01-21
| | | | | | architectures on OS X and use them in ASan and UBSan build rules git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173011 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Add add_compiler_rt_static_runtime function and use it to build ↵Alexey Samsonov2013-01-20
| | | | | | generic compiler-rt libraries git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172977 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Generalize build rules for different arches for sanitizer_common, ↵Alexey Samsonov2013-01-18
| | | | | | asan, ubsan git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172829 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: create AddCompilerRT module and implement convenience ↵Alexey Samsonov2013-01-18
| | | | | | add_compiler_rt_object_library function git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: start to generalize rules for non-x86 architecturesAlexey Samsonov2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172816 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake variables renaming: X86_64->x86_64 I386->i386Alexey Samsonov2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172812 91177308-0d34-0410-b5e6-96231b3b80d8
* Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can ↵Alexey Samsonov2012-12-27
| | | | | | produce working binaries and use it in build rules for sanitizers tests git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171160 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Support building both 32- and 64-bit unit tests if we can target both ↵Alexey Samsonov2012-12-19
| | | | | | architectures git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170549 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly change the way we build ASan unittests in CMakeAlexey Samsonov2012-12-19
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170541 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Remove llvm-symbolizer from compiler-rt/utils/Alexander Potapenko2012-11-12
| | | | | | | | This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it with both cmake and configure+make. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167722 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Build all sanitizer runtime libraries with debug info (with ↵Alexey Samsonov2012-11-08
| | | | | | -gline-tables-only, if it's available) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167584 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the ↵Alexey Samsonov2012-09-24
| | | | | | same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164486 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] don't use -Werror as default compile flag for sanitizer runtimes ↵Alexey Samsonov2012-09-13
| | | | | | - people may use too many distinct/old host compilers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163784 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Please Android build. Re-check the availability of ↵Alexey Samsonov2012-09-12
| | | | | | -Wno-variadic-macros flag. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163688 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] first effort to start building ASan runtime with -Werror in ↵Alexey Samsonov2012-09-12
| | | | | | CMake build git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163686 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake build rules for ASan Android runtime and tests.Evgeniy Stepanov2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163613 91177308-0d34-0410-b5e6-96231b3b80d8
* Fox a typo.Evgeniy Stepanov2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163611 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Install support for CMake build of compiler-rtAlexey Samsonov2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163607 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the ↵Alexey Samsonov2012-09-05
| | | | | | rest of flags/defs from old Makefile to CMake git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163204 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Recurse into 'utils' directory in CMake build of compiler-rt, ↵Alexey Samsonov2012-09-04
| | | | | | enable build of llvm-symbolizer binary (currently for one target only) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163138 91177308-0d34-0410-b5e6-96231b3b80d8
* Relocate the external headers provided by ASan and the common sanitizerChandler Carruth2012-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | library. These headers are intended to be available to user code when built with AddressSanitizer (or one of the other sanitizer's in the future) to interface with the runtime library. As such, they form stable external C interfaces, and the headers shouldn't be located within the implementation. I've pulled them out into what seem like fairly obvious locations and names, but I'm wide open to further bikeshedding of these names and locations. I've updated the code and the build system to cope with the new locations, both CMake and Makefile. Please let me know if this breaks anyone's build. The eventual goal is to install these headers along side the Clang builtin headers when we build the ASan runtime and install it. My current thinking is to locate them at: <prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h <prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h <prefix>/lib/clang/X.Y/include/sanitizer/... But maybe others have different suggestions? Fixing the style of the #include between these headers at least unblocks experimentation with installing them as they now should work when installed in these locations. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162822 91177308-0d34-0410-b5e6-96231b3b80d8
* Some flag cleanup for the sanitizer runtimes.Chandler Carruth2012-08-29
| | | | | | | | | | | | This hoists most of the CFLAGS into a common variable. It also adds detection for -Wno-c99-extensions and uses it to silence a pile of warnings. Finally, it switches to the proper flag -rdynamic. With this, the cmake build is warning free on my bootstrap Linux build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162809 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake build rules for ASan/Android runtime.Evgeniy Stepanov2012-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162675 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] CMake support for building ASan runtime as a universal binary on MacAlexey Samsonov2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161665 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] CMake build: if LLVM_BUILD_32_BITS is on, then -m32 is added ↵Alexey Samsonov2012-08-07
| | | | | | to llvm definitions. Let us override this by explicitly adding -m64 compiler flag when building compiler-rt libraries for x86_64 target git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161415 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for building the ASan instrumentation unit tests with theChandler Carruth2012-06-27
| | | | | | | | | | | | | | just-built Clang binary, and linking them against the just-built ASan runtime. This is *very* brittle. I expect it will require tweaking, and I've pro-actively disabled it on non-Unix builds and on cross-builds. It is also currently missing dependency edges on GoogleTest header files and a few other corner cases, but those can be fixed. This is the major milestone of a mini-bootstrap-like build of the unittest. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159255 91177308-0d34-0410-b5e6-96231b3b80d8
* Another big step toward a viable CMake build system for CompilerRT,Chandler Carruth2012-06-25
| | | | | | | | | | | | | | | | | | | | | | | ASan, and friends. This explicitly switches the CompilerRT CMake build to require CMake version 2.8.8 or newer which provides first-class support for "object" libraries which consist of a pile of '.o' files -- exactly what is desired for composing runtime libraries. I've gone ahead and switched to using this. I've also added the interception library which I missed initially. And I've added proper dependencies between the various libraries. With this, I'm able to build archives for asan that appear to contain all of the necessary .o files. The final tweak here is to start setting up the compile flags and macro defines expected by ASan and its helper libraries. These may not be entirely correct currently, they're based loosely on my reading of the old Makefiles. However, they can be tweaked more easily now that they're wired up properly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159129 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the test subdirectory entirely until we get fresh CMake filesChandler Carruth2012-06-22
| | | | | | | there. I didn't notice this because I had a stub that wasn't checked in floating around in my client. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159025 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial, very rough cut at a new CMake build system for compiler-rt.Chandler Carruth2012-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some high-level notes: 1) An explicit goal is to support building compiler-rt as a subproject build, checked out into the projects/compiler-rt directory. There are many other possible ways of building the code here, but this is optimized for development on LLVM/Clang/compiler-rt, and incremental trial and testing of the toolchain. 2) The current support is targeted at Linux. I would love to see this generalized to other platforms, but for the sake of simplicity in testing, I'm focusing here first. Much of this patch was paired with Manuel, and I credit him with the majority of the work here. Some important caveats that I'll be working on in subsequent patches: 1) This uses the host compiler rather than using the just-built-clang. 2) Currently only x86 is supported. 3) Currently, none of the tests are built or run. 4) Uses CMake's builtin globbing which doesn't update correctly. 5) This is still turned off from LLVM's CMake build until these issues are addressed git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154060 91177308-0d34-0410-b5e6-96231b3b80d8