summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2014-03-04[CMake] Port add_sanitizer_rt_symbols to CMake 3.0Alexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202797 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04[CMake] Fix add_sanitizer_rt_symbols on multi-config CMake generators.Alexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202796 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27[asan] Install asan_device_setup to bin/ when targetting Android.Evgeniy Stepanov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202362 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27[CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary workAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202356 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmakeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202353 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-24[CMake] Better support for COMPILER_RT_ENABLE_WERROR. Make sure compiler-rt ↵Alexey Samsonov
libraries are build by 'make all' command git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202023 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
2014-02-19[CMake] Rudimentary support for standalone CompilerRT build system.Alexey Samsonov
This change allows to build compiler-rt libraries separately from LLVM/Clang (path to LLVM build directory should be specified at configure time). Running tests is not yet supported. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201647 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Rename several variablesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201575 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Add top-level target for each compiler-rt library, and add ↵Alexey Samsonov
'compiler-rt' target encompassing them all. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201556 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Check for -fPIE and -ffreestanding flags for consistencyAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201549 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Simplify setting compile flag disabling RTTIAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Simplify code for detecting/setting compiler flagsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201543 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15LLVM's GoogleTest copy has moved its source code back to the defaultChandler Carruth
location, update this reference to reflect that. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194802 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-07[ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-25Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1984 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01Add top-level CMake 'compiler-rt' target to build all compiler-rt librariesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16[ASan] Split ASan unit tests into two different binaries:Alexey Samsonov
(1) instrumented, i.e. compiled and linked with -fsanitize=address (2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190788 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29[sanitizer] Refine CMake rules for generating exported symbols and lint checkingAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189577 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28sanitizer_common: Use PYTHON_EXECUTABLE to choose appropriate python.Will Dietz
Fixes build on systems where 'python' is not python2. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189486 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21[ASan] create default (empty) ASan blacklist file in resource directoryAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23Build and install .syms files alongside sanitizer runtimes. These are used toRichard Smith
specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with ↵Alexey Samsonov
-stdlib=libc++ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174699 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28CMake: simplify build rules for compiler-rt unit tests. This fixes warnings ↵Alexey Samsonov
in Ninja build tree. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28[CMake] Fix compiler-rt tests after r173617Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173668 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27AddCompilerRT.cmake: Try to unbreak since r173617.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173619 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21CMake: add functions creating universal runtime libraries for several ↵Alexey Samsonov
architectures on OS X and use them in ASan and UBSan build rules git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-20CMake: Add add_compiler_rt_osx_object_library to create universal libraries ↵Alexey Samsonov
on Mac git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-20CMake: Add add_compiler_rt_static_runtime function and use it to build ↵Alexey Samsonov
generic compiler-rt libraries git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake: create AddCompilerRT module and implement convenience ↵Alexey Samsonov
add_compiler_rt_object_library function git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-25MemorySanitizer unit tests.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171062 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21[Sanitizer] Don't implicitly add object files to the list of dependencies ↵Alexey Samsonov
when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170870 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20[*san] Create unittests output directory, if it does not exist.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170696 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
2012-04-04Remove the old, and non-functional CMake build system from CompilerRT.Chandler Carruth
I cannot build any part of this successfully on either Linux or Darwin, and the replacement is worlds simpler by requiring that this be built as a subproject of LLVM. If this breaks you for any reason, please let me know, and let me know what your use case is. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154059 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13Sink {config.h,ConfigureChecks}.cmake into cmake directory.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27Fix cmake test suit for compiler-rt.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@85339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23CMake should only pass GCC options to GCC.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@82607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 ↵Edward O'Callaghan
compliant. Comment trailing endifs git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08Fix signedness warning in mprotect call, Clean up and improve endianness.h ↵Edward O'Callaghan
header. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78451 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05Start porting compiler-rt testsuit to Solaris with new build system. Fix ↵Edward O'Callaghan
some C++ style comments which are not allowed in ISO C90. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03Fix newlinew warning in floatundidf.c , Bulkout CMake system more, complete ↵Edward O'Callaghan
port to AuroraUX and Solaris. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@77958 91177308-0d34-0410-b5e6-96231b3b80d8