Commit Graph

118 Commits

Author SHA1 Message Date
Chris Bieneman 626f6a057c [CMake] Adding support for generating libclang_rt.eprintf.a
This library provides eprintf for i386 on OS X versions later than 10.4.

llvm-svn: 249913
2015-10-09 22:40:50 +00:00
Chris Bieneman 2c23a80bbf [CMake] [Darwin] [builtins] Need to special case the naming of the OS X cc_kext builtin library.
llvm-svn: 249870
2015-10-09 18:38:34 +00:00
Chris Bieneman f9d71a5439 [CMake] [darwin] Removing a line of debug code that I accidentally committed.
llvm-svn: 249278
2015-10-04 15:48:16 +00:00
Chris Bieneman be8b60b602 [CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libs
The darwin and macho_embedded libraries get installed to different locations, so we need to feed through an INSTALL_PATH.

llvm-svn: 249199
2015-10-02 22:14:25 +00:00
Chris Bieneman b22351cb18 [CMake] Workaround for the lipo output directory not being created.
This should resolve an issue reported by mclow.

llvm-svn: 249158
2015-10-02 17:37:40 +00:00
Chris Bieneman f0672f1187 [CMake] [builtins] [macho_embedded] Separate out the 64-bit thumb builtins so they don't get included on 'm' architectures. NFC.
This should help make the compiler-rt build less noisy.

llvm-svn: 249084
2015-10-01 22:01:06 +00:00
Chris Bieneman f9e0fe77c7 [CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 because the compiler ignores it and complains.
llvm-svn: 249076
2015-10-01 21:21:19 +00:00
Chris Bieneman 7bfe1ee428 [CMake] [Darwin] [macho_embedded] Specify the version min explicitly.
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
2015-09-30 21:09:23 +00:00
Chris Bieneman d823302483 [CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be setting based.
This is needed because we need to skip cc_kext generation for more than just the simulator builds.

llvm-svn: 248939
2015-09-30 20:25:10 +00:00
Chris Bieneman d208e41030 [CMake] [macho_embedded] We need to set some extra flags when building the macho_embedded builtins.
If we don't specify the arm target the float ABI compiler flags get ignored.

llvm-svn: 248853
2015-09-29 23:21:09 +00:00
Chris Bieneman 6e18e1e39e [CMake] [Darwin] Support building the macho_embedded builtin libraries.
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
2015-09-29 23:13:45 +00:00
Chris Bieneman 5def2a8a44 [CMake] [Darwin] [builtins] Apply OS and OS-arch filters to cc_kext builtin 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
2015-09-28 23:09:46 +00:00
Chris Bieneman 88d8534e87 [CMake] Accidentally committed code that was using a variable only populated in some earlier code. NFC.
llvm-svn: 248752
2015-09-28 22:20:25 +00:00
Chris Bieneman 1341472f92 [CMake] [Darwin] [builtins] Fix building builtins for Darwin simulator 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
2015-09-28 22:18:31 +00:00
Chris Bieneman 8aba4b0589 [CMake] [Darwin] Make darwin_filter_builtin_sources support both whitelist and blacklist filtering.
llvm-svn: 248720
2015-09-28 17:38:44 +00:00
Chris Bieneman bb62ec2cd6 [CMake] [darwin] [builtins] Make darwin_lipo_libs take OUTPUT_DIR as an option. NFC.
This refactoring will allow me to reuse this function when calling lipo with outputs in different directories.

llvm-svn: 248639
2015-09-25 23:55:53 +00:00
Chris Bieneman cc8c7773c5 [CMake] [darwin] Refactor darwin_read_exclude_file to be reusable. NFC.
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
2015-09-25 23:29:03 +00:00
Chris Bieneman 905f9fce0a [CMake] [darwin] [builtins] Should install the lipo'd builtin libraries.
On darwin we don't install the single-architecture builtin libraries, but we do need to install the lipo'd ones.

llvm-svn: 248630
2015-09-25 22:39:19 +00:00
Chris Bieneman 75c7c9ce8b [CMake] [darwin] [builtins] Should be reading the OS variable that is passed in, not the bleed through from the function above. NFC.
llvm-svn: 248629
2015-09-25 22:31:17 +00:00
Chris Bieneman 7146f7bcf9 [CMake] [darwin] [cc_kext] In addition to builtin sources the cc_kext builtins include some functions from clang_rt.profile.
llvm-svn: 248548
2015-09-24 22:29:58 +00:00
Chris Bieneman 590a48d4de [CMake] [darwin] [builtins] Refactoring darwin_find_excluded_builtins_list 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
2015-09-24 21:51:09 +00:00
Chris Bieneman 5fbaeb9e5c [CMake] [darwin] [builtins] Refactoring code to filter builtin lists out into a function. NFC.
llvm-svn: 248542
2015-09-24 21:40:06 +00:00
Chris Bieneman 9b788a452b [CMake] [darwin] [builtins] Match clang_darwin.mk's compiler flags when 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
2015-09-24 18:26:34 +00:00
Chris Bieneman d983ae0a0e [CMake] pass -Wno-pedantic to cc_kext builtins build
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
2015-09-24 16:47:26 +00:00
Chris Bieneman 01ebf004ff [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for 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
2015-09-23 23:05:32 +00:00
Chris Bieneman 0d427986f5 [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for 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
2015-09-23 15:18:17 +00:00
Chris Bieneman 672311b368 [CMake] Make the sample program in darwin_test_archs have a symbol it needs 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
2015-09-16 18:29:52 +00:00
Chris Bieneman f12cf13f38 [CMake] Add ARCHS option to add_sanitizer_rt_symbols.
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
2015-08-27 20:07:54 +00:00
Chris Bieneman 2be86df4b1 [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols.
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
2015-08-27 18:27:33 +00:00
Chris Bieneman bfc74bd3fc [CMake] Converting add_sanitizer_rt_symbols to use cmake_parse_arguments.
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
2015-08-26 23:12:25 +00:00
Chris Bieneman 7173f07d70 [CMake] Add OBJECT_LIBS option to add_compiler_rt_runtime, and refactored 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
2015-08-26 18:33:51 +00:00
Chris Bieneman d160260681 [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime into a single function
Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists.

This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features.

Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov

Subscribers: beanz, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D12292

llvm-svn: 245970
2015-08-25 19:53:09 +00:00
Chris Bieneman 797f5b3683 [CMake] Fixing haswell filtering.
Turns out this wasn't working at all.

llvm-svn: 245713
2015-08-21 18:05:57 +00:00
Chris Bieneman 4268d39436 [CMake] Turns out CMake was passing the space as part of the argument instead of separating two arguments.
llvm-svn: 245624
2015-08-20 22:06:46 +00:00
Chris Bieneman 73107c6122 [CMake] [OS X] Don't require command line tools installations for running compiler-rt tests.
If you're on an Apple platform and /usr/include doesn't exist, we should set a sysroot flag when calling clang.

llvm-svn: 245581
2015-08-20 17:35:56 +00:00
Chris Bieneman 5eae197ab0 [CMake] Fix building unit tests on Darwin
Summary:
There are a number of issues with unit tests on Darwin. These patches address the following:
* Unit tests should be passed -arch (-m32/-m64 isn't sufficient)
* Unit tests should be passed ${DARWIN_osx_CFLAGS} because they're being built for OS X
* Test architectures should be filtered based on base system capabilities (i.e. don't try running x86_64h tests on pre-haswell hardware).

Reviewers: bogner, filcab, kubabrecka

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12174

llvm-svn: 245580
2015-08-20 17:32:06 +00:00
Filipe Cabecinhas 3e96367e60 [cmake darwin] Use a STATUS message type. Explain where the arches came from.
llvm-svn: 245453
2015-08-19 16:23:19 +00:00
Chris Bieneman 201d065259 [CMake] Refactoring add_compiler_rt functions for darwin runtimes.
Summary: This patch consolidates add_compiler_rt_osx_static_runtime and add_compiler_rt_darwin_dynamic_runtime into a single new function add_compiler_rt_darwin_runtime.

Reviewers: filcab, samsonov, bogner

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12106

llvm-svn: 245317
2015-08-18 17:32:18 +00:00
Chris Bieneman 361231ecd5 [CMake] Add experimental support for building compiler-rt for iOS
Summary:
This is a reunification of three separate reviews D11073, D11082, D11083.

Having them separate was not constructive even though the patches were smaller because it led to fragmented conversations, and this is really all about one change.

This patch incorporates feedback from samsonov, and refactors the hacky darwin code out of the root CMakeLists.txt and int config-ix.cmake.

Reviewers: zaks.anna, bogner, kubabrecka, chandlerc, samsonov

Subscribers: jevinskie, filcab, llvm-commits

Differential Revision: http://reviews.llvm.org/D11820

llvm-svn: 244948
2015-08-13 20:38:16 +00:00
Filipe Cabecinhas 2bbdbcb835 Fix typo.
llvm-svn: 244475
2015-08-10 18:26:29 +00:00
Alexey Samsonov 9e694e590c [CMake] One more attempt to fix PR24144.
This time, exclude ExternalProject from build using set_target_properties.

llvm-svn: 242444
2015-07-16 21:20:05 +00:00
Alexey Samsonov 70231d68dc [CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan by default "ninja install" command.
Summary:
Exclude external libc++ builds from "all" target, so that they are only
build on demand, and are not installed together with LLVM/Clang.

Reviewers: hans

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11252

llvm-svn: 242424
2015-07-16 17:53:01 +00:00
Filipe Cabecinhas 7af0a1cb84 CMake: Stop using LLVM's custom parse_arguments. NFC
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
2015-06-19 03:39:24 +00:00
Chris Bieneman 6bd006f31a [CMake] Cleanup add_compiler_rt_object_library to be platform-agnostic
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
2015-06-10 23:55:07 +00:00
Reid Kleckner aa9029691f Silence some CMake 3.3 dev warnings in compiler-rt
Fix a trivial instance of CMP0054 that came up on llvmdev.

The other warnings were CMP0057, which is about using the same file as a
MAIN_DEPENDENCY multiple times.  The old behavior hasn't been a problem
yet, so I silenced the warning and filed PR23595 to document the issue
if someone cares.

llvm-svn: 237808
2015-05-20 16:56:17 +00:00
Evgeniy Stepanov e8b9d791c2 [asan] Use a version script to limit the symbols exported by the ASan shared runtime library.
llvm-svn: 236551
2015-05-05 22:51:35 +00:00
Evgeniy Stepanov 91960900f8 Build ASan runtime library with -z global on Android.
llvm-svn: 236537
2015-05-05 20:13:39 +00:00
Yury Gribov 8e49b47e0a [ASan] Only include rpc headers if they are available.
Reviewed at http://reviews.llvm.org/D8698

llvm-svn: 234470
2015-04-09 08:06:49 +00:00
Reid Kleckner a1410321f6 Translate some MSVC CMAKE_*_FLAGS to clang flags in clang_compile
Passing MSVC-style cflags to the gcc-style clang driver will almost
always end badly. Just translate a couple of simple flags used by the
base CMake cflags like /D, /U, and /O.

llvm-svn: 232219
2015-03-13 21:39:29 +00:00
Timur Iskhodzhanov 23cfd6ecff [ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on Windows
llvm-svn: 226831
2015-01-22 14:54:22 +00:00