summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2017-12-21[CMake][Fuchsia] Enable assertionsPetr Hosek
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
2017-12-09Update Clang CMake cache to use cxx-headers, NFCDuncan P. N. Exon Smith
Apparently libcxx-headers is going away. Fixes PR35584. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320271 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30[clang] Use add_llvm_install_targetsShoaib Meenai
Use this function to create the install targets rather than doing so manually, which gains us the `-stripped` install targets to perform stripped installations. Differential Revision: https://reviews.llvm.org/D40675 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319489 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27[CMake][Fuchsia] Disable terminfo database in Fuchsia toolchainPetr Hosek
It's used to determine whether terminal supports colors, but within LLVM it's only used in handful of places and in Clang it's only used in AST dumper, otherwise Clang relies on the -fcolor-diagnostics flag which we pass explicitly from our build system anyway. This eliminates one of the shared libraries dependencies making the toolchain less reliant on the host environment. Differential Revision: https://reviews.llvm.org/D40329 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319088 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22[Driver] Make the use of relax relocations a per target optionPetr Hosek
The support for relax relocations is dependent on the linker and different toolchains within the same compiler can be using different linkers some of which may or may not support relax relocations. Give toolchains the option to control whether they want to use relax relocations in addition to the existing (global) build system option. Differential Revision: https://reviews.llvm.org/D39831 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31[clang-fuzzer] Fix incremental builds of the fuzzerVitaly Buka
Summary: Don't use BUILD_IN_SOURCE keep git checkout clean Don't forward CMAKE_GENERATOR as ExternalProject_Add should do it already Reset UPDATE_COMMAND to avoid git checkout updates on each build Reviewers: kcc, morehouse Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39445 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-25[CMake] Build host builtins in Fuchsia toolchain even on DarwinPetr Hosek
This is nedeeded for the toolchain to be actually usable as a host toolchain on Darwin. Differential Revision: https://reviews.llvm.org/D39273 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-25[CMake] Include clang-refactor in Fuchsia toolchainPetr Hosek
This includes the clang-refactor in the toolchain distribution. Differential Revision: https://reviews.llvm.org/D39270 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18[clang-proto-fuzzer] Use ToT protobuf-mutator.Matt Morehouse
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316103 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-18[CMake] Build Fuchsia toolchain as -O3Petr Hosek
Differential Revision: https://reviews.llvm.org/D39017 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11[clang-fuzzer] Build with newer protobuf-mutator.Matt Morehouse
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315506 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05[CMake] Add install-distribution-toolchain to stage2 target listChris Bieneman
This allows generating toolchains with just the distribution components instead of toolchains with everything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315030 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03[CMake] Minor updates to Apple CMake cachesChris Bieneman
* Turn off embedded compiler-rt builds in stage1 * Support generating Xcode toolchains from Stage2 build configurations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314854 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13[Fuchsia] Set ENABLE_X86_RELAX_RELOCATIONS for Fuchsia buildsPetr Hosek
This is a "Does your linker support it?" option, and all ours do. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D37785 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313173 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23Remove LLVMFuzzer from list of bundled libraries for FuchsiaGeorge Karpenkov
As of now, libFuzzer is located in compiler-rt and is bundled with Clang's toolchain by default. Differential Revision: https://reviews.llvm.org/D37037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311514 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-22Update libprotobuf-mutator revisionVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311428 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-16[CMake] Build sanitized C++ runtimes for FuchsiaPetr Hosek
Differential Revision: https://reviews.llvm.org/D36349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311033 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[CMake] Include LLVMFuzzer in Fuchsia toolchainPetr Hosek
Differential Revision: https://reviews.llvm.org/D36541 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310901 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08Integrate Kostya's clang-proto-fuzzer with LLVM.Matt Morehouse
Summary: The clang-proto-fuzzer models a subset of C++ as a protobuf and uses libprotobuf-mutator to generate interesting mutations of C++ programs. Clang-proto-fuzzer has already found several bugs in Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747, https://bugs.llvm.org/show_bug.cgi?id=33749). As with clang-fuzzer, clang-proto-fuzzer requires the following cmake flags: - CMAKE_C_COMPILER=clang - CMAKE_CXX_COMPILER=clang++ - LLVM_USE_SANITIZE_COVERAGE=YES // needed for libFuzzer - LLVM_USE_SANITIZER=Address // needed for libFuzzer In addition, clang-proto-fuzzer requires: - CLANG_ENABLE_PROTO_FUZZER=ON clang-proto-fuzzer also requires the following dependencies: - binutils // needed for libprotobuf-mutator - liblzma-dev // needed for libprotobuf-mutator - libz-dev // needed for libprotobuf-mutator - docbook2x // needed for libprotobuf-mutator - Recent version of protobuf [3.3.0 is known to work] A working version of libprotobuf-mutator will automatically be downloaded and built as an external project. Implementation of clang-proto-fuzzer provided by Kostya Serebryany. https://bugs.llvm.org/show_bug.cgi?id=33829 Reviewers: kcc, vitalybuka, bogner Reviewed By: kcc, vitalybuka Subscribers: thakis, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D36324 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310408 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-03Enable AddressSanitizer for Fuchsia targetsPetr Hosek
Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309999 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02[CMake] Include llvm-objcopy tool in Fuchsia toolchainPetr Hosek
Differential Revision: https://reviews.llvm.org/D36194 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02[Driver] Disable static C++ library support on FuchsiaPetr Hosek
Don't support or build static C++ libraries for Fuchsia. Differential Revision: https://reviews.llvm.org/D36202 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309778 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[CMake] Include sancov tool in Fuchsia toolchainPetr Hosek
Differential Revision: https://reviews.llvm.org/D35930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309724 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[CMake] Add Android toolchain CMake cache files.Leo Li
Summary: Thoes files are used to build Android toolchain. D32816 makes it possible to build runtimes for targets. Reviewers: beanz, srhines Reviewed By: srhines Subscribers: pirama, jroelofs, srhines, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D33561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[CMake] NFC. Add clang-tablegen-targets utility targetChris Bieneman
By creating this target other projects that depend on clang-generated headers (like LLDB) will no longer be order-dependent on Clang being processed by CMake first. Also, by creating a dummy of this target in ClangConfig.cmake, projects that can build against out-of-tree clang can freely depend on the target without needing to have conditionals for if clang is in-tree or out-of-tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-21[CMake] Use ABI version 2 for C++ library in FuchsiaPetr Hosek
Fuchsia has always been using ABI version 2 but I forgot this option when setting up the cache file for runtimes build. Differential Revision: https://reviews.llvm.org/D35705 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308705 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19[CMake] Build runtimes for Fuchsia targetsPetr Hosek
This relies on the multi-target runtimes build support. Differential Revision: https://reviews.llvm.org/D32817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308412 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25Don't defer to the GCC driver for linking arm-baremetalJonathan Roelofs
Also comes with a cmake cache for building the runtime bits: $ cmake <normal cmake flags> \ -DBAREMETAL_ARMV6M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7EM_SYSROOT=/path/to/sysroot \ -C /path/to/clang/cmake/caches/BaremetalARM.cmake \ /path/to/llvm https://reviews.llvm.org/D33259 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Fix two-stage build on windows using DistributionExample cmake cacheNAKAMURA Takumi
Thanks to Matthew Larionov <matthewtff@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302795 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10Partially revert r302685 and swith Apple-style full LTO builds toAdrian Prantl
-gline-tables-only. The memory consumption is apparently still too much for some of the green dragon builders. <rdar://problem/28672159> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302740 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10Build the Apple-style stage2 with full debug infoAdrian Prantl
Green dragon had a green stage2 modules bot for a long time now[1] and it is time to retire it and make a modules build the default for Apple-style stage2 builds. This patch switches the debug info generation from -gline-tables-only to -g since full debug info does no longer cause any memory issues even for full LTO builds [2]. [1] http://green.lab.llvm.org/green/job/clang-stage2-cmake-modulesRDA_build/ [2] http://llvm.org/devmtg/2015-10/#talk19 rdar://problem/28672159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302685 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-09Build the Apple-style stage2 with modulesAdrian Prantl
Green dragon had a green stage2 modules bot for a long time now[1] and it is time to retire it and make a modules build the default for Apple-style stage2 builds. This patch turns on LLVM_ENABLE_MODULES. [1] http://green.lab.llvm.org/green/job/clang-stage2-cmake-modulesRDA_build/ rdar://problem/28672159 Differential Revision: https://reviews.llvm.org/D32603 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20[CMake] Enable ARM target in Fuchsia toolchainPetr Hosek
This is still used by some users of Fuchsia toolchain. Also include llc and opt which is useful for development and testing. Differential Revision: https://reviews.llvm.org/D32231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300917 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13[CMake] Support building Fuchsia toolchain on DarwinPetr Hosek
This is already supported on Linux but on Darwin it requires some extra flags. Differential Revision: https://reviews.llvm.org/D30958 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300257 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-08[cmake] Support Gentoo install for z3Michal Gorny
Add the 'z3' subdirectory to the list of possible path suffixes for libz3 header search. The z3 headers are installed in /usr/include/z3 on Gentoo. Differential Revision: https://reviews.llvm.org/D31756 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299813 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[analyzer] Add new Z3 constraint manager backendDominic Chen
Summary: Implement new Z3 constraint manager backend. Reviewers: zaks.anna, dcoughlin, NoQ, xazax.hun Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28952 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299463 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21[CMake] fix CLANG_INCLUDE_DIRS CMake exportGuillaume Papin
Summary: This change should fixes the export of CLANG_INCLUDE_DIRS variable in ClangConfig.cmake. Unlike for the other variables, CLANG_INSTALL_PREFIX wasn't escaped meaning CLANG_INCLUDE_DIRS resulting in the path "/include" instead of "${CLANG_INSTALL_PREFIX}/include". Reviewers: beanz Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D30911 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298424 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09Add a cmake cache file for a stage-2 build with ThinLTOMehdi Amini
This is intended to be targetted by a Green Dragon stage-2 bot I'm bringing up currently. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17[CMake] Add Fuchsia toolchain CMake cache filesPetr Hosek
These cache files can be used to build Fuchsia toolchain. They also demonstrate the use of multi-target builtins build. Differential Revision: https://reviews.llvm.org/D26654 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295480 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06[CMake] Add CLANG_INCLUDE_DIRS to CMake exportsChris Bieneman
This patch adds setting CLANG_INCLUDE_DIRS in the generated CMake package configuration files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294207 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31[cmake] Hint find_package() to prefer LLVM installed alongside clangMichal Gorny
Include a path hint for find_package() in ClangConfig.cmake to ensure that CMake prefers LLVM installed alongside clang over the default search path. If two versions of LLVM are installed in the system, and one of them is in PATH, CMake's find_package() magic prefers the CMake directory alongside that install by default. Adding a relative hint makes it possible to prioritize to the install from which find_package() is called. If you want to build e.g. LLDB against another install of LLVM, you can pass LLVM_CONFIG override. In this case, LLDB queries the prefix from llvm-config and uses the CMake files located there. However, when including ClangConfig, the implicit find_package() nevertheless prefers PATH-found LLVM over the one used previously by LLDB, and two versions of LLVMConfig end up being loaded. This could be fixed on LLDB end up by explicitly forcing custom package search location. However, it seems simpler and safer to add a hint to ClangConfig than to track every usage of ClangConfig. Differential Revision: https://reviews.llvm.org/D29304 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08cmake: Don't try to install exports if there aren't anyJustin Bogner
When using LLVM_DISTRIBUTION_COMPONENTS, it's possible for clang's export list to be empty. If this happens the install(EXPORTS) command will fail, but since there isn't anything to install anyway we really just want to skip it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07cmake: Support exports correctly with LLVM_DISTRIBUTION_COMPONENTSJustin Bogner
We need to apply the same export logic in clang as in llvm for LLVM_DISTRIBUTION_COMPONENTS, or the clang exports will be invalid when we use this config. This makes using distribution components without setting LLVM_TOOLCHAIN_ONLY=On work correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26[CMake] Adding example distribution CMake cache filesChris Bieneman
These cache file are provided as an example of how to set up simple multi-stage CMake builds. I have a batch of documentation updates for LLVM.org which reference these files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19[cmake] Follow LLVM's lead in creating exported tool targets for clang tools.Michael Gottesman
This is needed by downstream projects such as swift to get proper cmake dependency information for LLVM/Clang targets. A few months ago I added support for exporting this information for Clang libraries. In order to be incremental, I did not add support for exporting clang tools as well at that time. Now such support is needed, so I am committing this incremental code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19[CMake] Support thin LTO in PGO CMake cacheChris Bieneman
This allows you to set PGO_INSTRUMENT_LTO=Thin and have it work correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17[CMake] Adding toolchain targets to PGO and Apple CMake cachesChris Bieneman
The Xcode toolchain targets are useful on OS X hosts because you can construct and install multiple toolchians that can be used seamlessly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16[CMake] Workflow improvements to PGO generationChris Bieneman
This patch adds a few new convenience options used by the PGO CMake cache to setup options on bootstrap stages. The new options are: PGO_INSTRUMENT_LTO - Builds the instrumented and final builds with LTO PGO_BUILD_CONFIGURATION - Accepts a CMake cache script that can be used for complex configuration of the stage2-instrumented and stage2 builds. The patch also includes a fix for bootstrap dependencies so that the instrumented LTO tools don't get used when building the final stage, and it adds distribution targets to the passthrough. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16[CMake] [Apple Cache] Set CLANG_VENDOR_UTI for Apple buildsChris Bieneman
This is just a minor update to the Apple packaging configuration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15[CMake] Apple stage1 doesn't need to set libcxx optionsChris Bieneman
LibCXX settings are configured in stage2 so we don't need them here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278729 91177308-0d34-0410-b5e6-96231b3b80d8