summaryrefslogtreecommitdiffstats
path: root/clang/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [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 llvm-svn: 322253
* [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 llvm-svn: 322252
* [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 llvm-svn: 321316
* Update Clang CMake cache to use cxx-headers, NFCDuncan P. N. Exon Smith2017-12-091-1/+1
| | | | | | Apparently libcxx-headers is going away. Fixes PR35584. llvm-svn: 320271
* [clang] Use add_llvm_install_targetsShoaib Meenai2017-11-301-10/+6
| | | | | | | | | | 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 llvm-svn: 319489
* [CMake][Fuchsia] Disable terminfo database in Fuchsia toolchainPetr Hosek2017-11-272-2/+4
| | | | | | | | | | | | | 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 llvm-svn: 319088
* [Driver] Make the use of relax relocations a per target optionPetr Hosek2017-11-221-7/+0
| | | | | | | | | | | | | 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 llvm-svn: 318816
* [clang-fuzzer] Fix incremental builds of the fuzzerVitaly Buka2017-10-311-11/+6
| | | | | | | | | | | | | | | 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 llvm-svn: 317035
* [CMake] Build host builtins in Fuchsia toolchain even on DarwinPetr Hosek2017-10-251-5/+1
| | | | | | | | | This is nedeeded for the toolchain to be actually usable as a host toolchain on Darwin. Differential Revision: https://reviews.llvm.org/D39273 llvm-svn: 316542
* [CMake] Include clang-refactor in Fuchsia toolchainPetr Hosek2017-10-251-0/+1
| | | | | | | | This includes the clang-refactor in the toolchain distribution. Differential Revision: https://reviews.llvm.org/D39270 llvm-svn: 316541
* [clang-proto-fuzzer] Use ToT protobuf-mutator.Matt Morehouse2017-10-181-1/+1
| | | | llvm-svn: 316103
* [CMake] Build Fuchsia toolchain as -O3Petr Hosek2017-10-181-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D39017 llvm-svn: 316053
* [clang-fuzzer] Build with newer protobuf-mutator.Matt Morehouse2017-10-111-1/+1
| | | | llvm-svn: 315506
* [CMake] Add install-distribution-toolchain to stage2 target listChris Bieneman2017-10-051-0/+1
| | | | | | This allows generating toolchains with just the distribution components instead of toolchains with everything. llvm-svn: 315030
* [CMake] Minor updates to Apple CMake cachesChris Bieneman2017-10-032-0/+11
| | | | | | | * Turn off embedded compiler-rt builds in stage1 * Support generating Xcode toolchains from Stage2 build configurations llvm-svn: 314854
* [Fuchsia] Set ENABLE_X86_RELAX_RELOCATIONS for Fuchsia buildsPetr Hosek2017-09-131-0/+7
| | | | | | | | | | This is a "Does your linker support it?" option, and all ours do. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D37785 llvm-svn: 313173
* Remove LLVMFuzzer from list of bundled libraries for FuchsiaGeorge Karpenkov2017-08-231-1/+0
| | | | | | | | | 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 llvm-svn: 311514
* Update libprotobuf-mutator revisionVitaly Buka2017-08-221-1/+1
| | | | llvm-svn: 311428
* [CMake] Build sanitized C++ runtimes for FuchsiaPetr Hosek2017-08-161-2/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D36349 llvm-svn: 311033
* [CMake] Include LLVMFuzzer in Fuchsia toolchainPetr Hosek2017-08-151-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D36541 llvm-svn: 310901
* Integrate Kostya's clang-proto-fuzzer with LLVM.Matt Morehouse2017-08-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 310408
* Enable AddressSanitizer for Fuchsia targetsPetr Hosek2017-08-031-0/+1
| | | | | | | | Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35922 llvm-svn: 309999
* [CMake] Include llvm-objcopy tool in Fuchsia toolchainPetr Hosek2017-08-021-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D36194 llvm-svn: 309786
* [Driver] Disable static C++ library support on FuchsiaPetr Hosek2017-08-021-0/+3
| | | | | | | | Don't support or build static C++ libraries for Fuchsia. Differential Revision: https://reviews.llvm.org/D36202 llvm-svn: 309778
* [CMake] Include sancov tool in Fuchsia toolchainPetr Hosek2017-08-011-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D35930 llvm-svn: 309724
* [CMake] Add Android toolchain CMake cache files.Leo Li2017-07-282-0/+95
| | | | | | | | | | | | | | 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 llvm-svn: 309407
* [CMake] NFC. Add clang-tablegen-targets utility targetChris Bieneman2017-07-281-0/+7
| | | | | | | | 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. llvm-svn: 309390
* [CMake] Use ABI version 2 for C++ library in FuchsiaPetr Hosek2017-07-211-0/+1
| | | | | | | | | 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 llvm-svn: 308705
* [CMake] Build runtimes for Fuchsia targetsPetr Hosek2017-07-192-11/+30
| | | | | | | | This relies on the multi-target runtimes build support. Differential Revision: https://reviews.llvm.org/D32817 llvm-svn: 308412
* Don't defer to the GCC driver for linking arm-baremetalJonathan Roelofs2017-05-251-0/+50
| | | | | | | | | | | | | | | 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 llvm-svn: 303873
* Fix two-stage build on windows using DistributionExample cmake cacheNAKAMURA Takumi2017-05-111-3/+10
| | | | | | Thanks to Matthew Larionov <matthewtff@gmail.com> llvm-svn: 302795
* Partially revert r302685 and swith Apple-style full LTO builds toAdrian Prantl2017-05-101-0/+4
| | | | | | | | | -gline-tables-only. The memory consumption is apparently still too much for some of the green dragon builders. <rdar://problem/28672159> llvm-svn: 302740
* Build the Apple-style stage2 with full debug infoAdrian Prantl2017-05-101-2/+0
| | | | | | | | | | | | | | | | 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 llvm-svn: 302685
* Build the Apple-style stage2 with modulesAdrian Prantl2017-05-091-0/+1
| | | | | | | | | | | | | | | 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 llvm-svn: 302556
* [CMake] Enable ARM target in Fuchsia toolchainPetr Hosek2017-04-201-1/+3
| | | | | | | | | 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 llvm-svn: 300917
* [CMake] Support building Fuchsia toolchain on DarwinPetr Hosek2017-04-132-0/+10
| | | | | | | | | This is already supported on Linux but on Darwin it requires some extra flags. Differential Revision: https://reviews.llvm.org/D30958 llvm-svn: 300257
* [cmake] Support Gentoo install for z3Michal Gorny2017-04-081-1/+1
| | | | | | | | | | 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 llvm-svn: 299813
* [analyzer] Add new Z3 constraint manager backendDominic Chen2017-04-041-0/+28
| | | | | | | | | | | | 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 llvm-svn: 299463
* [CMake] fix CLANG_INCLUDE_DIRS CMake exportGuillaume Papin2017-03-211-1/+1
| | | | | | | | | | | | | | | | 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 llvm-svn: 298424
* Add a cmake cache file for a stage-2 build with ThinLTOMehdi Amini2017-03-091-0/+6
| | | | | | | This is intended to be targetted by a Green Dragon stage-2 bot I'm bringing up currently. WIP. llvm-svn: 297351
* [CMake] Add Fuchsia toolchain CMake cache filesPetr Hosek2017-02-172-0/+106
| | | | | | | | | 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 llvm-svn: 295480
* [CMake] Add CLANG_INCLUDE_DIRS to CMake exportsChris Bieneman2017-02-062-0/+8
| | | | | | This patch adds setting CLANG_INCLUDE_DIRS in the generated CMake package configuration files. llvm-svn: 294207
* [cmake] Hint find_package() to prefer LLVM installed alongside clangMichal Gorny2017-01-312-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 293632
* cmake: Don't try to install exports if there aren't anyJustin Bogner2016-11-082-1/+6
| | | | | | | | | 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. llvm-svn: 286210
* cmake: Support exports correctly with LLVM_DISTRIBUTION_COMPONENTSJustin Bogner2016-11-071-1/+13
| | | | | | | | | | | 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. llvm-svn: 286181
* [CMake] Adding example distribution CMake cache filesChris Bieneman2016-10-262-0/+64
| | | | | | 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. llvm-svn: 285206
* [cmake] Follow LLVM's lead in creating exported tool targets for clang tools.Michael Gottesman2016-10-191-0/+1
| | | | | | | | | | | | 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. llvm-svn: 284658
* [CMake] Support thin LTO in PGO CMake cacheChris Bieneman2016-10-191-2/+2
| | | | | | This allows you to set PGO_INSTRUMENT_LTO=Thin and have it work correctly. llvm-svn: 284646
* [CMake] Adding toolchain targets to PGO and Apple CMake cachesChris Bieneman2016-08-173-0/+4
| | | | | | The Xcode toolchain targets are useful on OS X hosts because you can construct and install multiple toolchians that can be used seamlessly. llvm-svn: 278987
* [CMake] Workflow improvements to PGO generationChris Bieneman2016-08-162-6/+30
| | | | | | | | | | | 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. llvm-svn: 278862
OpenPOWER on IntegriCloud