summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2015-07-30[dfsan] Enable dfsan for aarch64Adhemerval Zanella
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243688 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30Revert r243604, it (very likely) caused PR24312.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243615 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30[CMake] Pass -march=i686 when targeting i686 (PR24222)Hans Wennborg
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243604 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-24[CMake] Workaround for PR24222: don't fail if we can't target ↵Alexey Samsonov
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-24[asan] Only link liblog on Android when it exists.Evgeniy Stepanov
With r242975, liblog is only used on certain older platforms. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243139 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22[asan] Enable build of asan-rt on android/aarch64.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16[CMake] One more attempt to fix PR24144.Alexey Samsonov
This time, exclude ExternalProject from build using set_target_properties. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242444 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16[CMake] Workaround for PR24144: avoid installing libcxx_tsan and libcxx_msan ↵Alexey Samsonov
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242424 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02Re-apply r241217 with build fixes:Peter Collingbourne
- Disable building of the interceptor library on 64-bit Windows. - Mangle names in /alternatename directive for 32-bit Windows. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241224 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02Revert r241217, it breaks the build on Windows.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02ubsan: Port runtime library to (32- and 64-bit) Windows.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D10856 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-30Revert part of r240623 (Enable memory sanitizer for PPC64) because theJay Foad
buildbots are still failing in check-ubsan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-25Enable memory sanitizer for PPC64Jay Foad
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240623 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19Revert "Revert "[CMake] LSan is not actually available on Darwin.""Alexey Samsonov
Re-land fixed version of r239955. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18Revert "[CMake] LSan is not actually available on Darwin."Justin Bogner
This change makes cmake fail to even run on Darwin with errors evaluating "$<TARGET_OBJECTS:RTInterception.x86_64>". This reverts r239955 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239985 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-17[CMake] LSan is not actually available on Darwin.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239955 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-16SafeStack: Adjust condition for COMPILER_RT_HAS_SAFESTACK to fix sanitizer ↵Peter Collingbourne
builds. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-15Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-10[CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239498 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08[asan] Disable asan for aarch64.Evgeniy Stepanov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239352 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-08[asan] Enable AArch64 build of ASan runtime and tests.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239322 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29Add descriptive names to sanitizer entries in /proc/self/maps. Helps debugging.Evgeniy Stepanov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238621 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-20Silence some CMake 3.3 dev warnings in compiler-rtReid Kleckner
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-19[sanitizer][MIPS] Add --target flag for MIPS32Sagar Thakur
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
2015-05-05[asan] Use a version script to limit the symbols exported by the ASan shared ↵Evgeniy Stepanov
runtime library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-05Build ASan runtime library with -z global on Android.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236537 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20[mips] Support building compiler-rt with gcc.Daniel Sanders
Summary: This will allow us to enable it on the buildbot (and then enable a sanitizer buildbot). The problem is that gcc for Mips does not accept -m32/-m64 like clang does. We therefore need to use the nearest equivalent -mips32r2/-mips64r2. We must also specify -mabi=64 in the -mips64r2 case since gcc's default ABI has traditionally been N32 whereas clang's is N64. Reviewers: sagar Reviewed By: sagar Subscribers: llvm-commits, samsonov, kcc, mohit.bhakkad, Anand.Takale, sagar Differential Revision: http://reviews.llvm.org/D8892 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17test commitSagar Thakur
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235176 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-10[sanitizer][MIPS] Fix warnings on MIPSDmitry Vyukov
Fixed: - stack frame size warning. - msse3 flag unused warning. - GoTsanRuntimeCheck dependency warning reported by cmake. Change by Sagar Thakur Reviewed in http://reviews.llvm.org/D8963 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234579 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09[ASan] Only include rpc headers if they are available.Yury Gribov
Reviewed at http://reviews.llvm.org/D8698 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234470 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01[UBSan] Embed UBSan into ASan runtime (compiler-rt part).Alexey Samsonov
Summary: Change the way we use ASan and UBSan together. Instead of keeping two separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on a platform, all UBSan sources are just compiled into dummy empty object files. UBSan initialization code (e.g. flag parsing) is directly called from ASan initialization, so we are able to enforce correct initialization order. This mirrors the approach we already use for ASan+LSan. This change doesn't modify the way we use standalone UBSan. Test Plan: regression test suite Reviewers: kubabrecka, zaks.anna, rsmith, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8646 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233861 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01[PPC64]This activates UBSan for the power architecture.Bill Seurer
One test case is updated to allow for differences between power and other architectures in behavior when returning from main in certain instances http://reviews.llvm.org/D8743 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25[LSan] Don't explicitly exclude LSan from Windows build - it should just ↵Alexey Samsonov
produce dummy object files. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233231 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-13Translate some MSVC CMAKE_*_FLAGS to clang flags in clang_compileReid Kleckner
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27[CMake] Effectively revert r230683.Alexey Samsonov
Clang in 32-bit mode may choose to target different architecture than host compiler. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230709 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26[CMake] Make sure we built one variant of i386/i686 runtime libraries.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230683 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25[CMake] Properly detect whether we're building runtime for i386 or i686.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230569 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20[TSan][MIPS] Adding support for MIPS64Mohit K. Bhakkad
Patch by Sagar Thakur Reviewers: dvyukov, samsonov, petarj, kcc, dsanders. Subscribers: mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D6291 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229972 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-19[LSan] [MIPS] adding support of LSan for mips64/mips64el archMohit K. Bhakkad
Patch by Sagar Thakur Reviewers: petarj, earthdok, kcc. Subscribers: samsonov, dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7013 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18Revert "Enable ASAN build and test on AArch64"Renato Golin
This reverts commit r229665. It seems that the AArch64 ASAN tests, that pass on all our internal machines, doesn't like the public buildbot. Turning this off until we can investigate the public bot for a better understanding. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229739 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18Enable ASAN build and test on AArch64Renato Golin
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229665 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10[CMake] PowerPC: detect host endianness to build corresponding version of ↵Alexey Samsonov
runtimes. Prior to this change we built two identical runtimes, named "powerpc64" and "powerpc64le", while their actual endianness matched the host endianness. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228650 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03Revert "Enabling testing ASAN on AArch64"Renato Golin
This reverts commit r227966, which turned ASAN on on AArhc64 and may be the cause of the bots never finishing the check-all. I'll re-apply once we're sure that bot can cope with it. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03[ASan] Run tests with both static and dynamic runtime on Windows by default.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228001 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03Enabling testing ASAN on AArch64Renato Golin
Also, disabling BuiltinLongJmpTest, as it fails for ARM and PPC as well. Patch by Christophe Lyon. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02[TSan] Build runtime with -msse3 flag.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227850 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-29[CMake] Get rid of TARGET_64_BIT_CFLAGS: explicitly list required flags for ↵Alexey Samsonov
each architecture. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on WindowsTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21Much spelling. Wow.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226638 91177308-0d34-0410-b5e6-96231b3b80d8