summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
...
* [compiler-rt] Allow c++ abi to be explictly disabled in cmake configurationFrancis Ricci2016-08-161-11/+13
| | | | | | | | | | | | Summary: This will allow for the sanitizers to be used when c++ abi is unavailable. Reviewers: samsonov, beanz, pcc, rnk Subscribers: llvm-commits, kubabrecka, compnerd, dberris Differential Revision: https://reviews.llvm.org/D23376 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278848 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake ↵Francis Ricci2016-08-161-13/+11
| | | | | | | | configuration" This reverts commit cd5fa595648378f38cdad8b07e18433639c28a9c. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278800 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Allow c++ abi to be explictly disabled in cmake configurationFrancis Ricci2016-08-161-11/+13
| | | | | | | | | | | | Summary: This will allow for the sanitizers to be used when c++ abi is unavailable. Reviewers: samsonov, beanz, pcc, rnk Subscribers: llvm-commits, kubabrecka, compnerd, dberris Differential Revision: https://reviews.llvm.org/D23376 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278772 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake ↵Francis Ricci2016-08-161-13/+11
| | | | | | | | configuration" This reverts commit 9528d86531b1289600e18c407b8e992d7fedb94f. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278769 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Allow c++ abi to be explictly disabled in cmake configurationFrancis Ricci2016-08-161-11/+13
| | | | | | | | | | | | Summary: This will allow for the sanitizers to be used when c++ abi is unavailable. Reviewers: samsonov, beanz, pcc, rnk Subscribers: llvm-commits, kubabrecka, compnerd, dberris Differential Revision: https://reviews.llvm.org/D23376 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278764 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt][XRay] Default COMPILER_RT_BUILD_XRAY to ONDean Michael Berris2016-08-081-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277975 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake] Pass -nostdlib if supported"Jonas Hahnfeld2016-08-021-2/+0
| | | | | | This reverts commit r277419. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277420 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Pass -nostdlib if supportedJonas Hahnfeld2016-08-021-0/+2
| | | | | | | | The sanitizers use C++ but don't require linking with the library. Differential Revision: https://reviews.llvm.org/D23005 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277419 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Load LLVMConfig for standalone build of builtinsJonas Hahnfeld2016-08-021-49/+3
| | | | | | | | Therefore move some code into reusable macros. Differential Revision: https://reviews.llvm.org/D22866 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277418 91177308-0d34-0410-b5e6-96231b3b80d8
* [winasan] Try to fix LNK4099 warnings seen by usersReid Kleckner2016-08-021-2/+8
| | | | | | | | | /Zi creates a separate PDB that we're supposed to pass along with our sanitizer libraries, but the object library compilation rules aren't set up to handle that. Rather than set that up, put the debug info in the object files the way every other platform does it with /Z7. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277406 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Default COMPILER_RT_BUILD_XRAY=ON"Dean Michael Berris2016-07-271-1/+3
| | | | | | | | | This reverts commit 23240d8de38c79220a888f645a1f4b686bfb87c6. Broke the build because the build bots haven't gotten the latest config from zorg yet. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276847 91177308-0d34-0410-b5e6-96231b3b80d8
* Default COMPILER_RT_BUILD_XRAY=ONDean Michael Berris2016-07-271-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276845 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable thread safe statics in clang-cl, they call the CRTReid Kleckner2016-07-211-1/+1
| | | | | | Also remove the needless static that was using them. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276327 91177308-0d34-0410-b5e6-96231b3b80d8
* Default XRay building to OFF to let build bots that do not support building ↵Dean Michael Berris2016-07-211-1/+3
| | | | | | sanitizers to disable explicitly too git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276255 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt][XRay] re-submitting r276117, with fixes for build breakage due ↵Dean Michael Berris2016-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | to extraneous and missing dependencies and attempts to build on unsupported OSes Summary: This is a fixed-up version of D21612, to address failure identified post-commit. Original commit description: This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting). Fixes include: - Gating XRay build to only Linux x86_64 and with the right dependencies in case it is the only library being built - Including <cstddef> to fix std::size_t issue Reviewers: kcc, rnk, echristo Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D22611 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276251 91177308-0d34-0410-b5e6-96231b3b80d8
* [xray] Only build xray on Linux for nowReid Kleckner2016-07-201-2/+0
| | | | | | | | | | | Should fix the Windows buildbots, and maybe some other non-Linux Unix bots too. XRay currently depends on sanitizer_common, so associate it with the "build sanitizers" option and remove the option for separately controlling the XRay build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276124 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] [XRay] Basic initialization and flag definition for XRay runtimeDean Michael Berris2016-07-201-0/+2
| | | | | | | | | | | | | | | Summary: This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting). Depends on D19904 Reviewers: echristo, kcc, rnk Subscribers: rnk, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D21612 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276117 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Check for androidabi in CMakeLists.txt not base-config-ix.cmakeChris Bieneman2016-06-271-0/+3
| | | | | | COMPILER_RT_DEFAULT_TARGET_ABI is not set in base-config-ix.cmake, so we need to move this check into CMakeLists.txt. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273957 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Parse the triple in base-config-ix to propagate ANDROID variable ↵Chris Bieneman2016-06-271-0/+12
| | | | | | | | | | | correctly" This reverts commit r273914. This commit broke bots building compiler-rt using LLVM_BUILD_EXTERNAL_COMPILER_RT. See: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/22221/console git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273956 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse the triple in base-config-ix to propagate ANDROID variable correctlySumanth Gundapaneni2016-06-271-12/+0
| | | | | | | | | | | | The triple must be parsed in base-config-ix.cmake. Otherwise, the cmake variable ANDROID won't be set and this will confuse cmake to build unsupported targets targeted for android. Diferential revision: http://reviews.llvm.org/D21474 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273914 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] NFC. An unset variable evaluates to false, so this else is unneededChris Bieneman2016-06-211-2/+0
| | | | | | This change is mostly to enable me to do some experimentation with building runtime libraries (See: D20992). It is harmless because unset variables evaluate to false in conditional expressions. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273320 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off -Wunused-parameter when building compiler-rt with clang on Windows, ↵Reid Kleckner2016-06-171-0/+3
| | | | | | | | it is very noisy It is turned on as part of "clang-cl /W4", which enables -Wextra. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273028 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some warnings in the MSVC buildReid Kleckner2016-06-171-1/+8
| | | | | | | | | - Fixes warnings about the ignored -fms-compatibility-version flag. - Fixes warnings about overriding /W4 with /W3 and back. - Fixes a warning where PREFETCH() expanded to nothing in a braceless if block. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273021 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleanup CMake version checking for 2.8.12Chris Bieneman2016-06-091-21/+1
| | | | | | | | Now that we're on CMake 3.4.3 this stuff isn't needed anymore. The cmake_2_8_12_* variables were unused in Compiler-RT, and the policies being set to NEW are all NEW by default now. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272313 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build failure with cmake version bumpXinliang David Li2016-06-021-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271582 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update to requiring CMake 3.4.3Chris Bieneman2016-05-311-10/+1
| | | | | | | | | | | | | | Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20824 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271327 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Don't use -fomit-frame-pointer in COMPILER_RT_DEBUG=On buildsKuba Brecka2016-05-221-1/+3
| | | | | | | | | | Using -fomit-frame-pointer sometimes makes a crash log miss some frames. Let's not use this optimization in debug builds. Differential Revision: http://reviews.llvm.org/D20425 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270376 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support platform building builtins without a full toolchainChris Bieneman2016-05-091-66/+8
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for building lib/builtins without a fully functioning toolchain. It allows you to bootstrap a cross-compiler, which previously couldn't be done with CMake. This patch contains the following specific changes: * Split builtin-specific code out of config-ix.cmake into builtin-config-ix.cmake * Split some common CMake functionality needed by both builtins and sanitizers into base-config-ix.cmake * Made lib/builtins/CMakeLists.txt able to be a top-level CMake configuration I have tested this on Darwin targeting embedded Darwin, and on FreeBSD x86_64 targeting FreeBSD AArch64. This patch depends on http://reviews.llvm.org/D19692, and is the last part of http://reviews.llvm.org/D16653. Reviewers: samsonov, iains, jroelofs Subscribers: compnerd, aemerson, tberghammer, danalbert, srhines, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D19742 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268977 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Disable thread-safe static initilization with VS 2015Reid Kleckner2016-03-211-0/+6
| | | | | | | | ASan interceptors contain local statics which run before the CRT is initialized. Thread-safe statics appear to rely on CRT-internal state, and will crash without this flag. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263979 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fix a really simple, silly bug from r261797Chris Bieneman2016-02-241-1/+1
| | | | | | This should fix bots with CMake older than 2.8.12. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261801 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Default CMAKE_MACOSX_RPATH to On, this is the default with CMP0042Chris Bieneman2016-02-241-0/+6
| | | | | | | | | | | | Summary: Building the sanitizer libraries without rpaths causes all sorts of problems when you try to use them. This simple fix should make it all work. Reviewers: samsonov, zaks.anna Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17556 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261797 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add partial support for MSVC in compiler-rt builtins, by Roman Shirokiy.Andrey Turetskiy2016-02-201-0/+2
| | | | | | | | | | This enables MSVC build of complex number arithmetic compiler-rt builtins. Differential Revision: http://reviews.llvm.org/D17452 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261432 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the libdir suffix for LLVM_CMAKE_PATHNiels Ole Salscheider2016-02-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259841 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-1/+1
| | | | | | This fixes the build after moving LLVM's CMake files in r259821. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259832 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] add_custom_libcxx should pass LLVM_PATH and a C++ compilerDaniel Sanders2016-02-021-0/+3
| | | | | | | | | | Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16681 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259493 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Stop thinking we can rely on C++ ABI knowledge on WindowsReid Kleckner2016-02-011-0/+2
| | | | | | | | | | We already disabled various tests relying on C++ ABI knowledge, but we still tried to build in this configuration on Windows which was a mistake. Fixes PR26415. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259388 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support externalizing debug info on DarwinChris Bieneman2015-12-031-0/+2
| | | | | | | | * Adds COMPILER_RT_EXTERNALIZE_DEBUGINFO option * On Darwin this results in calling dsymutil and strip after linking * This generates an error on non-darwin platforms, matching the LLVM behavior git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254643 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Moving -fvisibility-inlines-hidden append as per post-commit reviewChris Bieneman2015-11-301-0/+1
| | | | | | Thanks Alexey. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254316 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add options to control building sanitizers and builtins.Chris Bieneman2015-09-141-0/+5
| | | | | | There are situations where a user may want to build only the compiler-rt builtins, or only the sanitizer runtimes. This exposes options to do that. Both default to On, so there should be no implicit change in behavior. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247607 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] If COMPILER_RT_INCLUDE_TESTS is off we shouldn't include the root ↵Chris Bieneman2015-09-141-1/+1
| | | | | | test directory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247606 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Remove all uses of LLVM_NATIVE_ARCH.Alexey Samsonov2015-09-081-2/+1
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247099 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Rename COMPILER_RT_TEST_TARGET_TRIPLE to more appropriate ↵Alexey Samsonov2015-09-081-11/+16
| | | | | | COMPILER_RT_DEFAULT_TARGET_TRIPLE. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247094 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add experimental support for building compiler-rt for iOSChris Bieneman2015-08-131-60/+0
| | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244948 91177308-0d34-0410-b5e6-96231b3b80d8
* NFC. Fixing a red squiggly line in my editor.Chris Bieneman2015-08-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244699 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the rest of r244634, since it breaks the standalone buildReid Kleckner2015-08-111-1/+1
| | | | | | | compiler-rt can apparently be built without an installed copy of LLVM, so we can't call its cmake code. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244647 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of the last cmake change, it broke configuring with libcxx on ↵Reid Kleckner2015-08-111-1/+1
| | | | | | Linux for me git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244635 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Handle external source for lld and libcxxReid Kleckner2015-08-111-2/+2
| | | | | | As requested in post-commit review of r244549. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244634 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Hoist check for LLD sources up into root CMakeLists.txtReid Kleckner2015-08-111-0/+8
| | | | | | | | We will use this for ASan on Windows soon. When the ELF port of LLD matures, we can add other sanitizer integration tests to make sure they work with LLD. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244549 91177308-0d34-0410-b5e6-96231b3b80d8
* Let cmake infer source file language by the file extension.Douglas Katzman2015-07-281-1/+1
| | | | | | | | | | | | | | | | | | This applies default compiler flags to .S files, in particular removing the "-pedantic" option, which is desirable because there is nothing to reasonably warn about; and the only thing that gcc warns about is that you allegedly can't correctly invoke GLUE2 in lib/builtins/assembly.h on platforms for which USER_LABEL_PREFIX is the empty string. In the gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33305 that added the warning, a commenter notes that giving a macro of zero characters to another macro is not precisely the same as failing to supply an argument, and "there is a widespread belief in C++ community that such usage is valid". Unfortunately the only way to silence the warning is to avoid -pedantic. Differential Revision: http://reviews.llvm.org/D10713 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243446 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Workaround for PR24222: don't fail if we can't target ↵Alexey Samsonov2015-07-241-0/+7
| | | | | | | | | | | | | | | | | | | 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