summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Support externalizing debug info on DarwinChris Bieneman2015-12-031-0/+25
| | | | | | | | * 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 llvm-svn: 254643
* [sanitizer] Cache results of darwin_test_archsKuba Brecka2015-12-031-1/+7
| | | | | | | | 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 llvm-svn: 254618
* Pass along correct 'make' to sub-builds.Andy Gibbs2015-12-021-1/+2
| | | | | | | | 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. llvm-svn: 254509
* [CMake] [Darwin] libclang_rt.eprintf should be built with the same CFLAGS as ↵Chris Bieneman2015-11-251-2/+9
| | | | | | the other darwin builtin libraries. llvm-svn: 254082
* [compiler-rt][cmake] Fix not lipo libclang_rt.cc_kext.a when building on OS XChris Bieneman2015-11-201-81/+79
| | | | | | | | | | | | | | | | 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 llvm-svn: 253692
* [CMake] [macho_embedded] [builtins] Always use OS X sysroot, even for arm.Chris Bieneman2015-11-131-3/+0
| | | | | | 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. llvm-svn: 253064
* [CMake] [Darwin] Forcing -fPIC on for all darwin builtins except macho_embeddedChris Bieneman2015-11-121-1/+2
| | | | | | 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. llvm-svn: 252966
* [CMake] [Darwin] [Builtins] Force setting the flags we care about at the end ↵Chris Bieneman2015-11-111-9/+11
| | | | | | | | 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>). llvm-svn: 252807
* [tsan] Add TSan unit test support for OS XKuba Brecka2015-11-111-13/+0
| | | | | | | | This patch enables building and running TSan unit tests on OS X. Differential Revision: http://reviews.llvm.org/D14546 llvm-svn: 252731
* [CMake] [macho_embedded] Only set sys root if the variable is set, this ↵Chris Bieneman2015-11-101-1/+5
| | | | | | | | prevents passing empty -isysroot arguments This is a minor cleanup to the macho_embedded builtins. llvm-svn: 252619
* [CMake] Cleaning up flags for Darwin builtinsChris Bieneman2015-11-101-23/+4
| | | | | | | * 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. llvm-svn: 252618
* [CMake] Temporary workaround to support building builtins on darwin with a ↵Chris Bieneman2015-11-101-3/+18
| | | | | | | | 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. llvm-svn: 252572
* Revert "[CMake] [macho_embedded] Check to make sure the compiler supports ↵Chris Bieneman2015-11-101-13/+1
| | | | | | | | 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. llvm-svn: 252569
* [CMake] Don't pass -fPIC when compiling the darwin builtinsChris Bieneman2015-11-091-1/+1
| | | | | | This change makes CMake match autoconf. llvm-svn: 252547
* [CMake] Fixing a typo in variable name ARG_*->LIB_*Chris Bieneman2015-11-091-1/+1
| | | | llvm-svn: 252543
* [CMake] Removing extra underscore.Chris Bieneman2015-11-091-1/+1
| | | | | | Fixing a typo. llvm-svn: 252534
* [CMake] [Darwin] Don't generate lipo commands if we don't have libraries to ↵Chris Bieneman2015-11-091-12/+16
| | | | | | | | 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. llvm-svn: 252527
* [CMake] [macho_embedded] Check to make sure the compiler supports the ↵Chris Bieneman2015-11-091-1/+13
| | | | | | | | 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. llvm-svn: 252525
* [CMake] Need to filter ${arch}/*.c builtins as well as ${arch}/*.S builtins.Chris Bieneman2015-11-061-1/+1
| | | | | | This was broken in r248542 when I refactored this to support builtins where ${arch} didn't match the directory prefix (i.e. armv7s). llvm-svn: 252365
* [CMake] Adding support for generating libclang_rt.eprintf.aChris Bieneman2015-10-091-0/+19
| | | | | | This library provides eprintf for i386 on OS X versions later than 10.4. llvm-svn: 249913
* [CMake] [Darwin] [builtins] Need to special case the naming of the OS X ↵Chris Bieneman2015-10-091-1/+5
| | | | | | cc_kext builtin library. llvm-svn: 249870
* [CMake] [darwin] Removing a line of debug code that I accidentally committed.Chris Bieneman2015-10-041-1/+0
| | | | llvm-svn: 249278
* [CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libsChris Bieneman2015-10-021-5/+11
| | | | | | The darwin and macho_embedded libraries get installed to different locations, so we need to feed through an INSTALL_PATH. llvm-svn: 249199
* [CMake] Workaround for the lipo output directory not being created.Chris Bieneman2015-10-021-0/+1
| | | | | | This should resolve an issue reported by mclow. llvm-svn: 249158
* [CMake] [builtins] [macho_embedded] Separate out the 64-bit thumb builtins ↵Chris Bieneman2015-10-011-1/+2
| | | | | | | | so they don't get included on 'm' architectures. NFC. This should help make the compiler-rt build less noisy. llvm-svn: 249084
* [CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 ↵Chris Bieneman2015-10-011-1/+5
| | | | | | because the compiler ignores it and complains. llvm-svn: 249076
* [CMake] [Darwin] [macho_embedded] Specify the version min explicitly.Chris Bieneman2015-09-301-0/+1
| | | | | | We need to set the OS X deployment target on the macho_embedded libraries to match the outputs from the autoconf build system. llvm-svn: 248944
* [CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be ↵Chris Bieneman2015-09-301-1/+1
| | | | | | | | setting based. This is needed because we need to skip cc_kext generation for more than just the simulator builds. llvm-svn: 248939
* [CMake] [macho_embedded] We need to set some extra flags when building the ↵Chris Bieneman2015-09-291-1/+6
| | | | | | | | macho_embedded builtins. If we don't specify the arm target the float ABI compiler flags get ignored. llvm-svn: 248853
* [CMake] [Darwin] Support building the macho_embedded builtin libraries.Chris Bieneman2015-09-291-2/+82
| | | | | | | | | | | | 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 llvm-svn: 248850
* [CMake] [Darwin] [builtins] Apply OS and OS-arch filters to cc_kext builtin ↵Chris Bieneman2015-09-281-1/+12
| | | | | | | | 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. llvm-svn: 248756
* [CMake] Accidentally committed code that was using a variable only populated ↵Chris Bieneman2015-09-281-1/+1
| | | | | | in some earlier code. NFC. llvm-svn: 248752
* [CMake] [Darwin] [builtins] Fix building builtins for Darwin simulator ↵Chris Bieneman2015-09-281-20/+30
| | | | | | | | 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. llvm-svn: 248751
* [CMake] [Darwin] Make darwin_filter_builtin_sources support both whitelist ↵Chris Bieneman2015-09-281-3/+15
| | | | | | and blacklist filtering. llvm-svn: 248720
* [CMake] [darwin] [builtins] Make darwin_lipo_libs take OUTPUT_DIR as an ↵Chris Bieneman2015-09-251-7/+9
| | | | | | | | option. NFC. This refactoring will allow me to reuse this function when calling lipo with outputs in different directories. llvm-svn: 248639
* [CMake] [darwin] Refactor darwin_read_exclude_file to be reusable. NFC.Chris Bieneman2015-09-251-8/+11
| | | | | | 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. llvm-svn: 248635
* [CMake] [darwin] [builtins] Should install the lipo'd builtin libraries.Chris Bieneman2015-09-251-0/+2
| | | | | | On darwin we don't install the single-architecture builtin libraries, but we do need to install the lipo'd ones. llvm-svn: 248630
* [CMake] [darwin] [builtins] Should be reading the OS variable that is passed ↵Chris Bieneman2015-09-251-2/+2
| | | | | | in, not the bleed through from the function above. NFC. llvm-svn: 248629
* [CMake] [darwin] [cc_kext] In addition to builtin sources the cc_kext ↵Chris Bieneman2015-09-241-3/+6
| | | | | | builtins include some functions from clang_rt.profile. llvm-svn: 248548
* [CMake] [darwin] [builtins] Refactoring darwin_find_excluded_builtins_list ↵Chris Bieneman2015-09-241-21/+36
| | | | | | | | 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. llvm-svn: 248543
* [CMake] [darwin] [builtins] Refactoring code to filter builtin lists out ↵Chris Bieneman2015-09-241-15/+22
| | | | | | into a function. NFC. llvm-svn: 248542
* [CMake] [darwin] [builtins] Match clang_darwin.mk's compiler flags when ↵Chris Bieneman2015-09-241-2/+14
| | | | | | | | building builtin libraries On Darwin we have a very restrictive set of flags used when building the builtins. This change makes CMake match autoconf. llvm-svn: 248523
* [CMake] pass -Wno-pedantic to cc_kext builtins buildChris Bieneman2015-09-241-1/+1
| | | | | | | | | | 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. llvm-svn: 248515
* [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for ↵Chris Bieneman2015-09-231-19/+44
| | | | | | | | | | | | | | 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 llvm-svn: 248443
* [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for ↵Chris Bieneman2015-09-231-0/+111
| | | | | | | | | | | | | | | | | 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 llvm-svn: 248383
* [CMake] Make the sample program in darwin_test_archs have a symbol it needs ↵Chris Bieneman2015-09-161-1/+1
| | | | | | | | | | 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 llvm-svn: 247833
* [CMake] Add ARCHS option to add_sanitizer_rt_symbols.Chris Bieneman2015-08-271-37/+41
| | | | | | | | | | | | | | | | | Summary: This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt. Changes to CMakeLists files are all minimal except ubsan which tests the new ARCHS loop. Further cleanup patches will follow. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12410 llvm-svn: 246199
* [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols.Chris Bieneman2015-08-271-1/+5
| | | | | | | | | | | | Summary: This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12409 llvm-svn: 246178
* [CMake] Converting add_sanitizer_rt_symbols to use cmake_parse_arguments.Chris Bieneman2015-08-261-4/+10
| | | | | | | | | | | | Summary: This is the first step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12386 llvm-svn: 246102
* [CMake] Add OBJECT_LIBS option to add_compiler_rt_runtime, and refactored ↵Chris Bieneman2015-08-261-2/+16
| | | | | | | | | | | | | | asan call site to use it. Summary: This is one more step to allow us to eliminate platform-specific code from the library CMakeLists files. Subsequent patches will refactor all call sites to use this and other new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12339 llvm-svn: 246047
OpenPOWER on IntegriCloud