summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/interception/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc files in lib/interception to .cpp.Nico Weber2019-07-311-4/+4
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367456
* Make compiler-rt CMakeLists.txt formatting a bit more like LLVM's usual ↵Nico Weber2019-01-161-2/+4
| | | | | | formatting llvm-svn: 351363
* [CMake] Add compiler-rt header files to the list of sources for targetsDan Liew2018-07-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when building with an IDE so that header files show up in the UI. This massively improves the development workflow in IDEs. To implement this a new function `compiler_rt_process_sources(...)` has been added that adds header files to the list of sources when the generator is an IDE. For non-IDE generators (e.g. Ninja/Makefile) no changes are made to the list of source files. The function can be passed a list of headers via the `ADDITIONAL_HEADERS` argument. For each runtime library a list of explicit header files has been added and passed via `ADDITIONAL_HEADERS`. For `tsan` and `sanitizer_common` a list of headers was already present but it was stale and has been updated to reflect the current state of the source tree. The original version of this patch used file globbing (`*.{h,inc,def}`) to find the headers but the approach was changed due to this being a CMake anti-pattern (if the list of headers changes CMake won't automatically re-generate if globbing is used). The LLVM repo contains a similar function named `llvm_process_sources()` but we don't use it here for several reasons: * It depends on the `LLVM_ENABLE_OPTION` cache variable which is not set in standalone compiler-rt builds. * We would have to `include(LLVMProcessSources)` which I'd like to avoid because it would include a bunch of stuff we don't need. Differential Revision: https://reviews.llvm.org/D48422 llvm-svn: 336663
* [compilter-rt] Add unittests for interception libraryEtienne Bergeron2016-07-061-0/+4
| | | | | | | | | | | | | | Summary: This patch is adding unittests for the interception library. Reviewers: rnk Subscribers: majnemer, llvm-commits, wang0109, chrisha, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D21980 llvm-svn: 274657
* [cmake] Address Samsonov's post-commit review of r262723Filipe Cabecinhas2016-03-051-1/+1
| | | | | | | | | | Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17896 llvm-svn: 262770
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-191-1/+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
* [CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman2015-06-101-15/+5
| | | | | | | | | | | | | | | | | 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
* [sanitizer] Android build cleanup.Evgeniy Stepanov2014-09-291-4/+0
| | | | | | | | | | | | * 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
* [CMake] Simplify setting compile flag disabling RTTIAlexey Samsonov2014-02-181-9/+2
| | | | llvm-svn: 201547
* Move /FS to SANITIZER_COMMON_CFLAGSTimur Iskhodzhanov2014-01-301-1/+1
| | | | llvm-svn: 200485
* Quick-fix a typoTimur Iskhodzhanov2014-01-301-1/+1
| | | | llvm-svn: 200483
* Add an /FS flag to the lib/interception CMake to make it buildable with ↵Timur Iskhodzhanov2014-01-301-1/+9
| | | | | | VS2013 too llvm-svn: 200482
* [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko2013-11-071-4/+6
| | | | | | | | | | 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
* [sanitizer] Fix wrong size of OFF_T on 32-bit platforms.Evgeniy Stepanov2013-02-071-0/+1
| | | | | | | This broke pread/pwrite interceptors when building without -D_FILE_OFFSET_BITS=64, and always on Android. llvm-svn: 174593
* [ASan] Delete the code related to static runtime on OS X.Alexander Potapenko2013-02-051-12/+0
| | | | | | Nuke lib/interception/mach_override. llvm-svn: 174383
* [Sanitizer] include sanitizer_common headers when building interception libraryAlexey Samsonov2013-01-301-0/+2
| | | | llvm-svn: 173930
* CMake: Add add_compiler_rt_osx_object_library to create universal libraries ↵Alexey Samsonov2013-01-201-4/+4
| | | | | | on Mac llvm-svn: 172979
* CMake: Generalize build rules for different arches for sanitizer_common, ↵Alexey Samsonov2013-01-181-9/+4
| | | | | | asan, ubsan llvm-svn: 172829
* CMake: create AddCompilerRT module and implement convenience ↵Alexey Samsonov2013-01-181-12/+9
| | | | | | add_compiler_rt_object_library function llvm-svn: 172826
* CMake variables renaming: X86_64->x86_64 I386->i386Alexey Samsonov2013-01-181-4/+4
| | | | llvm-svn: 172812
* Pass -std=c99 when compiling mach_override.cAlexander Potapenko2012-09-121-1/+6
| | | | llvm-svn: 163717
* CMake build rules for ASan Android runtime and tests.Evgeniy Stepanov2012-09-111-2/+2
| | | | llvm-svn: 163613
* [ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the ↵Alexey Samsonov2012-09-051-1/+1
| | | | | | rest of flags/defs from old Makefile to CMake llvm-svn: 163204
* Some flag cleanup for the sanitizer runtimes.Chandler Carruth2012-08-291-10/+1
| | | | | | | | | | | | This hoists most of the CFLAGS into a common variable. It also adds detection for -Wno-c99-extensions and uses it to silence a pile of warnings. Finally, it switches to the proper flag -rdynamic. With this, the cmake build is warning free on my bootstrap Linux build. llvm-svn: 162809
* CMake build rules for ASan/Android runtime.Evgeniy Stepanov2012-08-271-0/+5
| | | | llvm-svn: 162675
* [ASan] CMake support for building ASan runtime as a universal binary on MacAlexey Samsonov2012-08-101-15/+19
| | | | llvm-svn: 161665
* [Sanitizer] cleanup CMake files for interception and sanitizer_common helper ↵Alexey Samsonov2012-08-081-14/+19
| | | | | | libraries llvm-svn: 161485
* [ASan] silence various warnings in cmake build of asan unit testsAlexey Samsonov2012-06-281-0/+3
| | | | llvm-svn: 159347
* Cleanup the handling of CFLAGS even more in the cmake build for ASan.Chandler Carruth2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Add the initial support for building ASan tests. The first change here is to try to get the CFLAGS to more closely match those used by the old Makefile. There are probably still goofs here, ASan folks, your review would be appreciated. The second big change is to add support for building both instrumentation based an non-instrumentation based unittests for ASan. They are built a bit differently from how the old makefiles managed things. Specifically, there are two binaries, one for the non-instrumented case, and one for the instrumented case. Also, the instrumented unit tests rely on the host compiler supporting AddressSanitizer's intrumentation pass. This is kind-of gross, but I don't know of a better way yet. I've mailed llvmdev to discuss this issue. One big caveat is that the detection logic currently doesn't work. I've commented it out temporarily as I'd like to get feedback from the ASan developers, etc. llvm-svn: 159134
* Another big step toward a viable CMake build system for CompilerRT,Chandler Carruth2012-06-251-0/+34
ASan, and friends. This explicitly switches the CompilerRT CMake build to require CMake version 2.8.8 or newer which provides first-class support for "object" libraries which consist of a pile of '.o' files -- exactly what is desired for composing runtime libraries. I've gone ahead and switched to using this. I've also added the interception library which I missed initially. And I've added proper dependencies between the various libraries. With this, I'm able to build archives for asan that appear to contain all of the necessary .o files. The final tweak here is to start setting up the compile flags and macro defines expected by ASan and its helper libraries. These may not be entirely correct currently, they're based loosely on my reading of the old Makefiles. However, they can be tweaked more easily now that they're wired up properly. llvm-svn: 159129
OpenPOWER on IntegriCloud