summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2016-01-08[cmake] Indentation fix (NFC)Vedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257118 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-07[cmake] Add InstrProfilingWriter to libclang_rt on DarwinVedant Kumar
llvmBufferWriter and a few related symbols were missing from libclang_rt on Darwin (PR26002). This should fix the problem. Patch by Dan Peebles! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-06[compiler-rt] On Darwin, link all frameworks with -fapplication-extensionAnna Zaks
The ASan dylib as well as other compiler-rt dylibs work with app extensions, so we should add -fapplication-extension to the link line when building them. This will avoid linker warnings when using the dylibs in app extensions. (APIs unavailable to app extensions are listed here: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW6) Differential Revision: http://reviews.llvm.org/D15550 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-05[PGO] Enable building compiler-rt profile support library on WindowsNathan Slingerland
Summary: This change configures Windows builds to build the complier-rt profile support library (clang_rt.profile-i386.lib). Windows API incompatibilities in the compiler-rt profile lib are also fixed. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15830 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15Cross-DSO control flow integrity (compiler-rt part).Evgeniy Stepanov
This is an initial version of the runtime cross-DSO CFI support library. It contains a number of FIXMEs, ex. it does not support the diagnostic mode nor dlopen/dlclose, but it works and can be tested. Diagnostic mode, in particular, would require some refactoring (we'd like to gather all CFI hooks in the UBSan library into one function so that we could easier pass the diagnostic information down to __cfi_check). It will be implemented later. Once the diagnostic mode is in, I plan to create a second test configuration to run all existing tests in both modes. For now, this patch includes only a few new cross-DSO tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-11[compiler-rt] [safestack] Enable for aarch64Adhemerval Zanella
This patch enables the safestack for aarch64. The frontend already have it enabled on all supported architectures and no adjustment is required in llvm. The compiler-rt adjustments are basically add on the cmake configuration to enable the tests and fix the pagesize debug check by getting its value at runtime (since aarch64 has multiple pagesize depending of kernel configuration). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Replace cmake check for printf with a check for fopen.Evgeniy Stepanov
Printf is a builtin, and the check fails with -Werror because of a clang warning about an incompatible redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255189 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Revert "[CMake] Provide options for toggling on and off various runtime ↵Chris Bieneman
libraries." This reverts r255170. This change caused a bunch of bot failures and needs to be revised. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10[CMake] [Darwin] Log architecture test failures to CMakeError.logChris Bieneman
This makes debugging configuration issues way easier. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255183 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09[CMake] Provide options for toggling on and off various runtime libraries.Chris Bieneman
Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09Fix the target specific "-msse3" flag check in CMake. NFCSumanth Gundapaneni
msse3 is a target dependent flag and must be guarded as check_cxx_compiler_flag() checks only for compiler error messages and ignores warnings. Earlier COMPILER_RT_HAS_MSSE3_FLAG is set to "TRUE" for all targets as clang emits warnings and the compilation spits unnecessary warnings for non-X86 targets. This issue is fixed by coupling the flag with "-Werror" Differential Revision: http://reviews.llvm.org/D15362 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08[PPC64, TSAN] LLVM basic enablement of thread sanitizer for PPC64 (BE and LE)Bill Schmidt
This patch is by Simone Atzeni with portions by Adhemerval Zanella. This contains the LLVM patches to enable the thread sanitizer for PPC64, both big- and little-endian. Two different virtual memory sizes are supported: Old kernels use a 44-bit address space, while newer kernels require a 46-bit address space. There are two companion patches that will be added shortly. There is a Clang patch to actually turn on the use of the thread sanitizer for PPC64. There is also a patch that I wrote to provide interceptor support for setjmp/longjmp on PPC64. Patch discussion at reviews.llvm.org/D12841. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255057 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08[CMake] Adding simulator supported runtimes should be done in the block that ↵Chris Bieneman
tests simulator capabilities. Not sure why I put this in the iOS block originally, it shouldn't be there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255046 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07[TSan] Enforce TSan runtime doesn't include system headers with --sysroot flag.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[CMake] CMake calls to set_property with APPEND string need to have a ↵Chris Bieneman
leading space. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254660 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[CMake] set_target_properties doesn't append link flagsChris Bieneman
This fixes a bug I introduced in r254643. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254658 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[CMake] Support externalizing debug info on DarwinChris Bieneman
* Adds COMPILER_RT_EXTERNALIZE_DEBUGINFO option * On Darwin this results in calling dsymutil and strip after linking * This generates an error on non-darwin platforms, matching the LLVM behavior git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254643 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[sanitizer] Cache results of darwin_test_archsKuba Brecka
For OS X builds of compiler-rt, we run `darwin_test_archs` to determine which architectures can the toolchain target. This detection takes quite a long time, and the result is always the same (as long as you don't upgrade your OS, system headers or toolchain). Let's cache the result. Differential Revision: http://reviews.llvm.org/D15179 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254618 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03[tsan] Enable ThreadSanitizer on OS X builds by default, take 2Kuba Brecka
Second attempt to enable building ThreadSanitizer (and running tests) on OS X by default. Differential Revision: http://reviews.llvm.org/D15109 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254603 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02Pass along correct 'make' to sub-builds.Andy Gibbs
If the top-level cmake has a custom make specified through -DCMAKE_MAKE_PROGRAM then this must be passed along to the sub-build processes in compiler-rt or the build process will fail. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254509 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01Revert r254417 ("[tsan] Enable Thread Sanitizer on OS X builds by default").Kuba Brecka
A ton of tests fail on OS X 10.10, because dyld auto-interposition is only available in 10.11. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254420 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01[tsan] Enable Thread Sanitizer on OS X builds by defaultKuba Brecka
Differential Revision: http://reviews.llvm.org/D15109 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254417 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30[CMake] Moving -fvisibility-inlines-hidden append as per post-commit reviewChris Bieneman
Thanks Alexey. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254316 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30[CMake] Add -fvisibility-inlines-hidden if the compiler supports it.Chris Bieneman
This results in a significant reduction in the size of the sanitizer libraries. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254308 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-25[CMake] [Darwin] libclang_rt.eprintf should be built with the same CFLAGS as ↵Chris Bieneman
the other darwin builtin libraries. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20[CMake] Add iOS simulator to the supported OS list for the profile library.Chris Bieneman
We already support this in autoconf and it ships in Apple Clang. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253709 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20[compiler-rt][cmake] Fix not lipo libclang_rt.cc_kext.a when building on OS XChris Bieneman
Summary: Fix r252525 - cmake configure failed to connect target builtins to target compiler-rt because of early return call. Patch by: Jacky Tsao (cao.zhong1) Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14747 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253692 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Attempt to fix build breakage caused by r253646.George Burgess IV
Apparently check_c_compiler_flag isn't a thing everywhere. Not being incredibly well-versed in cmake, I'm hoping that check_cxx_compiler_flag serves a similar purpose. :) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253648 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20Silence "unrecognised -std=c99" warning on MSVC.George Burgess IV
Thanks to angelsl for the patch! Differential Revision: http://reviews.llvm.org/D13692 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253646 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13[CMake] [macho_embedded] [builtins] Always use OS X sysroot, even for arm.Chris Bieneman
Turns out that there are some checks in the backend that change code generation for armv7 if you are building against an iOS sys root. For the macho_embedded builtins we really don't want that. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253064 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12[CMake] [Darwin] Forcing -fPIC on for all darwin builtins except macho_embeddedChris Bieneman
We need to add -fPIC to the flags for the builtins in case PIC was turned off at a higher level. We also want to set ENABLE_PIC to Off when building the macho_embedded builtins so the top-level settings don't impact that build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-11[CMake] [Darwin] [Builtins] Force setting the flags we care about at the end ↵Chris Bieneman
of the compiler command line Setting CMAKE_*_FLAGS isn't sufficient here because CMAKE_*_FLAGS_${CMAKE_BUILD_TYPE} can override the flags, and there is no way to safely clear that because it is a cached variable (<sarcasm> YAY! </sarcasm>). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-11[tsan] Add TSan unit test support for OS XKuba Brecka
This patch enables building and running TSan unit tests on OS X. Differential Revision: http://reviews.llvm.org/D14546 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252731 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10[CMake] [macho_embedded] Only set sys root if the variable is set, this ↵Chris Bieneman
prevents passing empty -isysroot arguments This is a minor cleanup to the macho_embedded builtins. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252619 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10[CMake] Cleaning up flags for Darwin builtinsChris Bieneman
* Setting CMAKE_*_FLAGS_${BUILD_TYPE} isn't really needed since we're setting the same value everywhere * functions sanitize variables differently from macros, darwin_add_embedded_builtin_libraries should be a macro otherwise it won't alter the variables. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252618 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10[CMake] Temporary workaround to support building builtins on darwin with a ↵Chris Bieneman
toolchain that may not support all x86 and arm architectures. This is at least a little better than my first attempt. We still really need a way to do compile checks without linking. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252572 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-10Revert "[CMake] [macho_embedded] Check to make sure the compiler supports ↵Chris Bieneman
the architectures before generating build targets" This commit reverts r252525. I was not really thinking about this fix properly. This doesn't work because it relys on try_compile checks which do a full compile & link. I'm going to put in a temporary solution as an interm step until we have a way to perform compiler checks without linking. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252569 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09[CMake] Don't pass -fPIC when compiling the darwin builtinsChris Bieneman
This change makes CMake match autoconf. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09[CMake] Fixing a typo in variable name ARG_*->LIB_*Chris Bieneman
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09[CMake] Removing extra underscore.Chris Bieneman
Fixing a typo. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252534 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09[CMake] [Darwin] Don't generate lipo commands if we don't have libraries to ↵Chris Bieneman
put into the fat archive. Not making sure there are thin libraries results in some difficult to diagnose build failures. This check should make those build failures go away. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09[CMake] [macho_embedded] Check to make sure the compiler supports the ↵Chris Bieneman
architectures before generating build targets If we don't check the compiler's capabilities we end up generating build targets that the compiler might not be able to build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06[CMake] Need to filter ${arch}/*.c builtins as well as ${arch}/*.S builtins.Chris Bieneman
This was broken in r248542 when I refactored this to support builtins where ${arch} didn't match the directory prefix (i.e. armv7s). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252365 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-03[tsan] CMake support for TSan on OS XKuba Brecka
Hi, this patch adds a CMake flag called `COMPILER_RT_ENABLE_TSAN_OSX`, which is off by default. If enabled, the build system will be building the OS X version of the TSan runtime library (called `libclang_rt.tsan_osx_dynamic.dylib`). I'll submit patches that fix OS X build errors shortly. This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251915 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-21[lsan] [aarch64] Add support for AArch64Adhemerval Zanella
This patch add support for leak sanitizer for aarch64. Similar to MIPS it uses a SizeClassAllocator32 due VMA constraints (aarch64 currently supports 39 and 42-bit VMA). It also fixes the android build issue. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@250898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-09[CMake] Adding support for generating libclang_rt.eprintf.aChris Bieneman
This library provides eprintf for i386 on OS X versions later than 10.4. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249913 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-09[CMake] [Darwin] [builtins] Need to special case the naming of the OS X ↵Chris Bieneman
cc_kext builtin library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249870 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-09[CMake] [darwin] [builitins] Don't build x86_64h into the 10.4 builtins libraryChris Bieneman
There is no haswell support in 10.4, so we don't need a 10.4 builtin library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-09[CMake] [Darwin] [Builtins] Fixing a typo that was keeping the OS X 10.4 ↵Chris Bieneman
builtins library from being built properly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-08Revert "[lsan] [aarch64] Add support for AArch64"Evgeniy Stepanov
This reverts commit ea02fa45225c35613bfecab383fb526e24b74497 (r249337). Reason: broken "ninja AsanUnitTests" on Android/AArch64. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20675/steps/build%20compiler-rt%20android%2Faarch64/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249730 91177308-0d34-0410-b5e6-96231b3b80d8