summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Be consistent in the way we define 32/64-bit arches in ALL_*_SUPPORTED_ARCH ↵Vasileios Kalintiris2015-09-241-14/+19
| | | | | | | | | | | | variables. NFC. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13095 llvm-svn: 248514
* [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-232-12/+132
| | | | | | | | | | | | | | | | | 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
* [MSan] Enable MSAN for aarch64Adhemerval Zanella2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enabled msan for aarch64 with 39-bit VMA and 42-bit VMA. As defined by lib/msan/msan.h the memory layout used is for 39-bit is: 00 0000 0000 - 40 0000 0000: invalid 40 0000 0000 - 43 0000 0000: shadow 43 0000 0000 - 46 0000 0000: origin 46 0000 0000 - 55 0000 0000: invalid 55 0000 0000 - 56 0000 0000: app (low) 56 0000 0000 - 70 0000 0000: invalid 70 0000 0000 - 80 0000 0000: app (high) And for 42-bit VMA: 000 0000 0000 - 100 0000 0000: invalid 100 0000 0000 - 11b 0000 0000: shadow 11b 0000 0000 - 120 0000 0000: invalid 120 0000 0000 - 13b 0000 0000: origin 13b 0000 0000 - 2aa 0000 0000: invalid 2aa 0000 0000 - 2ab 0000 0000: app (low) 2ab 0000 0000 - 3f0 0000 0000: invalid 3f0 0000 0000 - 400 0000 0000: app (high) Most of tests are passing with exception of: * Linux/mallinfo.cc * chained_origin_limits.cc * dlerror.cc * param_tls_limit.cc * signal_stress_test.cc * nonnull-arg.cpp The 'Linux/mallinfo.cc' is due the fact AArch64 returns the sret in 'x8' instead of default first argument 'x1'. So a function prototype that aims to mimic (by using first argument as the return of function) won't work. For GCC one can make a register alias (register var asm ("r8")), but for clang it detects is an unused variable and generate wrong code. The 'chained_origin_limits' is probably due a wrong code generation, since it fails only when origin memory is used (-fsanitize-memory-track-origins=2) and only in the returned code (return buf[50]). The 'signal_streess_test' and 'nonnull-arg' are due currently missing variadic argument handling in memory sanitizer code instrumentation on LLVM side. Both 'dlerror' and 'param_tls_test' are unknown failures that require further investigation. All the failures are XFAIL for aarch64 for now. llvm-svn: 247809
* [CMake] Remove all uses of LLVM_NATIVE_ARCH.Alexey Samsonov2015-09-081-12/+9
| | | | | | | | | | | | | | | | Instead, assume we're going to target triple specified by COMPILER_RT_DEFAULT_TARGET_TRIPLE and build runtimes for this triple (and hope that the host compiler can target them). This will help users that use cross-compiler on their host to build Clang that would work on a different architecture. This will also come in handy if one would want to configure several compiler-rt build trees on the same host, using just-built Clang that can target many architectures. This doesn't change the behavior in the default build configuration. llvm-svn: 247099
* [CMake] Rename COMPILER_RT_TEST_TARGET_TRIPLE to more appropriate ↵Alexey Samsonov2015-09-081-8/+7
| | | | | | COMPILER_RT_DEFAULT_TARGET_TRIPLE. llvm-svn: 247094
* [CMake] Enable building builtins for iOS and iOS simulator.Chris Bieneman2015-08-311-0/+3
| | | | | | Building iOS does respect COMPILER_RT_ENABLE_IOS. llvm-svn: 246501
* [CMake] Fix building builtins on Linux and Darwin.Chris Bieneman2015-08-311-0/+5
| | | | | | | | | | | | | | | Summary: I broke building the builtins with r245967. This fixes them on Linux and builds them properly for Darwin. The old code could not be made to work on Darwin as a result of the refactoring of add_compiler_rt_runtime, so I had to rework the way they are built for Darwin. This solution is not ideal and will be fixed in subsequent commits. I just want to get this in so everything is working again. Reviewers: samsonov, chh, compnerd, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12500 llvm-svn: 246487
* [compiler-rt] [tsan] Enable TSan for AArch64/42-bit VMAAdhemerval Zanella2015-08-281-1/+1
| | | | | | | | | | | This patch adds support for tsan on aarch64-linux with 42-bit VMA (current default config for 64K pagesize kernels). The support is enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time for both clang/llvm and compiler-rt. The default VMA is 39 bits. It also enabled tsan for previous supported VMA (39). llvm-svn: 246330
* [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
* [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime ↵Chris Bieneman2015-08-251-70/+91
| | | | | | | | | | | | | | | | 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
* [CMake] Fixing haswell filtering.Chris Bieneman2015-08-211-2/+2
| | | | | | Turns out this wasn't working at all. llvm-svn: 245713
* [CMake] Turns out CMake was passing the space as part of the argument ↵Chris Bieneman2015-08-201-1/+1
| | | | | | instead of separating two arguments. llvm-svn: 245624
* [CMake] [OS X] Don't require command line tools installations for running ↵Chris Bieneman2015-08-201-1/+18
| | | | | | | | 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
* [CMake] Fix building unit tests on DarwinChris Bieneman2015-08-202-1/+30
| | | | | | | | | | | | | | | | 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
* [cmake darwin] Use a STATUS message type. Explain where the arches came from.Filipe Cabecinhas2015-08-191-1/+1
| | | | llvm-svn: 245453
* [CMake] Refactoring add_compiler_rt functions for darwin runtimes.Chris Bieneman2015-08-181-39/+37
| | | | | | | | | | | | 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
* [CMake] Add experimental support for building compiler-rt for iOSChris Bieneman2015-08-134-25/+279
| | | | | | | | | | | | | | | | | 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
* Fix typo.Filipe Cabecinhas2015-08-101-2/+2
| | | | llvm-svn: 244475
* [Compiler-RT] Disable TSAN on AArch64 temporarilyRenato Golin2015-08-071-1/+1
| | | | | | Until all problems with the buildbot can be identified and fixed. llvm-svn: 244324
* [tsan] Enable tsan for aarch64Adhemerval Zanella2015-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enabled TSAN for aarch64 with 39-bit VMA layout. As defined by tsan_platform.h the layout used is: 0000 4000 00 - 0200 0000 00: main binary 2000 0000 00 - 4000 0000 00: shadow memory 4000 0000 00 - 5000 0000 00: metainfo 5000 0000 00 - 6000 0000 00: - 6000 0000 00 - 6200 0000 00: traces 6200 0000 00 - 7d00 0000 00: - 7d00 0000 00 - 7e00 0000 00: heap 7e00 0000 00 - 7fff ffff ff: modules and main thread stack Which gives it about 8GB for main binary, 4GB for heap and 8GB for modules and main thread stack. Most of tests are passing, with the exception of: * ignore_lib0, ignore_lib1, ignore_lib3 due a kernel limitation for no support to make mmap page non-executable. * longjmp tests due missing specialized assembly routines. These tests are xfail for now. The only tsan issue still showing is: rtl/TsanRtlTest/Posix.ThreadLocalAccesses Which still required further investigation. The test is disable for aarch64 for now. llvm-svn: 244055
* [asan] Enable asan for aarch64Adhemerval Zanella2015-08-051-4/+1
| | | | | | | | | | | | | | | | This patch enables asan for aarch64/linux. It marks it as 'unstable-release', since some tests are failing due either kernel missing support of non-executable pages in mmap or environment instability (infinite loop in juno reference boards). It sets decorate_proc_maps test to require stable-release, since the test expects the shadow memory to not be executable and the support for aarch64 is only added recently by Linux (da141706aea52c1a9 - 4.0). It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call as a TLS optimization. llvm-svn: 244054
* [dfsan] Enable dfsan for aarch64Adhemerval Zanella2015-07-301-1/+1
| | | | | | | | | | | | | This patch enable DFSan for AArch64 (39-bit VMA). All tests are passing but: * test/dfsan/custom.cc Due an invalid access in dl_iterate_phdr instrumentation (commenting out this function make the testcase to pass). The test is XFAIL for aarch64 for now. llvm-svn: 243688
* Revert r243604, it (very likely) caused PR24312.Nico Weber2015-07-301-2/+1
| | | | llvm-svn: 243615
* [CMake] Pass -march=i686 when targeting i686 (PR24222)Hans Wennborg2015-07-301-1/+2
| | | | | | | | | | | | | | | | Clang will not define __i686__, even when the target triple is i686, without -march=i686. With this patch, the compiler-rt build will successfully detect that Clang can target i686. The open_memstream.cc test is a little funny. Before my patch, it was invoked with "-m32 -m64". To make it work after my -march change, I had to add '-march=x86-64'. Differential Revision: http://reviews.llvm.org/D11618 llvm-svn: 243604
* [CMake] Workaround for PR24222: don't fail if we can't target ↵Alexey Samsonov2015-07-241-1/+2
| | | | | | | | | | | | | | | | | | | COMPILER_RT_TEST_TARGET_TRIPLE unless it was explicitly set. Summary: Although we assume that we can always target host triple, relax this check to avoid failing at configure-time for cases when we are not able to correctly infer/verify host triple for some reasons. See http://llvm.org/bugs/show_bug.cgi?id=24222 for more details. Reviewers: hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11496 llvm-svn: 243170
* [asan] Only link liblog on Android when it exists.Evgeniy Stepanov2015-07-241-0/+1
| | | | | | With r242975, liblog is only used on certain older platforms. llvm-svn: 243139
* [asan] Enable build of asan-rt on android/aarch64.Evgeniy Stepanov2015-07-221-1/+4
| | | | llvm-svn: 242966
* [CMake] One more attempt to fix PR24144.Alexey Samsonov2015-07-161-2/+1
| | | | | | This time, exclude ExternalProject from build using set_target_properties. llvm-svn: 242444
* [CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan ↵Alexey Samsonov2015-07-161-0/+2
| | | | | | | | | | | | | | | | 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
* Re-apply r241217 with build fixes:Peter Collingbourne2015-07-021-4/+16
| | | | | | | - Disable building of the interceptor library on 64-bit Windows. - Mangle names in /alternatename directive for 32-bit Windows. llvm-svn: 241224
* Revert r241217, it breaks the build on Windows.Nico Weber2015-07-021-9/+4
| | | | llvm-svn: 241219
* ubsan: Port runtime library to (32- and 64-bit) Windows.Peter Collingbourne2015-07-021-4/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D10856 llvm-svn: 241217
* Revert part of r240623 (Enable memory sanitizer for PPC64) because theJay Foad2015-06-301-2/+1
| | | | | | buildbots are still failing in check-ubsan. llvm-svn: 241113
* Enable memory sanitizer for PPC64Jay Foad2015-06-251-1/+2
| | | | | | | | | | | | | | | | | | Summary: This patch adds basic memory sanitizer support for PPC64. PR23219. I have further patches ready to enable it in LLVM and Clang, and to fix most of the many failing tests in check-msan. Reviewers: kcc, willschm, samsonov, wschmidt, eugenis Reviewed By: eugenis Subscribers: wschmidt, llvm-commits Differential Revision: http://reviews.llvm.org/D10648 llvm-svn: 240623
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-194-26/+19
| | | | | | | | | | | | | | | | | | | | | 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
* Revert "Revert "[CMake] LSan is not actually available on Darwin.""Alexey Samsonov2015-06-191-1/+1
| | | | | | Re-land fixed version of r239955. llvm-svn: 240108
* Revert "[CMake] LSan is not actually available on Darwin."Justin Bogner2015-06-181-1/+1
| | | | | | | | | This change makes cmake fail to even run on Darwin with errors evaluating "$<TARGET_OBJECTS:RTInterception.x86_64>". This reverts r239955 llvm-svn: 239985
* [CMake] LSan is not actually available on Darwin.Alexey Samsonov2015-06-171-1/+1
| | | | llvm-svn: 239955
* SafeStack: Adjust condition for COMPILER_RT_HAS_SAFESTACK to fix sanitizer ↵Peter Collingbourne2015-06-161-1/+1
| | | | | | builds. llvm-svn: 239840
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-151-0/+9
| | | | | | | | | | | | | | | | | | | compiler-rt runtime support library This patch adds runtime support for the Safe Stack protection to compiler-rt (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of compiler-rt. The patch adds basic runtime support for the safe stack to compiler-rt that manages unsafe stack allocation/deallocation for each thread. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6096 llvm-svn: 239763
* [CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman2015-06-101-32/+39
| | | | | | | | | | | | | | | | | 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
* [asan] Disable asan for aarch64.Evgeniy Stepanov2015-06-081-1/+1
| | | | | | lib/Target/AArch64/AArch64FrameLowering.cpp:370: virtual void llvm::AArch64FrameLowering::emitPrologue(llvm::MachineFunction&, llvm::MachineBasicBlock&) const: Assertion `!(NeedsRealignment && NumBytes==0) && "NumBytes should never be 0 when realignment is needed"' failed. llvm-svn: 239352
* [asan] Enable AArch64 build of ASan runtime and tests.Evgeniy Stepanov2015-06-081-1/+1
| | | | llvm-svn: 239322
* Add descriptive names to sanitizer entries in /proc/self/maps. Helps debugging.Evgeniy Stepanov2015-05-291-0/+1
| | | | | | | | | | | | | | | | | | This is done by creating a named shared memory region, unlinking it and setting up a private (i.e. copy-on-write) mapping of that instead of a regular anonymous mapping. I've experimented with regular (sparse) files, but they can not be scaled to the size of MSan shadow mapping, at least on Linux/X86_64 and ext3 fs. Controlled by a common flag, decorate_proc_maps, disabled by default. This patch has a few shortcomings: * not all mappings are annotated, especially in TSan. * our handling of memset() of shadow via mmap() puts small anonymous mappings inside larger named mappings, which looks ugly and can, in theory, hit the mapping number limit. llvm-svn: 238621
OpenPOWER on IntegriCloud