summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime ↵Chris Bieneman2015-08-251-70/+91
| | | | | | | | | | | | | | | | into a single function Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists. This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: beanz, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D12292 llvm-svn: 245970
* [CMake] Fixing haswell filtering.Chris Bieneman2015-08-211-2/+2
| | | | | | Turns out this wasn't working at all. llvm-svn: 245713
* [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] Fix building unit tests on DarwinChris Bieneman2015-08-201-0/+22
| | | | | | | | | | | | | | | | Summary: There are a number of issues with unit tests on Darwin. These patches address the following: * Unit tests should be passed -arch (-m32/-m64 isn't sufficient) * Unit tests should be passed ${DARWIN_osx_CFLAGS} because they're being built for OS X * Test architectures should be filtered based on base system capabilities (i.e. don't try running x86_64h tests on pre-haswell hardware). Reviewers: bogner, filcab, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12174 llvm-svn: 245580
* [cmake darwin] Use a STATUS message type. Explain where the arches came from.Filipe Cabecinhas2015-08-191-1/+1
| | | | llvm-svn: 245453
* [CMake] Refactoring add_compiler_rt functions for darwin runtimes.Chris Bieneman2015-08-181-39/+37
| | | | | | | | | | | | Summary: This patch consolidates add_compiler_rt_osx_static_runtime and add_compiler_rt_darwin_dynamic_runtime into a single new function add_compiler_rt_darwin_runtime. Reviewers: filcab, samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12106 llvm-svn: 245317
* [CMake] Add experimental support for building compiler-rt for iOSChris Bieneman2015-08-133-2/+94
| | | | | | | | | | | | | | | | | Summary: This is a reunification of three separate reviews D11073, D11082, D11083. Having them separate was not constructive even though the patches were smaller because it led to fragmented conversations, and this is really all about one change. This patch incorporates feedback from samsonov, and refactors the hacky darwin code out of the root CMakeLists.txt and int config-ix.cmake. Reviewers: zaks.anna, bogner, kubabrecka, chandlerc, samsonov Subscribers: jevinskie, filcab, llvm-commits Differential Revision: http://reviews.llvm.org/D11820 llvm-svn: 244948
* Fix typo.Filipe Cabecinhas2015-08-101-2/+2
| | | | llvm-svn: 244475
* [CMake] One more attempt to fix PR24144.Alexey Samsonov2015-07-161-2/+1
| | | | | | This time, exclude ExternalProject from build using set_target_properties. llvm-svn: 242444
* [CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan ↵Alexey Samsonov2015-07-161-0/+2
| | | | | | | | | | | | | | | | by default "ninja install" command. Summary: Exclude external libc++ builds from "all" target, so that they are only build on demand, and are not installed together with LLVM/Clang. Reviewers: hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11252 llvm-svn: 242424
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-194-26/+19
| | | | | | | | | | | | | | | | | | | | | 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
* [CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman2015-06-101-32/+39
| | | | | | | | | | | | | | | | | Summary: This change takes darwin-specific goop that was scattered around CMakeLists files and spread between add_compiler_rt_object_library and add_compiler_rt_darwin_object_library and moves it all under add_compiler_rt_object_library. The goal of this is to try to push platform handling as low in the utility functions as possible. Reviewers: rnk, samsonov Reviewed By: rnk, samsonov Subscribers: rnk, rsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D10250 llvm-svn: 239498
* Silence some CMake 3.3 dev warnings in compiler-rtReid Kleckner2015-05-201-1/+1
| | | | | | | | | | | Fix a trivial instance of CMP0054 that came up on llvmdev. The other warnings were CMP0057, which is about using the same file as a MAIN_DEPENDENCY multiple times. The old behavior hasn't been a problem yet, so I silenced the warning and filed PR23595 to document the issue if someone cares. llvm-svn: 237808
* [asan] Use a version script to limit the symbols exported by the ASan shared ↵Evgeniy Stepanov2015-05-051-1/+28
| | | | | | runtime library. llvm-svn: 236551
* Build ASan runtime library with -z global on Android.Evgeniy Stepanov2015-05-051-2/+2
| | | | llvm-svn: 236537
* [ASan] Only include rpc headers if they are available.Yury Gribov2015-04-091-0/+8
| | | | | | Reviewed at http://reviews.llvm.org/D8698 llvm-svn: 234470
* 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
* [ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on WindowsTimur Iskhodzhanov2015-01-221-0/+3
| | | | llvm-svn: 226831
* [Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.Alexey Samsonov2015-01-062-3/+4
| | | | | | | Propagate -DSANITIZER_DEBUG definition to unit tests. Make sure unit tests depend on compiler-rt headers. llvm-svn: 225298
* [ASan] Always build shared ASan runtime on Linux.Alexey Samsonov2014-12-171-2/+7
| | | | | | | | | | | | | | | | | This commit changes the strategy for building shared ASan runtime and the way we test it: - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now always build shared ASan runtime (it is the default on Android, Windows and Mac, and not the default on Linux and FreeBSD). - Platforms, which use static runtime by default now have "check-asan-dynamic" testsuite. This testsuite contains instrumented unit tests, and ASan lit tests, and runs them with shared ASan runtime. This testsuite is *not* a part of "check-asan" and *not* a part of "check-all", as adding 1000 more test cases, which duplicate existing ones is costly. However, you're welcome to add this command to your buildbot. llvm-svn: 224470
* CMake: build DLLs in the right directory and include them in the 'install' ↵Hans Wennborg2014-12-041-2/+4
| | | | | | | | | | | | | | | | target (PR21719) When CMake builds a dynamic library on Windows, the .dll file's location is determined by the RUNTIME_OUTPUT_DIRECTORY, which we were previously not setting. This means for example that clang_rt.asan_dynamic-i386.dll will get built and installed in the same directory as the corresponding .lib file, instead of being built in the bin/ directory and not installed at all. Differential Revision: http://reviews.llvm.org/D6508 llvm-svn: 223387
* Reverting r220517; it seems this broke check-asan.Aaron Ballman2014-10-291-6/+2
| | | | llvm-svn: 220869
* Cmake variables are global, which is why we would get crud like /machine:X86 ↵Aaron Ballman2014-10-231-0/+2
| | | | | | in the list of compiler options for MSVC. Clear out the variable before attempting to enumerate arguments and set them. llvm-svn: 220522
* Do not set linker flags for MSVC; they are not the same thing as compiler ↵Aaron Ballman2014-10-231-2/+6
| | | | | | flags. Note, this is already done in the add_compiler_rt_test test_suite function. llvm-svn: 220517
* [compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, ↵Kuba Brecka2014-10-151-3/+3
| | | | | | | | | | let's rename it to append_list_if Doing s/append_if/append_list_if/, no functional change. http://reviews.llvm.org/D5739 llvm-svn: 219860
* [CMake] Cleanup CMake rules after r219302. NFC.Alexey Samsonov2014-10-151-12/+0
| | | | llvm-svn: 219825
* [sanitizer] Android build cleanup.Evgeniy Stepanov2014-09-291-2/+6
| | | | | | | | | | | | * Detect Android toolchain target arch and set correct runtime library name. * Merged a lot of Android and non-Android code paths. * Android is only supported in standalone build of compiler-rt now. * Linking lsan-common in ASan-Android (makes lsan annotations work). * Relying on -fsanitize=address linker flag when building tests (again, unification with non-Android path). * Runtime library moved from lib/asan to lib/linux. llvm-svn: 218605
* Fix a mistake in r217762Ehsan Akhgari2014-09-251-1/+1
| | | | | | | | | | | | | | | | Summary: The extra macro definition needs to go into COMPILER_RT_GTEST_CFLAGS in order to be used for gtests on MSVC2012. Test Plan: This is part of the fixes necessary for the ASAN tests to pass with MSVC2012. Reviewers: timurrrr Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5493 llvm-svn: 218464
* 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
* Port the variadic std::tr1::tuple hack for building gtest for MSVC2012 to ↵Ehsan Akhgari2014-09-151-0/+6
| | | | | | | | | | | | | | | | ASAN tests. Summary: This is copied from llvm/utils/unittest/CMakeLists.txt. Test Plan: This partly enables building ASAN tests with MSVC2012. Reviewers: timurrrr Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5342 llvm-svn: 217762
* 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
* [Sanitizers Win] Move duplicate Windows-specific compiler flags to a common ↵Timur Iskhodzhanov2014-05-301-0/+12
| | | | | | | | CMake variable Reviewed at http://reviews.llvm.org/D3952 llvm-svn: 209889
* [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make ↵Timur Iskhodzhanov2014-05-282-4/+15
| | | | | | | | Windows-only tests explicitly use clang-cl. Reviewed at http://reviews.llvm.org/D3893 llvm-svn: 209719
* Exclude MSVC to try to unbreak their builds. We have a bad skew betweenChandler Carruth2014-05-151-2/+10
| | | | | | how CMake drives a windows link and how our custom command does. llvm-svn: 208903
* Teach the compiler-rt custom compilation and linking CMake rules usedChandler Carruth2014-05-151-1/+3
| | | | | | | | | | for sanitizers to pass the C++ compilation and exe linking flags through from the host CMake configuration. We pass the target flags afterward, allowing them to trump flags as needed. This is particularly important when the flags direct Clang, even the just-built-Clang, toward the standard library, linker, and other tools to use. llvm-svn: 208896
* [CMake] Log output of configure/build/install steps for instrumented libcxx ↵Alexey Samsonov2014-05-121-0/+3
| | | | | | to reduce noise llvm-svn: 208632
* [ASan tests] Use clang-cl to build tests on WindowsTimur Iskhodzhanov2014-05-122-2/+6
| | | | | | Reviewed at http://reviews.llvm.org/D3680 llvm-svn: 208526
* [CMake] Use ExternalProject to build MSan-ified version of libcxx for unit ↵Alexey Samsonov2014-05-091-0/+46
| | | | | | | | | | | | | | | tests. This change lets MSan rely on libcxx's own build system instead of manually compiling its sources and setting up all the necessary compile flags. It would also simplify compiling libcxx with another sanitizers (in particular, TSan). The tricky part is to make sure libcxx is reconfigured/rebuilt when Clang or MSan runtime library is changed. "clobber" step used in this patch works well for me, but it's possible it would break for other configurations - will watch the buildbots. llvm-svn: 208451
* [ASan] Optional support for dynamic ASan runtime on Linux.Alexey Samsonov2014-04-011-1/+5
| | | | | | Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov! llvm-svn: 205308
* [CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.Alexey Samsonov2014-03-311-11/+15
| | | | | | | | Soon there will be an option to build compiler-rt parts as shared libraries on Linux. Extracted from http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov. llvm-svn: 205183
* [CMake] Rename the variableAlexey Samsonov2014-03-241-1/+1
| | | | llvm-svn: 204602
* [CMake] Respect CMAKE_CXX_FLAGS in custom clang_compile commandsAlexey Samsonov2014-03-241-1/+11
| | | | llvm-svn: 204593
* fixed check_lint.sh in standalone buildGreg Fitzgerald2014-03-211-0/+1
| | | | | Change-Id: I30d340bbe6b2028cc0f831399b62521912dcac60 llvm-svn: 204419
* [CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.Alexey Samsonov2014-03-131-6/+9
| | | | llvm-svn: 203786
* [CMake] Make append_if semantics similar to those used in LLVMAlexey Samsonov2014-03-131-5/+8
| | | | llvm-svn: 203773
* [CMake] Port add_sanitizer_rt_symbols to CMake 3.0Alexey Samsonov2014-03-041-7/+10
| | | | | | | | | | | | | | | | | | | Patch by Brad King. Our add_sanitizer_rt_symbols macro reads the LOCATION property of a library to compute the location of the "lib<name>.a.syms" file to generate next to the corresponding "lib<name>.a" library file. CMake 3.0 introduces policy CMP0026 to disallow reading of the LOCATION target property from non-imported targets in favor of the more powerful $<TARGET_FILE> generator expression. Teach add_sanitizer_rt_symbols to use the $<TARGET_FILE> generator expression to compute the location of the symbols file to generate with a custom command. CMake 3.0 also adds support for generator expressions to install(FILES) so use it when available to simplify installation of the symbols file of the proper configuration. llvm-svn: 202797
* [CMake] Fix add_sanitizer_rt_symbols on multi-config CMake generators.Alexey Samsonov2014-03-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | Patch by Brad King. When using a multi-config generator with CMake, such as for VS or Xcode, the LOCATION target property value contains a placeholder such as "$(Configuration)" that is meant for substitution by the native build tool. The install(FILES) command does not understand this name and will not install the symbols file correctly when using these generators. Teach add_sanitizer_rt_symbols to read the more-specific target property LOCATION_<CONFIG> that has a per-configuration value and no placeholder. On single-configuration generators (Makefile, Ninja), CMAKE_BUILD_TYPE contains the name of the one configuration to be built. On multi-config generators (VS, Xcode), CMAKE_CONFIGURATION_TYPES contains the list of possible configurations. In the latter case, loop over the configs and add a configuration-specific install(FILES) rule for each one. Place the code block inside an if(TRUE) block so it can be made conditional in a following change without updating indentation. llvm-svn: 202796
* [asan] Install asan_device_setup to bin/ when targetting Android.Evgeniy Stepanov2014-02-271-0/+13
| | | | | | | | | | asan_device_setup is a utility that prepares a device to run code built with ASan. Essentially, it installs ASan runtime library into the system. For this reason, it has to be at a predictable relative path from the runtime library itself. We also plan to distribute this utility, packaged with runtime library and maybe llvm-symbolizer, to the users. llvm-svn: 202362
* [CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary workAlexey Samsonov2014-02-271-2/+4
| | | | llvm-svn: 202356
OpenPOWER on IntegriCloud