summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules/CompilerRTCompile.cmake
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Avoid clang dependencies in the runtimes buildPetr Hosek2019-02-131-1/+1
| | | | | | | Dependencies like clang aren't available in the runtimes build, this was accidentally omitted in D57992. llvm-svn: 353914
* [cmake] Fix skipping DEPS (typo) in sanitizer_test_compile()Michal Gorny2017-10-121-1/+1
| | | | | | | | | | Fix typo in variable assignment inside sanitizer_test_compile() that resulted in TEST_DEPS parameter not being included in the clang_compile() call. Spotted by George Karpenkov in D38444. Differential Revision: https://reviews.llvm.org/D38838 llvm-svn: 315604
* Proper dependency check for clang in compiler_rt.George Karpenkov2017-08-281-1/+1
| | | | | | | | | | - Not having a dependency does not work in standalone build, as Clang does not exist. - if (TARGET clang) check is useless, as it is order-dependent, and Clang may not be registered yet. Differential Revision: https://reviews.llvm.org/D37228 llvm-svn: 311911
* Revert "Add Clang dependency to the check for Clang C++ headers."Adrian Prantl2017-08-251-4/+6
| | | | | | | This temporarily reverts commit r311733, because of bot breakage. http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/38139/consoleFull#-256426522e9a0fee5-ebcc-4238-a641-c5aa112c323e llvm-svn: 311757
* Add Clang dependency to the check for Clang C++ headers.George Karpenkov2017-08-241-6/+4
| | | | | | | | | | | | | | | | | The problem is that CMake is mostly imperative and the result of processing "if (TARGET blah)" checks depends on the order of import of CMake files. In this case, "projects" folder is registered before "tools", and calling "CheckClangHeaders" [renamed to have a better name] errors out without even giving Clang a chance to be built. This, in turn, leads to libFuzzer bot failures in some circumstances on some machines (depends on whether LIT or UNIT tests are scheduled first). Differential Revision: https://reviews.llvm.org/D37126 llvm-svn: 311733
* [CMake compiler-rt] NFC: Minor CMake refactoring.George Karpenkov2017-08-151-2/+6
| | | | | | | | | Detect ObjC files in `clang_compile` and pass an appropriate flag to a compiler, also change `clang_compile` to a function. Differential Revision: https://reviews.llvm.org/D36727 llvm-svn: 310945
* [compiler-rt CMake] NFC: Minor CMake refactoring.George Karpenkov2017-08-151-9/+6
| | | | | | | | | | Change macro to a function, and use a generic variable instead of branching for handling multi-output build with CMAKE_CONFIGURATION_TYPES. Differential Revision: https://reviews.llvm.org/D36725 llvm-svn: 310944
* [sanitizer tests CMake] Factor out CMake logic for compiling sanitizer testsGeorge Karpenkov2017-07-281-0/+35
| | | | | | | | | | | 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. llvm-svn: 309405
* [CMake] Use LLVM_MAIN_SRC_DIR instead of LLVM_SOURCE_DIR.Alexey Samsonov2016-02-011-2/+2
| | | | | | | The former will be properly initialized in standalone CMake build of compiler-rt. llvm-svn: 259407
* [tsan] Add TSan unit test support for OS XKuba Brecka2015-11-111-13/+0
| | | | | | | | This patch enables building and running TSan unit tests on OS X. Differential Revision: http://reviews.llvm.org/D14546 llvm-svn: 252731
* [CMake] Turns out CMake was passing the space as part of the argument ↵Chris Bieneman2015-08-201-1/+1
| | | | | | instead of separating two arguments. llvm-svn: 245624
* [CMake] [OS X] Don't require command line tools installations for running ↵Chris Bieneman2015-08-201-1/+18
| | | | | | | | 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. llvm-svn: 245581
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-191-3/+1
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 240120
* Translate some MSVC CMAKE_*_FLAGS to clang flags in clang_compileReid Kleckner2015-03-131-6/+30
| | | | | | | | 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. llvm-svn: 232219
* [Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.Alexey Samsonov2015-01-061-1/+1
| | | | | | | Propagate -DSANITIZER_DEBUG definition to unit tests. Make sure unit tests depend on compiler-rt headers. llvm-svn: 225298
* Follow-up for r217523: fix the dependencies for standalone compiler-rt build.Alexander Potapenko2014-09-251-1/+3
| | | | | | Patch by Kuba Brecka (kuba.brecka@gmail.com) llvm-svn: 218444
* Make compiler-rt tests work with relocatable SDKs on OS XKuba Brecka2014-09-101-0/+41
| | | | | | Reviewed at http://reviews.llvm.org/D4047 llvm-svn: 217523
* [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make ↵Timur Iskhodzhanov2014-05-281-2/+8
| | | | | | | | Windows-only tests explicitly use clang-cl. Reviewed at http://reviews.llvm.org/D3893 llvm-svn: 209719
* [ASan tests] Use clang-cl to build tests on WindowsTimur Iskhodzhanov2014-05-121-1/+3
| | | | | | Reviewed at http://reviews.llvm.org/D3680 llvm-svn: 208526
* [CMake] Respect CMAKE_CXX_FLAGS in custom clang_compile commandsAlexey Samsonov2014-03-241-1/+11
| | | | llvm-svn: 204593
* Append -D__func__=__FUNCTION__ to SANITIZER_COMMON_CFLAGSReid Kleckner2014-02-261-3/+0
| | | | | | | | | 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. llvm-svn: 202303
* Emulate C99/C++11 __func__ for Visual C++.Joerg Sonnenberger2014-02-261-0/+3
| | | | llvm-svn: 202296
* [CMake] Use host compiler to build unittests in standalone modeAlexey Samsonov2014-02-191-3/+7
| | | | llvm-svn: 201672
* Significantly change the way we build ASan unittests in CMakeAlexey Samsonov2012-12-191-0/+16
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. llvm-svn: 170541
OpenPOWER on IntegriCloud