aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
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
2013-03-25[Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual ↵Alexey Samsonov
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
2013-03-19Support CMake build of profile runtime library on LinuxAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with ↵Alexey Samsonov
-stdlib=libc++ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174699 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29[sanitizer] Copy sanitizer headers to the build tree.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173794 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21CMake: generalize checking for target availability and add initial support ↵Alexey Samsonov
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
2013-01-21CMake: add functions creating universal runtime libraries for several ↵Alexey Samsonov
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
2013-01-20CMake: Add add_compiler_rt_static_runtime function and use it to build ↵Alexey Samsonov
generic compiler-rt libraries git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake: Generalize build rules for different arches for sanitizer_common, ↵Alexey Samsonov
asan, ubsan git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake: create AddCompilerRT module and implement convenience ↵Alexey Samsonov
add_compiler_rt_object_library function git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake: start to generalize rules for non-x86 architecturesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172816 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake variables renaming: X86_64->x86_64 I386->i386Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172812 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can ↵Alexey Samsonov
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
2012-12-19[ASan] Support building both 32- and 64-bit unit tests if we can target both ↵Alexey Samsonov
architectures git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170549 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Significantly change the way we build ASan unittests in CMakeAlexey Samsonov
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
2012-11-12[ASan] Remove llvm-symbolizer from compiler-rt/utils/Alexander Potapenko
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
2012-11-08[Sanitizer] Build all sanitizer runtime libraries with debug info (with ↵Alexey Samsonov
-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
2012-09-24[ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the ↵Alexey Samsonov
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
2012-09-13[Sanitizer] don't use -Werror as default compile flag for sanitizer runtimes ↵Alexey Samsonov
- 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
2012-09-12[Sanitizer] Please Android build. Re-check the availability of ↵Alexey Samsonov
-Wno-variadic-macros flag. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163688 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12[Sanitizer] first effort to start building ASan runtime with -Werror in ↵Alexey Samsonov
CMake build git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163686 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11CMake build rules for ASan Android runtime and tests.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11Fox a typo.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163611 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11[compiler-rt] Install support for CMake build of compiler-rtAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163607 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05[ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the ↵Alexey Samsonov
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
2012-09-04[compiler-rt] Recurse into 'utils' directory in CMake build of compiler-rt, ↵Alexey Samsonov
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
2012-08-29Relocate the external headers provided by ASan and the common sanitizerChandler Carruth
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
2012-08-29Some flag cleanup for the sanitizer runtimes.Chandler Carruth
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
2012-08-27CMake build rules for ASan/Android runtime.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162675 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-10[ASan] CMake support for building ASan runtime as a universal binary on MacAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161665 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07[compiler-rt] CMake build: if LLVM_BUILD_32_BITS is on, then -m32 is added ↵Alexey Samsonov
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
2012-06-27Add support for building the ASan instrumentation unit tests with theChandler Carruth
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
2012-06-25Another big step toward a viable CMake build system for CompilerRT,Chandler Carruth
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
2012-06-22Disable the test subdirectory entirely until we get fresh CMake filesChandler Carruth
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
2012-04-04Initial, very rough cut at a new CMake build system for compiler-rt.Chandler Carruth
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
2012-04-04Remove the old, and non-functional CMake build system from CompilerRT.Chandler Carruth
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154059 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13Sink {config.h,ConfigureChecks}.cmake into cmake directory.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31Fix CMakeLists.txt comment.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@85686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27Fix cmake test suit for compiler-rt.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@85339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17Comment out broken tests and make the rest build in cmake build system.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@84330 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23If the compiler does not support GCC-compatibleShantonu Sen
atomic operations, skip building the blocks runtime git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@82627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-221) Remove cmake-specific #define usage from the exportedShantonu Sen
Block.h/Block_private.h headers, since clients won't know what to set. These are moved into runtime.c as appropriate 2) Use cmake checks for CAS builtins, instead of guessing based on GCC #defines (which aren't set by clang and llvm-gcc anyway) 3) "#pragma mark" isn't supported by FSF gcc, so "#if 0" it out. It should still show up in IDEs that support it 4) Fix some compiler warnings. GCC 4.3.3 seems super strict about %p. function pointers can't be cast to void * either. 5) Avoid a warning for apple_versioning.c that "ISO C does not allow empty files" git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@82504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14Update cmake files for arm support hooks.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@81760 91177308-0d34-0410-b5e6-96231b3b80d8