summaryrefslogtreecommitdiff
path: root/test/ubsan/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Fix the value of `config.target_cflags` for non-macOS Apple ↵Dan Liew2019-10-011-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms. Attempt #3. The main problem here is that `-*-version_min=` was not being passed to the compiler when building test cases. This can cause problems when testing on devices running older OSs because Clang would previously assume the minimum deployment target is the the latest OS in the SDK which could be much newer than what the device is running. Previously the generated value looked like this: `-arch arm64 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` With this change it now looks like: `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` This mirrors the setting of config.target_cflags on macOS. This change is made for ASan, LibFuzzer, TSan, and UBSan. To implement this a new `get_test_cflags_for_apple_platform()` function has been added that when given an Apple platform name and architecture returns a string containing the C compiler flags to use when building tests. This also calls a new helper function `is_valid_apple_platform()` that validates Apple platform names. This is the third attempt at landing the patch. The first attempt (r359305) had to be reverted (r359327) due to a buildbot failure. The problem was that calling `get_test_cflags_for_apple_platform()` can trigger a CMake error if the provided architecture is not supported by the current CMake configuration. Previously, this could be triggered by passing `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were generating test configurations for a list of architectures without checking if the relevant Sanitizer actually supported that architecture. We now intersect the list of architectures for an Apple platform with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to iterate through the correct list of architectures. The second attempt (r363633) had to be reverted (r363779) due to a build failure. The failed build was using a modified Apple toolchain where the iOS simulator SDK was missing. This exposed a bug in the existing UBSan test generation code where it was assumed that `COMPILER_RT_ENABLE_IOS` implied that the toolchain supported both iOS and the iOS simulator. This is not true. This has been fixed by using the list `SANITIZER_COMMON_SUPPORTED_OS` for the list of supported Apple platforms for UBSan. For consistency with the other Sanitizers we also now intersect the list of architectures with UBSAN_SUPPORTED_ARCH. rdar://problem/50124489 Differential Revision: https://reviews.llvm.org/D61242 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@373405 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable compiler-rt on SPARCRainer Orth2019-07-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward: - Add 32 and 64-bit sparc to compiler-rt - lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc) There's one issue of note: many asan tests fail to compile on Solaris/SPARC: fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported. Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc, which doesn't have the problem above and works just fine. With this patch, sparcv9-sun-solaris2.11 test results are pretty good: Failing Tests (9): Builtins-sparc-sunos :: divtc3_test.c Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c Builtins-sparcv9-sunos :: divtc3_test.c [...] UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal patches either currently in review or about to be submitted. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D40943 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@365880 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan][test] Don't disable ubsan testing on 64-bit Solaris/x86Rainer Orth2019-07-081-5/+4
| | | | | | | | | | | | Unlike asan, which isn't supported yet on 64-bit Solaris/x86, there's no reason to disable ubsan. This patch does that, but keeps the 64-bit ubsan-with-asan tests disabled. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63982 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@365302 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-271-4/+4
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@364591 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r363633 "[CMake] Fix the value of `config.target_cflags` for ↵Hans Wennborg2019-06-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-macOS Apple platforms. Attempt #2." This caused Chromium's clang package to stop building, see comment on https://reviews.llvm.org/D61242 for details. > Summary: > The main problem here is that `-*-version_min=` was not being passed to > the compiler when building test cases. This can cause problems when > testing on devices running older OSs because Clang would previously > assume the minimum deployment target is the the latest OS in the SDK > which could be much newer than what the device is running. > > Previously the generated value looked like this: > > `-arch arm64 -isysroot > <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` > > With this change it now looks like: > > `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot > <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` > > This mirrors the setting of `config.target_cflags` on macOS. > > This change is made for ASan, LibFuzzer, TSan, and UBSan. > > To implement this a new `get_test_cflags_for_apple_platform()` function > has been added that when given an Apple platform name and architecture > returns a string containing the C compiler flags to use when building > tests. This also calls a new helper function `is_valid_apple_platform()` > that validates Apple platform names. > > This is the second attempt at landing the patch. The first attempt (r359305) > had to be reverted (r359327) due to a buildbot failure. The problem was > that calling `get_test_cflags_for_apple_platform()` can trigger a CMake > error if the provided architecture is not supported by the current > CMake configuration. Previously, this could be triggered by passing > `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were > generating test configurations for a list of architectures without > checking if the relevant Sanitizer actually supported that architecture. > We now intersect the list of architectures for an Apple platform > with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer > name) to iterate through the correct list of architectures. > > rdar://problem/50124489 > > Reviewers: kubamracek, yln, vsk, juliehockett, phosek > > Subscribers: mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits > > Tags: #llvm, #sanitizers > > Differential Revision: https://reviews.llvm.org/D61242 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@363779 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fix the value of `config.target_cflags` for non-macOS Apple ↵Dan Liew2019-06-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms. Attempt #2. Summary: The main problem here is that `-*-version_min=` was not being passed to the compiler when building test cases. This can cause problems when testing on devices running older OSs because Clang would previously assume the minimum deployment target is the the latest OS in the SDK which could be much newer than what the device is running. Previously the generated value looked like this: `-arch arm64 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` With this change it now looks like: `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` This mirrors the setting of `config.target_cflags` on macOS. This change is made for ASan, LibFuzzer, TSan, and UBSan. To implement this a new `get_test_cflags_for_apple_platform()` function has been added that when given an Apple platform name and architecture returns a string containing the C compiler flags to use when building tests. This also calls a new helper function `is_valid_apple_platform()` that validates Apple platform names. This is the second attempt at landing the patch. The first attempt (r359305) had to be reverted (r359327) due to a buildbot failure. The problem was that calling `get_test_cflags_for_apple_platform()` can trigger a CMake error if the provided architecture is not supported by the current CMake configuration. Previously, this could be triggered by passing `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were generating test configurations for a list of architectures without checking if the relevant Sanitizer actually supported that architecture. We now intersect the list of architectures for an Apple platform with `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to iterate through the correct list of architectures. rdar://problem/50124489 Reviewers: kubamracek, yln, vsk, juliehockett, phosek Subscribers: mgorny, javed.absar, kristof.beyls, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61242 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@363633 91177308-0d34-0410-b5e6-96231b3b80d8
* mac: Make ubsan test config look more like asan test configNico Weber2019-05-291-4/+1
| | | | | | | | | | | | | | | | | | | | | | | In particular, don't call get_target_flags_for_arch() since that will cause an error in some situations: If DARWIN_iossim_ARCHS=i386;x86_64, DARWIN_osx_ARCHS=x86_64, and DARWIN_iossym_SYSROOT isn't set (due to the simulator sysroot not being available), then config-ix.cmake won't add i386 to COMPILER_RT_SUPPORTED_ARCH but ubsan's test/CMakeLists.txt would call get_target_flags_for_arch() with i386, which would then run into the error in get_target_flags_for_arch(). Having these conditions isn't ideal. The background here is that we configure our mac-hosted trunk bots all the same (so they all have the same DARWIN_*_archs, and we don't easily know if a mac host bot is targeting mac or ios at the place where we call cmake), but only the ios-targeting bots have ios sysroots available. This will hopefully unbreak that use case without impacting anything else -- and it makes ubsan and asan test setup more alike. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@362010 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake] Fix the value of `config.target_cflags` for non-macOS Apple"Dan Liew2019-04-261-5/+4
| | | | | | | | | | | | | | | | | | | | | This reverts commit 1bcdbd68616dc7f8debe126caafef7a7242a0e6b. It's been reported that some bots are failing with this change with CMake error like: ``` CMake Error at /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:177 (message): Unsupported architecture: arm64 Call Stack (most recent call first): /b/s/w/ir/k/llvm-project/compiler-rt/cmake/config-ix.cmake:216 (get_target_flags_for_arch) /b/s/w/ir/k/llvm-project/compiler-rt/test/tsan/CMakeLists.txt:78 (get_test_cflags_for_apple_platform) ``` I'm reverting the patch now to unbreak builds. I will investigate properly when time permits. rdar://problem/50124489 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359327 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fix the value of `config.target_cflags` for non-macOS AppleDan Liew2019-04-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platforms. The main problem here is that `-*-version_min=` was not being passed to the compiler when building test cases. This can cause problems when testing on devices running older OSs because Clang would previously assume the minimum deployment target is the the latest OS in the SDK which could be much newer than what the device is running. Previously the generated value looked like this: `-arch arm64 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` With this change it now looks like: `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk` This mirrors the setting of `config.target_cflags` on macOS. This change is made for ASan, LibFuzzer, TSan, and UBSan. To implement this a new `get_test_cflags_for_apple_platform()` function has been added that when given an Apple platform name and architecture returns a string containing the C compiler flags to use when building tests. This also calls a new helper function `is_valid_apple_platform()` that validates Apple platform names. rdar://problem/50124489 Differential Revision: https://reviews.llvm.org/D58578 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359305 91177308-0d34-0410-b5e6-96231b3b80d8
* [UBSan] Fix typo in CMake conditional that checked if the architectureDan Liew2018-09-191-1/+1
| | | | | | | | | | | | | | of a darwin platform was in the list of `UBSAN_SUPPORTED_ARCH`. This is a follow up to r341306. The typo meant that if an architecture was a prefix to another architecture in the list (e.g. `armv7` is a prefix of `armv7k`) then this would trigger a match which is not the intended behaviour. rdar://problem/41126835 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@342553 91177308-0d34-0410-b5e6-96231b3b80d8
* [UBSan] Add CMake and lit support for configuring and running UBSanDan Liew2018-09-031-0/+63
| | | | | | | | | | | | | tests for ios, watchos, tvos, and their simulator counterparts. This commit does not make the tests actually pass. This will be handled in later commits. rdar://problem/41126835 Differential Revision: https://reviews.llvm.org/D51270 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@341306 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274)Kamil Rytarowski2018-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch (on top of the previous two (https://reviews.llvm.org/D40898 and https://reviews.llvm.org/D40899) complete the compiler-rt side of the the Solaris sanitizer port. It contains the following sets of changes: * For the time being, the port is for 32-bit x86 only, so reject the various tests on x86_64. * When compiling as C++, <setjmp.h> resp. <iso/setjmp_iso.h> only declares _setjmp and _longjmp inside namespace std. * MAP_FILE is a Windows feature. While e.g. Linux <sys/mman.h> provides a no-op compat define, Solaris does not. * test/asan/TestCases/Posix/coverage.cc was initially failing like this: /vol/gcc/src/llvm/llvm/local/projects/compiler-rt/lib/sanitizer_common/scripts/sancov.py: 4 files merged; 2 PCs total rm: cannot remove '/var/gcc/llvm/local/projects/compiler-rt/test/asan/I386SunOSConfig/TestCases/Posix/Output/coverage': Invalid argument Further digging revealed that the rm was trying to remove the running test's working directory which failed as observed. cd'ing out of the dir before let the test pass. * Two tests needed a declaration of alloca. I've now copied the existing code from test/asan/TestCases/alloca_constant_size.cc, but it may be more profitable and maintainable to have a common testsuite header where such code is collected. * Similarly, Solaris' printf %p format doesn't include the leading 0x. * In test/asan/TestCases/malloc-no-intercept.c, I had to undef __EXTENSIONS__ (predefined by clang for no apparent reason) to avoid conflicting declarations for memalign. * test/ubsan/TestCases/Float/cast-overflow.cpp has different platform dependent ways to define BYTE_ORDER and friends. Why not just use __BYTE_ORDER__ and friends as predefined by clang and gcc? Patch by Rainer Orth. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, mgorny, krytarowski, fedor.sergeev, JDevlieghere, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40900 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@322635 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Re-commit: lit changes for lld testing, future lto testing.Roman Lebedev2017-12-011-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. The original attempt, r319525 was reverted in r319526 due to the failures in compiler-rt standalone builds. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319575 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[ubsan] lit changes for lld testing, future lto testing."Roman Lebedev2017-12-011-26/+7
| | | | | | | | | | | | | | | | | | | | | This reverts commit r319525. This change has introduced a problem with the Lit tests build for compiler-rt using Gold: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/6047/steps/test%20standalone%20compiler-rt/logs/stdio llvm-lit: /b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse config file '/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg', traceback: Traceback (most recent call last): File "/b/sanitizer-x86_64-linux/build/llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path exec(compile(data, path, 'exec'), cfg_globals, None) File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 37, in <module> if root.host_os not in ['Linux'] or not is_gold_linker_available(): File "/b/sanitizer-x86_64-linux/build/llvm/projects/compiler-rt/test/profile/Linux/lit.local.cfg", line 27, in is_gold_linker_available stderr = subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319529 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] lit changes for lld testing, future lto testing.Roman Lebedev2017-12-011-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319525 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Fix one more usage of append()Vedant Kumar2017-10-071-1/+1
| | | | | | | | | append() isn't available with some cmake versions, so I need to use a different construct. I missed this case in r315144. http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/39355 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315157 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Add a static runtime on DarwinVedant Kumar2017-10-071-0/+9
| | | | | | | | As a follow-up to r315142, this makes it possible to use ubsan with a static runtime on Darwin. I've also added a new StandaloneStatic testing configuration so the new setup can be tested. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315143 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Test ubsan and cfi on android.Evgeniy Stepanov2017-10-061-1/+1
| | | | | | | | | | | | | | | Summary: Enable check-cfi and check-ubsan on Android. Check-ubsan includes standalone and ubsan+asan, but not tsan or msan. Cross-dso cfi tests are disabled for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38608 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315105 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Add macOS minimum deployment target to all compiler invocations ↵Kuba Mracek2016-11-291-7/+1
| | | | | | | | | | | | in lit tests The Clang driver on macOS decides the deployment target based on various things, like your host OS version, the SDK version and some environment variables, which makes lit tests pass or fail based on your environment. Let's make sure we run all lit tests with `-mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}` (10.9 unless overriden). Differential Revision: https://reviews.llvm.org/D26929 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288186 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch is activating the build of Asan on Windows 64-bits.Etienne Bergeron2016-05-271-1/+5
| | | | | | | | | | | | | | | | | | | | It's fixing compilation errors. The runtime is not yet working. Missing features: OverrideFunction for x64 an equiv function for inline asm (atomic_compare_exchange_strong) shadow memory offset needs to be adjusted RoundUpToInstrBoundary for x64 They will be implemented by subsequent patches. Patch by Wei Wang. Differential revision: http://reviews.llvm.org/D20455 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271049 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake] Provide options for toggling on and off various runtime ↵Chris Bieneman2015-12-101-11/+3
| | | | | | | | libraries." This reverts r255170. This change caused a bunch of bot failures and needs to be revised. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255184 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Provide options for toggling on and off various runtime libraries.Chris Bieneman2015-12-091-3/+11
| | | | | | | | | | | | | | | Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255170 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Need to filter out test architectures on ubsan as well.Chris Bieneman2015-08-211-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245714 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer][MIPS] Add --target flag for MIPS32Sagar Thakur2015-05-191-0/+1
| | | | | | | | | | Without the --target flag, clang uses the mips64 triple which selects the n64 abi. We need to add --target=mips-linux-gnu, so that clang can select the correct abi for mips32r2. Reviewers: dsanders, kcc, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9249 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237675 91177308-0d34-0410-b5e6-96231b3b80d8
* [UBSan] Fix CMake rules for tests after r235954.Alexey Samsonov2015-04-281-3/+3
| | | | | | | Make sure we don't run tests under TSan and MSan if they are unavailable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235962 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow UBSan+MSan and UBSan+TSan combinations (Clang part).Alexey Samsonov2015-04-281-18/+23
| | | | | | | | Embed UBSan runtime into TSan and MSan runtimes in the same as we do in ASan. Extend UBSan test suite to also run tests for these combinations. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235954 91177308-0d34-0410-b5e6-96231b3b80d8
* [UBSan] Run all UBSan tests in 32-bit mode as well.Alexey Samsonov2015-02-261-12/+24
| | | | | | | We build and support UBSan on 32-bit platforms. We should run tests there as well. Fixes PR22683. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230662 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Determine which compiler-rt libraries are supported onAlexey Samsonov2014-08-081-1/+1
| | | | | | | | | a given platform in a top-level CMakeLists.txt to use it both in lib/ and in test/ subdirectories. Move architecture/platform checks to config-ix. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215247 91177308-0d34-0410-b5e6-96231b3b80d8
* light up sanitizers for ARM, take 2Greg Fitzgerald2014-05-291-6/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D3794 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209856 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "light up sanitizers for ARM"Greg Fitzgerald2014-05-291-9/+6
| | | | | | | | This commit broke the Windows build, where CMAKE_C_COMPILER can compile and link with -march=armv7-a but the just-built-clang cannot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209851 91177308-0d34-0410-b5e6-96231b3b80d8
* light up sanitizers for ARMGreg Fitzgerald2014-05-291-6/+9
| | | | | | | | | | | | You can expect the sanitizers to be built under any of the following conditions: 1) CMAKE_C_COMPILER is GCC built to cross-compile to ARM 2) CMAKE_C_COMPILER is Clang built to cross-compile to ARM (ARM is default target) 3) CMAKE_C_COMPILER is Clang and CMAKE_C_FLAGS contains -target and --sysroot Differential Revision: http://reviews.llvm.org/D3794 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209835 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] lit tests shouldn't depend on runtimes in standalone buildAlexey Samsonov2014-02-201-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201771 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify lit test configs for LSan and UBSan by using a generic configAlexey Samsonov2014-02-181-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201553 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.Alexey Samsonov2014-02-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201417 91177308-0d34-0410-b5e6-96231b3b80d8
* Move UBSan test suite under test/Alexey Samsonov2014-02-141-0/+19
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201401 91177308-0d34-0410-b5e6-96231b3b80d8