summaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTDarwinUtils.cmake
AgeCommit message (Collapse)Author
2016-04-26[CMake] [PR27403] Fix COMPILER_RT_ENABLE_IOS when using Xcode from the App ↵Chris Bieneman
Store. This change modifies find_darwin_sdk_dir to set a variable if a Darwin "Internal" SDK is present which allows CMake to disable components that require internal-only APIs. This mechanism is then used to disable TSan when an internal SDK is not present. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267575 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02[asan] Add iOS support.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[compiler-rt] list_union() is actually an intersect operation. Rename it.Daniel Sanders
Summary: Given: set(T1 a b c) set(T2 b c d) message("T1=${T1}") message("T2=${T2}") list_union(T3 T1 T2) message("T3=${T3}") cmake emitted: T1=a;b;c T2=b;c;d T3=b;c Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16580 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258916 91177308-0d34-0410-b5e6-96231b3b80d8
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
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-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-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[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-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-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-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-04[CMake] [darwin] Removing a line of debug code that I accidentally committed.Chris Bieneman
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249278 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-02[CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libsChris Bieneman
The darwin and macho_embedded libraries get installed to different locations, so we need to feed through an INSTALL_PATH. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-02[CMake] Workaround for the lipo output directory not being created.Chris Bieneman
This should resolve an issue reported by mclow. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-01[CMake] [builtins] [macho_embedded] Separate out the 64-bit thumb builtins ↵Chris Bieneman
so they don't get included on 'm' architectures. NFC. This should help make the compiler-rt build less noisy. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-01[CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 ↵Chris Bieneman
because the compiler ignores it and complains. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249076 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30[CMake] [Darwin] [macho_embedded] Specify the version min explicitly.Chris Bieneman
We need to set the OS X deployment target on the macho_embedded libraries to match the outputs from the autoconf build system. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248944 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30[CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be ↵Chris Bieneman
setting based. This is needed because we need to skip cc_kext generation for more than just the simulator builds. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248939 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29[CMake] [macho_embedded] We need to set some extra flags when building the ↵Chris Bieneman
macho_embedded builtins. If we don't specify the arm target the float ABI compiler flags get ignored. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248853 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29[CMake] [Darwin] Support building the macho_embedded builtin libraries.Chris Bieneman
Summary: This ports functionality from the clang_macho_embedded.mk platform makefile over to CMake. Reviewers: bogner, samsonov, bob.wilson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13226 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248850 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-28[CMake] [Darwin] [builtins] Apply OS and OS-arch filters to cc_kext builtin ↵Chris Bieneman
libraries. We don't want to filter out the builtins that are present in libSystem like we do for the normal builtins because kexts can't link libSystem, but we should filter out all the builtins that are generally not supported on the OS and architecture. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248756 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-28[CMake] Accidentally committed code that was using a variable only populated ↵Chris Bieneman
in some earlier code. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-28[CMake] [Darwin] [builtins] Fix building builtins for Darwin simulator ↵Chris Bieneman
platforms. For Darwin simulator platforms we shouldn't build the cc_kext builtins at all because they aren't applicable, and we should includ the simulator builtins as slices inside the main platform builtin library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248751 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-28[CMake] [Darwin] Make darwin_filter_builtin_sources support both whitelist ↵Chris Bieneman
and blacklist filtering. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248720 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-25[CMake] [darwin] [builtins] Make darwin_lipo_libs take OUTPUT_DIR as an ↵Chris Bieneman
option. NFC. This refactoring will allow me to reuse this function when calling lipo with outputs in different directories. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248639 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-25[CMake] [darwin] Refactor darwin_read_exclude_file to be reusable. NFC.Chris Bieneman
Rename darwin_read_exclude_file to more generic darwin_read_list_from_file, and make it take the file path instead of constructing it so it can be reused more freely. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248635 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-25[CMake] [darwin] [builtins] Should install the lipo'd builtin libraries.Chris Bieneman
On darwin we don't install the single-architecture builtin libraries, but we do need to install the lipo'd ones. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-25[CMake] [darwin] [builtins] Should be reading the OS variable that is passed ↵Chris Bieneman
in, not the bleed through from the function above. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24[CMake] [darwin] [cc_kext] In addition to builtin sources the cc_kext ↵Chris Bieneman
builtins include some functions from clang_rt.profile. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248548 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24[CMake] [darwin] [builtins] Refactoring darwin_find_excluded_builtins_list ↵Chris Bieneman
to parse arguments instead of only handling positional arguments. OS and ARCH must be specified, but minimum version may not. Excluding the minimum version will only apply the filters for builtins not supported by the OS and OS-Arch pair. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24[CMake] [darwin] [builtins] Refactoring code to filter builtin lists out ↵Chris Bieneman
into a function. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24[CMake] [darwin] [builtins] Match clang_darwin.mk's compiler flags when ↵Chris Bieneman
building builtin libraries On Darwin we have a very restrictive set of flags used when building the builtins. This change makes CMake match autoconf. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248523 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24[CMake] pass -Wno-pedantic to cc_kext builtins buildChris Bieneman
We don't pass -pedantic to the builtin builds in the makefiles, so we shouldn't do it here. This is a temporary fix for the broken bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_build/7526/warnings8Result/new/ A more correct solution is in the works. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-23[CMake] [Darwin] Bug 21562 - Add a CMake equivalent for ↵Chris Bieneman
make/platform/clang_darwin.mk in compiler_rt Summary: First pass at adding cc_kext_* builtin libraries. I need to cleanup and refactor the builtin filtering so that I can use it to filter the builtin symbols list, but this is the first step in the right direction. Reviewers: bob.wilson, bogner, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13115 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248443 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-23[CMake] [Darwin] Bug 21562 - Add a CMake equivalent for ↵Chris Bieneman
make/platform/clang_darwin.mk in compiler_rt Summary: Building the builtins on Darwin platforms is a bit complicated. This is a first-pass implementation of the functionality from clang_darwin.mk into CMake. When building the builtins on Darwin we have layers of blacklists that we apply based on platform, architecture, and minimum supported OS version. Reviewers: bogner, filcab, bob.wilson, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13059 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248383 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-16[CMake] Make the sample program in darwin_test_archs have a symbol it needs ↵Chris Bieneman
to link. This resolves an issue building compiler-rt using Xcode 7 that was reported on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2015-September/090245.html git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-21[CMake] Fixing haswell filtering.Chris Bieneman
Turns out this wasn't working at all. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245713 91177308-0d34-0410-b5e6-96231b3b80d8