summaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTCompile.cmake
AgeCommit message (Collapse)Author
2017-07-28[sanitizer tests CMake] Factor out CMake logic for compiling sanitizer testsGeorge Karpenkov
Currently there's a large amount of CMake logic duplication for compiling sanitizer tests. If we add more sanitizers, the duplication will get even worse. This change factors out common compilation commands into a macro available to all sanitizers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01[CMake] Use LLVM_MAIN_SRC_DIR instead of LLVM_SOURCE_DIR.Alexey Samsonov
The former will be properly initialized in standalone CMake build of compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-11[tsan] Add TSan unit test support for OS XKuba Brecka
This patch enables building and running TSan unit tests on OS X. Differential Revision: http://reviews.llvm.org/D14546 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252731 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-20[CMake] Turns out CMake was passing the space as part of the argument ↵Chris Bieneman
instead of separating two arguments. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245624 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-20[CMake] [OS X] Don't require command line tools installations for running ↵Chris Bieneman
compiler-rt tests. If you're on an Apple platform and /usr/include doesn't exist, we should set a sysroot flag when calling clang. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas
Summary: Use CMake's cmake_parse_arguments() instead. It's called in a slightly different way, but supports all our use cases. It's in CMake 2.8.8, which is our minimum supported version. CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc): http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments Since I was already changing these calls, I changed ARCH and LIB into ARCHS and LIBS to make it more clear that they're lists of arguments. Reviewers: eugenis, samsonov, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10529 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-13Translate some MSVC CMAKE_*_FLAGS to clang flags in clang_compileReid Kleckner
Passing MSVC-style cflags to the gcc-style clang driver will almost always end badly. Just translate a couple of simple flags used by the base CMake cflags like /D, /U, and /O. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06[Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.Alexey Samsonov
Propagate -DSANITIZER_DEBUG definition to unit tests. Make sure unit tests depend on compiler-rt headers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225298 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-25Follow-up for r217523: fix the dependencies for standalone compiler-rt build.Alexander Potapenko
Patch by Kuba Brecka (kuba.brecka@gmail.com) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218444 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10Make compiler-rt tests work with relocatable SDKs on OS XKuba Brecka
Reviewed at http://reviews.llvm.org/D4047 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217523 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-28[ASan/Win] Use clang rather than clang-cl by default for lit tests. Make ↵Timur Iskhodzhanov
Windows-only tests explicitly use clang-cl. Reviewed at http://reviews.llvm.org/D3893 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209719 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12[ASan tests] Use clang-cl to build tests on WindowsTimur Iskhodzhanov
Reviewed at http://reviews.llvm.org/D3680 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208526 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-24[CMake] Respect CMAKE_CXX_FLAGS in custom clang_compile commandsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204593 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Append -D__func__=__FUNCTION__ to SANITIZER_COMMON_CFLAGSReid Kleckner
This way it gets picked up for all sanitizer libs, both sanitizer_common and asan. I believe those are the only libs that build with asan. There should be no need to set the __func__ definition inside clang_compile. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Emulate C99/C++11 __func__ for Visual C++.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202296 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Use host compiler to build unittests in standalone modeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201672 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