summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2017-08-26Automatically pick up new sanitizers in cmake.Evgeniy Stepanov
Change the default of COMPILER_RT_SANITIZERS_TO_BUILD to "all" in order to automatically pick up new sanitizers in existing build trees. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25Revert "Add Clang dependency to the check for Clang C++ headers."Adrian Prantl
This temporarily reverts commit r311733, because of bot breakage. http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/38139/consoleFull#-256426522e9a0fee5-ebcc-4238-a641-c5aa112c323e git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311757 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24Add Clang dependency to the check for Clang C++ headers.George Karpenkov
The problem is that CMake is mostly imperative and the result of processing "if (TARGET blah)" checks depends on the order of import of CMake files. In this case, "projects" folder is registered before "tools", and calling "CheckClangHeaders" [renamed to have a better name] errors out without even giving Clang a chance to be built. This, in turn, leads to libFuzzer bot failures in some circumstances on some machines (depends on whether LIT or UNIT tests are scheduled first). Differential Revision: https://reviews.llvm.org/D37126 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311733 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-22[libFuzzer] Move check for thread_local back into libFuzzer's CMake,George Karpenkov
as it breaks builtin standalone build on some bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311482 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21Move libFuzzer to compiler_rt.George Karpenkov
Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21[NFC CMake] Do not relink test targets every time in compiler-rtGeorge Karpenkov
CMake's add_custom_target is considered to be *always* out of date. This patch changes it to a combination of add_custom_target and add_custom_command which actually tracks dependencies' timestamps. On my machine this reliably saves 6-7 seconds on each test group. This can be a large difference when debugging small tests. Differential Revision: https://reviews.llvm.org/D36912 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311384 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15Quickfix to the refactoring commit: typo in the link flags variableGeorge Karpenkov
name. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[sanitizers CMake] NFC Refactor the logic for compiling and generating testsGeorge Karpenkov
into a function. Most CMake configuration under compiler-rt/lib/*/tests have almost-the-same-but-not-quite functions of the form add_X_[unit]tests for compiling and running the tests. Much of the logic is duplicated with minor variations across different sub-folders. This can harm productivity for multiple reasons: For newcomers, resulting CMake files are very large, hard to understand, and hide the intention of the code. Changes for enabling certain architectures end up being unnecessarily large, as they get duplicated across multiple folders. Adding new sub-projects requires more effort than it should, as a developer has to again copy-n-paste the configuration, and it's not even clear from which sub-project it should be copy-n-pasted. With this change the logic of compile-and-generate-a-set-of-tests is extracted into a function, which hopefully makes writing and reading CMake much easier. Differential Revision: https://reviews.llvm.org/D36116 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310971 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[CMake compiler-rt] NFC: Minor CMake refactoring.George Karpenkov
Detect ObjC files in `clang_compile` and pass an appropriate flag to a compiler, also change `clang_compile` to a function. Differential Revision: https://reviews.llvm.org/D36727 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[compiler-rt CMake] NFC: Minor CMake refactoring.George Karpenkov
Change macro to a function, and use a generic variable instead of branching for handling multi-output build with CMAKE_CONFIGURATION_TYPES. Differential Revision: https://reviews.llvm.org/D36725 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[compiler-rt CMake] CMake refactoring: create directories in helper func.George Karpenkov
Change macro to a function, move creating test directory into `add_compiler_rt_test`. Differential Revision: https://reviews.llvm.org/D36724 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15Revert: Enable profile on NetBSDKamil Rytarowski
Requested by V.Kumar. Not all tests pass. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310912 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-13Enable profile on NetBSDKamil Rytarowski
Summary: make check-profile: Failing Tests (2): Profile-i386 :: instrprof-dlopen.test Profile-x86_64 :: instrprof-dlopen.test Expected Passes : 64 Unsupported Tests : 42 Unexpected Failures: 2 Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, filcab, fjricci Reviewed By: vitalybuka Subscribers: vsk, llvm-commits, srhines, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36603 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310800 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-10Enable ASAN on NetBSDKamil Rytarowski
Summary: This enables also static runtime option. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, filcab, kcc, fjricci Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36490 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-10Enable SafeStack on NetBSDKamil Rytarowski
Summary: make check-safestack: -- Testing: 8 tests, 8 threads -- Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 0.44s Expected Passes : 7 Unsupported Tests : 1 Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, fjricci, filcab Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36542 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08Enable ubsan on NetBSDKamil Rytarowski
Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, filcab, fjricci Reviewed By: fjricci Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36483 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310412 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08Enable COMPILER_RT_HAS_SANITIZER_COMMON on NetBSDKamil Rytarowski
Summary: Temporarily keep disabled COMPILER_RT_HAS_ASAN on NetBSD. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, filcab, kcc, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36312 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310370 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[sanitizer_common] Fuchsia OS support codeVitaly Buka
Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: cryptoad, srhines, kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36031 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309756 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[ubsan] Enable UBSan build for FuchsiaVitaly Buka
Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: srhines, kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36033 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309742 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01Revert rL309634 until upstream buildbots have upgraded libc.Sterling Augustine
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309704 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31[sanitizer] Fix the sanitizer build on AndroidPetr Hosek
Android uses libgcc name even for shared library unlike other platforms which use libgcc_s. Furthemore, Android libstdc++ has a dependency on libdl. These need to be handled while performing CMake checks. Differential Revision: https://reviews.llvm.org/D36035 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309638 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31Add powerpc64 to compiler-rt build infrastructure.Sterling Augustine
Summary: Add powerpc64 to compiler-rt build infrastructure. Reviewers: timshen Reviewed By: timshen Subscribers: nemanjai, dberris, mgorny, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D36108 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309634 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[sanitizer tests CMake] Factor out CMake logic for compiling sanitizer testsGeorge Karpenkov
Currently there's a large amount of CMake logic duplication for compiling sanitizer tests. If we add more sanitizers, the duplication will get even worse. This change factors out common compilation commands into a macro available to all sanitizers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309405 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28Support compiler-rt builtinsPetr Hosek
This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309361 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[sanitizers] Sanitizer tests CMake clean up: try #2George Karpenkov
This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309341 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27Revert "[sanitizers] Sanitizer tests CMake clean up"George Karpenkov
This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a. Fails on some bots, reverting until I can fix it. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309318 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27[sanitizers] Sanitizer tests CMake clean upGeorge Karpenkov
This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26Revert "[sanitizer] Support compiler-rt builtins"Petr Hosek
This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25[sanitizer] Support compiler-rt builtinsPetr Hosek
This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12On Darwin, start building the TSan iOS dylib by default.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307839 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12On Darwin, start building the TSan dylib for the iOS simulator.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12Fix the declaration of DARWIN_PREFER_PUBLIC_SDK cmake variable (move before ↵Kuba Mracek
the return). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307815 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07[cmake] Cache results of find_darwin_sdk_dirKuba Mracek
This improves find_darwin_sdk_dir to cache the results of executing xcodebuild to find the SDK. Should significantly reduce the CMake re-configure time. Differential Revision: https://reviews.llvm.org/D34736 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307344 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06[cmake] Add an option to prefer public SDK in find_darwin_sdk_dirKuba Mracek
Adds a CMake option DARWIN_PREFER_PUBLIC_SDK, off by default. When on, this prefers to use the public SDK, even when an internal one is present. With this, it's easy to emulate a build that the public buildbots are doing. Differential Revision: https://reviews.llvm.org/D35071 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-19[scudo] Enabling MIPS support for ScudoSagar Thakur
Adding MIPS 32-bit and 64-bit support for Scudo. Reviewed by cryptoad, sdardis. Differential: D31803 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305682 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24Allow builds to set COMPILER_RT_OS_DIR differently from CMAKE_SYSTEM_NAMEJonathan Roelofs
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24Allow armv{7,7s,7k,7m,7em} buildsJonathan Roelofs
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12Enable lsan test suite on Darwin x86_64 buildsFrancis Ricci
Reviewers: kubamracek, alekseyshl Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D32191 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302904 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02Roll back r301831 to fix broken powerpc64le tests.Sterling Augustine
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/5941 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01Add powerpc64 and powerpc64le to build infrastructure.Sterling Augustine
From Phab D32031. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301831 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[asan] Add support for running lit tests in the iOS SimulatorKuba Mracek
This patch adds a basic support for running the ASan lit test suite against an iOS Simulator. This is done by generating more lit.site.cfg configurations into subdirectories such as IOSSimI386Config and IOSSimX86_64Config. These test suites are not added into "check-all" or into "check-asan", they have to be run manually. Differential Revision: https://reviews.llvm.org/D31477 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301443 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24Revert [scudo] Enabling MIPS support for ScudoSagar Thakur
This patch broke the buildbot clang-cmake-mips. Investigating the issue. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301173 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[scudo] Enabling MIPS support for ScudoSagar Thakur
Adding MIPS 32-bit and 64-bit support for Scudo. Reviewed by cryptoad Differential: D31803 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301158 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21Revert "Enable lsan test suite on Darwin x86_64 builds"Ahmed Bougacha
This reverts commit r300897. Most LSan/ASan tests are failing on darwin bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20Enable lsan test suite on Darwin x86_64 buildsFrancis Ricci
Reviewers: kubamracek, alekseyshl Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D32191 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300897 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11Reapply "Enable LSan for arm Linux"Maxim Ostapenko
This patch reapplies r299923 with typo fixed in BLX macros. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299948 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11Revert r299923, it doesn't build in bootstrap builds.Nico Weber
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_linux.cc.o lib/sanitizer_common/sanitizer_linux.cc:1340:24: error: invalid instruction BLX(ip) ^ lib/sanitizer_common/sanitizer_linux.cc:1313:19: note: expanded from macro 'BLX' # define BLX(R) "mov lr, pc; bx" #R "\n" ^ <inline asm>:6:13: note: instantiated into assembly here mov lr, pc; bxip ^~~~ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11[lsan] Enable LSan for arm LinuxMaxim Ostapenko
This patch enables LSan for arm Linux. Differential Revision: https://reviews.llvm.org/D29586 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299923 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06Enable builds of darwin lsan by defaultFrancis Ricci
Summary: Testing and asan leak detection are disabled by default. Reviewers: kubamracek, kcc Subscribers: srhines, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31307 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299669 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-28Enable i386 builds for darwin lsanFrancis Ricci
Summary: Now that __thread is no longer used for lsan on darwin, i386 builds can be enabled. Reviewers: kcc, kubamracek Subscribers: danalbert, srhines, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29995 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298946 91177308-0d34-0410-b5e6-96231b3b80d8