summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
Commit message (Collapse)AuthorAgeFilesLines
* builtins: enable builtins build for MSVCSaleem Abdulrasool2015-10-101-1/+1
| | | | | | Patch by Tee Hao Wei! llvm-svn: 249948
* [CMake] [macho_embedded] [builtins] Need to also drop the bswap builtins.Chris Bieneman2015-10-091-2/+0
| | | | llvm-svn: 249914
* [CMake] hand tuning the macho_embedded export lists to match the current ↵Chris Bieneman2015-10-092-2/+1
| | | | | | Xcode distribution. llvm-svn: 249912
* [CMake] Hand tuning the exclude lists for libclang_rt.10.4.aChris Bieneman2015-10-092-0/+131
| | | | llvm-svn: 249888
* Fix msan tests build.Evgeniy Stepanov2015-10-081-2/+4
| | | | | | | | | | CMake build rules listed -I flags for two different libc++ header locations which broke when libc++ headers started using include_next. Also change -I to -isystem to avoid compiler warning about include_next. llvm-svn: 249759
* New MSan mapping layout (compiler-rt part).Evgeniy Stepanov2015-10-082-1/+30
| | | | | | | | | | | | | | | | | | This is an implementation of https://github.com/google/sanitizers/issues/579 It has a number of advantages over the current mapping: * Works for non-PIE executables. * Does not require ASLR; as a consequence, debugging MSan programs in gdb no longer requires "set disable-randomization off". * Supports linux kernels >=4.1.2. * The code is marginally faster and smaller. This is an ABI break. We never really promised ABI stability, but this patch includes a courtesy escape hatch: a compile-time macro that reverts back to the old mapping layout. llvm-svn: 249754
* Revert "[lsan] [aarch64] Add support for AArch64"Evgeniy Stepanov2015-10-084-10/+4
| | | | | | | | | 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 llvm-svn: 249730
* Provide missing Internal{Alloc, Free} declarations for libbacktrace symbolizer.Alexey Samsonov2015-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Since r223145 we don't include sanitizer_allocator_internal.h into sanitizer_symbolizer.h, so we can have undefined reference to Internal{Alloc, Free} stuff into sanitizer_symbolizer_libbacktrace.cc under SANITIZER_CP_DEMANGLE macro. This patch simply includes appropriate header into sanitizer_symbolizer_libbacktrace.h to resolve the issue. Patch by Maxim Ostapenko! Reviewers: kcc, eugenis, samsonov Subscribers: llvm-commits, ygribov Differential Revision: http://reviews.llvm.org/D13429 llvm-svn: 249633
* Add ARM RTABI aliases for half-precision conversionsOliver Stannard2015-10-073-0/+6
| | | | | | | The ARM RTABI defines these functions as __aeabi_h2f, __aeabi_f2h and __aeabi_d2h, so we need aliases for them. llvm-svn: 249559
* builtins: fix buildSaleem Abdulrasool2015-10-071-1/+1
| | | | | | | __GNUC__ indicates the GNU compiler, not __GNU__. This got through due to building with clang rather than gcc. llvm-svn: 249516
* builtins: implement instrinics for clSaleem Abdulrasool2015-10-071-0/+28
| | | | | | | | | cl does not support the same intrinsics as clang. Provide implementations for the intrinsics using MSVC builtins. Patch by Tee Hao Wei! llvm-svn: 249515
* builtins: emulate _Complex for clSaleem Abdulrasool2015-10-077-54/+71
| | | | | | | | | cl does not support C99 completely as of VS2015. Emulate _Complex to allow building with MSVC. Patch by Tee Hao Wei! llvm-svn: 249514
* builtins: use MSVC intrinsics with clSaleem Abdulrasool2015-10-071-5/+52
| | | | | | | | Use MSVCRT functions for floating-point builtins unavailable on MSVC. Patch by Tee Hao Wei! llvm-svn: 249513
* [builtins] Enable building of the builtins library for MIPS targets.Vasileios Kalintiris2015-10-061-0/+5
| | | | | | | | | | Reviewers: howard.hinnant, samsonov Subscribers: samsonov, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13098 llvm-svn: 249382
* builtins: fix buildSaleem Abdulrasool2015-10-062-1/+2
| | | | | | | | Unfortunately, int_utils.h needs to depend on int_lib for the common macro definitions. However, currently, int_utils.h is included by int_lib.h. Reorder the inclusion to work around this. llvm-svn: 249376
* builtins: Use MSVC-equivalents of attributesSaleem Abdulrasool2015-10-064-9/+18
| | | | | | | | This allows us to build the builtins using MSVC. NFC. Patch by Tee Hao Wei! llvm-svn: 249375
* builtins: tweak constant spellingSaleem Abdulrasool2015-10-062-4/+4
| | | | | | | | Use 4294967296.f instead of 0x1p32f to fix MSVC. NFC. Patch by Tee Hao Wei! llvm-svn: 249374
* builtins: tweak Windows buildSaleem Abdulrasool2015-10-061-2/+2
| | | | | | | | Include Windows.h instead of winbase.h and windef.h Patch by Tee Hao Wei! llvm-svn: 249373
* [lsan] [aarch64] Add support for AArch64Adhemerval Zanella2015-10-054-4/+10
| | | | | | | | 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). llvm-svn: 249337
* [asan][mips] Fix ABI incompatibility crash in pthread_create() following ↵Daniel Sanders2015-10-051-0/+2
| | | | | | | | r248325. Like i386, Mips needs a versioned interceptor but must select GLIBC_2.2. llvm-svn: 249307
* [CMake] [builtins] [macho_embedded] Separate out the 64-bit thumb builtins ↵Chris Bieneman2015-10-012-10/+10
| | | | | | | | 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] [OS X] Adding all builtins that generate empty object ↵Chris Bieneman2015-10-013-0/+95
| | | | | | | | files for OS X to the exclude lists. This should help make the compiler-rt build less noisy. llvm-svn: 249070
* [CMake] [builtins] [iOS Sim] Adding all builtins that generate empty object ↵Chris Bieneman2015-10-013-0/+95
| | | | | | | | files for the iOS simulator to the exclude lists. This should help make the compiler-rt build less noisy. llvm-svn: 249068
* [CMake] [iOS] [builtins] Adding all builtins that generate empty object ↵Chris Bieneman2015-10-012-0/+164
| | | | | | | | files for iOS to the exclude lists. This should help make the compiler-rt build less noisy. llvm-svn: 249057
* [asan] Tweak gen_dynamic_list.py to work with both Py2 and Py3.Evgeniy Stepanov2015-10-011-1/+1
| | | | llvm-svn: 249051
* [asan] Tune down SizeClassAllocator tests.Evgeniy Stepanov2015-10-011-1/+1
| | | | | | | This should make the Android/x86 bot (running on a Nexus Player) less flaky. llvm-svn: 249044
* [compiler-rt] Fix build (again) by wrapping lines to 80 chars (NFC)Vedant Kumar2015-10-011-1/+2
| | | | llvm-svn: 248979
* [compiler-rt] Fix build by wrapping lines to 80 chars (NFC)Vedant Kumar2015-10-013-3/+6
| | | | llvm-svn: 248973
* [compiler-rt] Apply modernize-use-nullptr fixes in sanitizersVedant Kumar2015-10-0124-138/+152
| | | | | | | | | | | | | | | | | | - Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. - Add blank lines to separate function definitions. - Add 'extern "C"' or 'namespace foo' comments after the appropriate closing brackets This is a continuation of work from 409b7b82. The focus here is on the various sanitizers (not sanitizer_common, as before). Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13225 llvm-svn: 248966
* [sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar2015-09-3018-143/+153
| | | | | | | | | | | | - Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 llvm-svn: 248964
* [asan] Fix asan_symbolize.py handling of non-existing pathsEvgeniy Stepanov2015-09-301-2/+2
| | | | llvm-svn: 248962
* [CMake] [Darwin] Add and populate PROFILE_SUPPORTED_OS to enable building ↵Chris Bieneman2015-09-301-1/+1
| | | | | | libclang_rt.profile for iOS. llvm-svn: 248948
* [CMake] [Darwin] [builtins] Make CMake re-generate if the builtin filter ↵Chris Bieneman2015-09-293-0/+10
| | | | | | | | lists change. We need to make sure that if you change the builtin filter lists CMake re-generates its configurations so it includes the right builtins in the generated libraries. llvm-svn: 248852
* [CMake] [Darwin] Support building the macho_embedded builtin libraries.Chris Bieneman2015-09-295-0/+147
| | | | | | | | | | | | 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
* [CFI] Make CFI tests require UBSan (for diagnostic mode).Alexey Samsonov2015-09-291-1/+2
| | | | | | | CFI itself, on the other hand, doesn't require anything, including sanitizer_common. llvm-svn: 248830
* [msan] Early allocator initialization.Evgeniy Stepanov2015-09-293-9/+4
| | | | | | | Map MSan heap space early (in __msan_init) so that user code can not accidentally (i.e. w/o MAP_FIXED) create a conflicting mapping. llvm-svn: 248829
* [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in ↵Kostya Serebryany2015-09-2915-94/+104
| | | | | | lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko llvm-svn: 248816
* [CMake] [Darwin] [builtins] Exclude aeabi builtins from iOS arm32 ↵Chris Bieneman2015-09-282-0/+34
| | | | | | architectures since we don't support aeabi on iOS. llvm-svn: 248744
* builtins: silence GCC warningSaleem Abdulrasool2015-09-271-5/+5
| | | | | | | | | | | | | If the builtins are built with libgcc as the unwind provider on ARM, the exposed _Unwind_SetIP is a macro. This results in the following warning due to expansion of the argument: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] Add a no-op set of parenthesis around the argument that will prevent this warning. llvm-svn: 248686
* sanitizer: fix -pedantic warningsSaleem Abdulrasool2015-09-261-3/+3
| | | | | | Silence a few "warning: extra ';'" warnings from GCC. llvm-svn: 248653
* build: create two versions of ARM builtinsSaleem Abdulrasool2015-09-261-0/+1
| | | | | | | | | | | | | This adds a new name for ARM32 (armhf). We now force that the default build for ARM32 (arm) to be soft-float ABI. This has a corresponding clang change to look for these names based on the floating point ABI. The functions are built identically (the functions are marked as AAPCS, so the calling convention does not change, as per the RTABI specification), however, the object file contains attributes indicating the build configuration which the linker will ensure are not mix and matched. We now built the appropriate named archive so that we can link properly. llvm-svn: 248648
* [CMake] [builtins] Only include the atomic builtins if(APPLE).Chris Bieneman2015-09-231-6/+11
| | | | | | There are lingering issues building the atomic builtins with various versions of gcc. To unblock people we can only include them on Apple platforms where they are more tested. llvm-svn: 248386
* Code cleanup based on post-commit review from Aaron Ballman.Chris Bieneman2015-09-232-2/+0
| | | | llvm-svn: 248385
* [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for ↵Chris Bieneman2015-09-236-39/+269
| | | | | | | | | | | | | | | | | 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
* [builtins] Fixing broken bot building on linux with -WerrorChris Bieneman2015-09-222-2/+4
| | | | | | Returning a void expression is bad. llvm-svn: 248346
* [builtins] One more stab at fixing the bots.Chris Bieneman2015-09-226-0/+24
| | | | llvm-svn: 248330
* [builtins] Fixing atomic builtins to be compiled out if stdatomic.h isn't ↵Chris Bieneman2015-09-226-0/+24
| | | | | | | | | | available. This should fix the bots broken by r248322. Reviewed by bogner over my shoulder. llvm-svn: 248328
* [asan] Versioned interceptor for pthread_create.Evgeniy Stepanov2015-09-223-5/+19
| | | | | | | | | This fixes a crash in pthread_create on linux/i386 due to abi incompatibility between intercepted and non-intercepted functions. See the test case for more details. llvm-svn: 248325
* [CMake] Add atomic builtins to GENERIC_SOURCES list.Chris Bieneman2015-09-221-0/+6
| | | | | | | | | | Reviewers: bogner, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13069 llvm-svn: 248322
* Revert "ubsan: Implement memory permission validation for vtables."Evgeniy Stepanov2015-09-171-39/+0
| | | | | | | This reverts r247484 and two follow-up commits. Breaks ppc and x86_64 sanitizer bots. llvm-svn: 247921
OpenPOWER on IntegriCloud