summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules/AddCompilerRT.cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Add experimental support for building compiler-rt for iOSChris Bieneman2015-08-131-2/+5
| | | | | | | | | | | | | | | | | 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-191-15/+14
| | | | | | | | | | | | | | | | | | | | | 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
* Build ASan runtime library with -z global on Android.Evgeniy Stepanov2015-05-051-2/+2
| | | | llvm-svn: 236537
* [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-061-2/+3
| | | | | | | 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
* 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
* [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
* 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
* [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-281-2/+7
| | | | | | | | 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-121-1/+3
| | | | | | 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
* [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
* [CMake] Use host compiler to build unittests in standalone modeAlexey Samsonov2014-02-191-4/+8
| | | | llvm-svn: 201672
* [CMake] Rename several variablesAlexey Samsonov2014-02-181-2/+2
| | | | llvm-svn: 201575
* [CMake] Add top-level target for each compiler-rt library, and add ↵Alexey Samsonov2014-02-181-3/+0
| | | | | | 'compiler-rt' target encompassing them all. llvm-svn: 201556
* LLVM's GoogleTest copy has moved its source code back to the defaultChandler Carruth2013-11-151-1/+2
| | | | | | location, update this reference to reflect that. llvm-svn: 194802
* [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko2013-11-071-18/+20
| | | | | | | | | | CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code. The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime. llvm-svn: 194199
* Add top-level CMake 'compiler-rt' target to build all compiler-rt librariesAlexey Samsonov2013-10-011-0/+3
| | | | llvm-svn: 191747
* [ASan] Split ASan unit tests into two different binaries:Alexey Samsonov2013-09-161-3/+9
| | | | | | | (1) instrumented, i.e. compiled and linked with -fsanitize=address (2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically. llvm-svn: 190788
* Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov2013-08-271-10/+2
| | | | | | | | | This change adds a Python script that is invoked for the just-built sanitizer runtime to generate the list of exported symbols passed to the linker. By default, it contains interceptors and sanitizer interface functions, but can be extended with tool-specific lists. llvm-svn: 189356
* [ASan] create default (empty) ASan blacklist file in resource directoryAlexey Samsonov2013-05-211-0/+10
| | | | llvm-svn: 182380
* Build and install .syms files alongside sanitizer runtimes. These are used toRichard Smith2013-03-231-2/+10
| | | | | | | specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. llvm-svn: 177784
* CMake: simplify build rules for compiler-rt unit tests. This fixes warnings ↵Alexey Samsonov2013-01-281-3/+1
| | | | | | in Ninja build tree. llvm-svn: 173677
* [CMake] Fix compiler-rt tests after r173617Alexey Samsonov2013-01-281-3/+1
| | | | llvm-svn: 173668
* AddCompilerRT.cmake: Try to unbreak since r173617.NAKAMURA Takumi2013-01-271-1/+1
| | | | llvm-svn: 173619
* CMake: add functions creating universal runtime libraries for several ↵Alexey Samsonov2013-01-211-3/+41
| | | | | | architectures on OS X and use them in ASan and UBSan build rules llvm-svn: 173011
* CMake: Add add_compiler_rt_osx_object_library to create universal libraries ↵Alexey Samsonov2013-01-201-0/+14
| | | | | | on Mac llvm-svn: 172979
* CMake: Add add_compiler_rt_static_runtime function and use it to build ↵Alexey Samsonov2013-01-201-0/+26
| | | | | | generic compiler-rt libraries llvm-svn: 172977
* CMake: create AddCompilerRT module and implement convenience ↵Alexey Samsonov2013-01-181-0/+49
add_compiler_rt_object_library function llvm-svn: 172826
OpenPOWER on IntegriCloud