summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* [CMake][Fuchsia] Synchronize first and second stage buildsPetr Hosek2019-01-152-28/+31
| | | | | | | | | | | This reorders options between the first and second stage builds to make them better lined up. The change also re-enables tests for first stage which is useful e.g. for cross-compiling when we cannot run tests for second stage directly (i.e. without emulation). Differential Revision: https://reviews.llvm.org/D56652 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351145 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use hidden visibility for static libc++ in FuchsiaPetr Hosek2019-01-061-0/+1
| | | | | | | | This is enables the use of libc++ in contexts such as device drivers. Differential Revision: https://reviews.llvm.org/D55405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350491 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Enable build ID, relaxations for first stagePetr Hosek2019-01-061-0/+3
| | | | | | | | We want these to be used for the second stage compiler as well. Differential Revision: https://reviews.llvm.org/D56359 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350486 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake][Fuchsia] Enable experimental new pass manager by default"Petr Hosek2019-01-051-1/+0
| | | | | | This reverts commit r350461 as it causes many of the Clang tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350484 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Enable experimental new pass manager by defaultPetr Hosek2019-01-051-0/+1
| | | | | | | | This change enableds experimental new pass manager. Differential Revision: https://reviews.llvm.org/D56350 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350461 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Enable x86 relaxation by defaultPetr Hosek2019-01-051-0/+1
| | | | | | | | | | | This enables x86 relaxation by default. This depends on a linker new enough to support the new reloc types but since we default to lld we don't worry about host system linkers that might be too old to support the new reloc types. Differential Revision: https://reviews.llvm.org/D56349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350460 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Enable --build-id linker flag by defaultPetr Hosek2019-01-051-0/+2
| | | | | | | | This enables passing --build-id to linker by default. Differential Revision: https://reviews.llvm.org/D56348 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350459 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Include check-lld in the list of bootstrap targetsPetr Hosek2019-01-021-0/+3
| | | | | | | | This allows running lld tests when doing 2-stage toolchain build. Differential Revision: https://reviews.llvm.org/D56181 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350202 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Support XRay on FuchsiaPetr Hosek2018-11-221-0/+1
| | | | | | | | This enables support for XRay in Fuchsia Clang driver. Differential Revision: https://reviews.llvm.org/D52160 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347444 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use lld and llvm-objcopy for first stage compiler in FuchsiaPetr Hosek2018-11-161-0/+4
| | | | | | | | | | | When cross-compiling the second stage to a different target, we need to make sure that the first-stage compiler can produce binaries for that target. Using lld and llvm-objcopy as the default linker and objcopy tool eliminates some of the dependencies on the host toolchain. Differential Revision: https://reviews.llvm.org/D54655 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347108 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support cross-compiling with Fuchsia toolchain buildPetr Hosek2018-11-161-1/+32
| | | | | | | | | | When second stage is being cross-compiled for a different platform we need to build enough of first stage runtimes to get a working compiler. Differential Revision: https://reviews.llvm.org/D54463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347026 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use the correct spelling for armv7 in Fuchsia's toolchainPetr Hosek2018-11-161-1/+1
| | | | | | | | We need to explicitly specify the architecture version. Differential Revision: https://reviews.llvm.org/D54613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347021 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Explicitly list Linux targets for Fuchsia toolchainPetr Hosek2018-11-151-31/+31
| | | | | | | | | Not all Linux targets use the ${arch}-linux-gnu spelling, so instead specify the list of Linux explicitly. Differential Revision: https://reviews.llvm.org/D54598 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346997 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Include clang-apply-replacements in Fuchsia toolchainPetr Hosek2018-11-141-0/+1
| | | | | | | | This is needed for run-clang-tidy.py. Differential Revision: https://reviews.llvm.org/D54505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346827 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Set -fuse-ld=lld explicitly for Linux runtimesPetr Hosek2018-11-021-13/+19
| | | | | | | | | | We set lld as the default linker on non-Darwin platforms, but we still need to set -fuse-ld=lld explicitly in to support cross-compiling Linux runtimes on Darwin. Differential Revision: https://reviews.llvm.org/D54026 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346056 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Don't restrict Linux runtimes to UNIXPetr Hosek2018-11-011-32/+32
| | | | | | | | | This allows building Linux runtimes on any platform if the correct sysroot is provided via CMake option. Differential Revision: https://reviews.llvm.org/D53970 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345889 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Drop the LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULTPetr Hosek2018-10-291-4/+0
| | | | | | | | | Now that libc++ uses __exclude_from_explicit_instantiation__ attribute, this is no longer needed. Differential Revision: https://reviews.llvm.org/D53839 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345552 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Support direct split DWARF emission for FuchsiaPetr Hosek2018-10-151-0/+1
| | | | | | | | | This enables the driver support for direct split DWARF emission for Fuchsia in addition to Linux. Differential Revision: https://reviews.llvm.org/D53248 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344556 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Improved cmake configuration for Z3Enrico Steffinlongo2018-10-131-2/+25
| | | | | | | | | | | | | | | | | | | | | | Summary: Enhanced support for Z3 in the cmake configuration of clang; now it is possible to specify any arbitrary Z3 install prefix (CLANG_ANALYZER_Z3_PREFIX) to cmake with lib (or bin) and include folders. Before the patch only in cmake default locations were searched (https://cmake.org/cmake/help/v3.4/command/find_path.html). Specifying any CLANG_ANALYZER_Z3_PREFIX will force also CLANG_ANALYZER_BUILD_Z3 to ON. Removed also Z3 4.5 version requirement since it was not checked, and now Clang works with Z3 4.7 Reviewers: NoQ, george.karpenkov, mikhail.ramalho Reviewed By: george.karpenkov Subscribers: rnkovacs, NoQ, esteffin, george.karpenkov, delcypher, ddcc, mgorny, xazax.hun, szepet, a.sidorin, Szelethus Tags: #clang Differential Revision: https://reviews.llvm.org/D50818 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344464 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Use libc++ ABIv2 for Fuchsia toolchainPetr Hosek2018-10-031-0/+4
| | | | | | | | We don't need to provide stable ABI and hence we can use the v2. Differential Revision: https://reviews.llvm.org/D52660 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343652 91177308-0d34-0410-b5e6-96231b3b80d8
* Build clang-headers when building clang tools.Haojian Wu2018-10-011-0/+1
| | | | | | | | | | | | | | | | | Summary: clang tools require clang headers to work on real project, e.g. when we build clangd via `ninja clangd`, we expect the binary can run on real-world project (without running another command `ninja clang-headers`). Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, ilya-biryukov, ioeric, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343459 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use internal_linkage rather than always_inline for libc++Petr Hosek2018-09-231-0/+2
| | | | | | | | | | This is a workaround for PR39053 which was uncovered by D50652 when the default attribute has been changed from internal_linkage to always_inline. Differential Revision: https://reviews.llvm.org/D52402 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342833 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchainPetr Hosek2018-07-251-0/+6
| | | | | | | | | | | When building libc++ for Fuchsia, we want to distribute shared libc++, libc++abi and libunwind as separate libraries, but for static versions we would like to link all of them into libc++ so -lc++ flag has the same effect whether shared or static library is being used. Differential Revision: https://reviews.llvm.org/D49628 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337877 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use libc++ and compiler-rt for sanitizersPetr Hosek2018-07-151-1/+3
| | | | | | | | | When building runtimes for Linux as part of Fuchsia toolchain, use libc++ and compiler-rt for sanitizers. Differential Revision: https://reviews.llvm.org/D49331 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337117 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Don't build Linux targets on Darwin in Fuchsia toolchainPetr Hosek2018-06-282-29/+29
| | | | | | | | | This is currently breaking because Linux target sysroots rely on case sensitive filesystem which is not by default enabled on macOS. Differential Revision: https://reviews.llvm.org/D48710 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335919 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Build static runtimes for host in Fuchsia first stagePetr Hosek2018-06-281-0/+12
| | | | | | | | | | First stage build is only a minimal build where we don't need a complete multiarch support, but we need enough to build the second stage. Differential Revision: https://reviews.llvm.org/D48707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335917 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use explicit targets for building Linux runtimesPetr Hosek2018-06-282-58/+76
| | | | | | | | | | | | Previously we were using default logic when building Linux runtimes in Fuchsia toolchain, but that leads to various issues due to how the CMake logic in compiler-rt for determining the platform support is implemented. With this change, we will use explicit target for every provided Linux sysroot. Differential Revision: https://reviews.llvm.org/D48563 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335812 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support passing FUCHSIA_SDK as the only variablePetr Hosek2018-06-271-8/+16
| | | | | | | | | | | | Now that the structure of Fuchsia SDK has been formalized, we no longer need to pass all the different CFLAGS/LDFLAGS to the CMake build separately, we can simply set the FUCHSIA_SDK variable and derive all the necessary variables from that one inside the cache file. Differential Revision: https://reviews.llvm.org/D48564 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335708 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Provide direct support for building sanitized runtimesPetr Hosek2018-06-271-6/+3
| | | | | | | | This avoids having to rely on magic separators and special parsing. Differential Revision: https://reviews.llvm.org/D48061 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335704 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake][Darwin] Match cxx-headers -> cxx_headers libcxx target rename."Francis Visoiu Mistrih2018-06-261-1/+1
| | | | | | | | | This reverts commit r334550. Try to fix the stage2 build failing on Green Dragon for a while. http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/11124/console git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335628 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Enable static libc++, libc++abi, libunwindPetr Hosek2018-06-231-3/+0
| | | | | | | | This is needed for building Fuchsia drivers. Differential Revision: https://reviews.llvm.org/D48208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335410 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Darwin] Match cxx-headers -> cxx_headers libcxx target rename.Ahmed Bougacha2018-06-121-1/+1
| | | | | | This was changed in r334477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334550 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use libc++ and compiler-rt for bootstrap Fuchsia ClangPetr Hosek2018-06-111-0/+7
| | | | | | | | | | We want to build the second stage compiler with libc++ and compiler-rt, also include builtins and runtimes into extra bootstrap components to ensure these get built. Differential Revision: https://reviews.llvm.org/D47356 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334445 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Include install-distribution-stripped in bootstrap targetsPetr Hosek2018-06-061-0/+1
| | | | | | | | | This enables the use of install-distribution-stripped target in the 2-stage builds. Differential Revision: https://reviews.llvm.org/D47758 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334063 91177308-0d34-0410-b5e6-96231b3b80d8
* Set CMAKE_BUILD_WITH_INSTALL_RPATH for Fuchsia runtimesPetr Hosek2018-05-091-0/+1
| | | | | | | | | | This doesn't make any difference since we don't use RPATH/RUNPATH on Fuchsia but it avoids the CMake error when re-linking libraries while building with Ninja. Differntial Revision: https://reviews.llvm.org/D46610 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331833 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Include llvm-strip in Fuchsia toolchain distributionPetr Hosek2018-05-091-0/+1
| | | | | | | | Now that llvm-strip is available, include it in the Fuchsia toolchain. Differential Revision: https://reviews.llvm.org/D46612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331826 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Pass additional CMake flags in Fuchsia cache filesPetr Hosek2018-05-082-6/+26
| | | | | | | | | This allows passing additional CMake flags to builtins and runtimes build through Fuchsia cache files. Differential Revision: https://reviews.llvm.org/D45997 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331717 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Cache] Stop pretending that Fuchsia is UNIXPetr Hosek2018-05-031-1/+0
| | | | | | | | | This changes some aspects of the build that are not relevant or useful for Fuchsia like setting the RPATH/RUNPATH. Differential Revision: https://reviews.llvm.org/D46361 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331425 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Enable libc++ for Fuchsia toolchain on DarwinPetr Hosek2018-04-251-10/+1
| | | | | | | | | This is necessary in order to get a working C++ compiler on Darwin since Clang expects libc++ headers to be part of the toolchain. Differential Revision: https://reviews.llvm.org/D46075 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330855 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Don't specify libc++ ABI version for FuchsiaPetr Hosek2018-04-131-1/+0
| | | | | | | | This is now set automatically in libc++ config header. Differential Revision: https://reviews.llvm.org/D45511 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329984 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329399 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Don't install libc++, libc++abi or libunwind on DarwinPetr Hosek2018-03-211-11/+22
| | | | | | | | | | The Clang driver doesn't currently know how to use the libraries that are shipped as part of the toolchain so there's no reason to ship them at all. Differential Revision: https://reviews.llvm.org/D44724 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328114 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use libc++ and compiler-rt as default libraries in Fuchsia toolchainPetr Hosek2018-03-191-1/+19
| | | | | | | | | Fuchsia already defaults to libc++ and compiler-rt, but we want to use these as default runtimes even on the host platform. Differential Revision: https://reviews.llvm.org/D39930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327860 91177308-0d34-0410-b5e6-96231b3b80d8
* [dsymutil] Rename llvm-dsymutil -> dsymutilJonas Devlieghere2018-03-184-4/+4
| | | | | | | | | | | Now that almost all functionality of Apple's dsymutil has been upstreamed, the open source variant can be used as a drop in replacement. Hence we feel it's no longer necessary to have the llvm prefix. Differential revision: https://reviews.llvm.org/D44527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327790 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Include libClang and clang-include-fixer in the toolchainPetr Hosek2018-02-211-0/+2
| | | | | | | | | libClang is used by other Clang based tools such as cquery while clang-include-fixer is generally a useful tool. Differential Revision: https://reviews.llvm.org/D43404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325665 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r323051 "[cmake] Use CLANG_BINARY_DIR to determine the build directory."Vassil Vassilev2018-01-241-1/+1
| | | | | | | | | This broke swift builds. Thanks for the post-commit review of Chris Bieneman and Davide Italiano! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323368 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Use CLANG_BINARY_DIR to determine the build directory.Vassil Vassilev2018-01-201-1/+1
| | | | | | | | The patch puts the ClangConfig.cmake in the expected location when clang is embedded into a framework. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323051 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Remove LLDB from the toolchain distributionPetr Hosek2018-01-111-6/+0
| | | | | | | | This is currently not being used so disable it to reduce toolchain size. Differential Revision: https://reviews.llvm.org/D41929 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322253 91177308-0d34-0410-b5e6-96231b3b80d8
* [Fuchsia] Use llvm-objcopy as objcopy on non-Darwin hostsPetr Hosek2018-01-111-0/+1
| | | | | | | | llvm-objcopy already supports all the necessary functionality for ELF. Differential Revision: https://reviews.llvm.org/D41930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322252 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Fuchsia] Enable assertionsPetr Hosek2017-12-212-0/+2
| | | | | | | | | | | | | | | | Enable assertions in both stages. Release+Asserts is fast enough. No need to let insanity through. Patch By: mcgrathr Reviewers: phosek Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D41471 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321316 91177308-0d34-0410-b5e6-96231b3b80d8