diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-12-19 12:33:39 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-12-19 12:33:39 +0000 |
commit | 02dcc63dde3106c24999040768a5eb52f99fedda (patch) | |
tree | e13d730e565297f827bbe9e4e88dda2c95d16177 /CMakeLists.txt | |
parent | 37a14418e494d3dfb27cd6bddcd9855df2c80ff5 (diff) | |
download | compiler-rt-02dcc63dde3106c24999040768a5eb52f99fedda.tar.gz compiler-rt-02dcc63dde3106c24999040768a5eb52f99fedda.tar.bz2 compiler-rt-02dcc63dde3106c24999040768a5eb52f99fedda.tar.xz |
Significantly change the way we build ASan unittests in CMake
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4544f158..bbf41f77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,14 @@ include(LLVMParseArguments) # runtime libraries. cmake_minimum_required(VERSION 2.8.8) +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" + ) + +set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + # FIXME: Below we assume that the target build of LLVM/Clang is x86, which is # not at all valid. Much of this can be fixed just by switching to use # a just-built-clang binary for the compiles. |