summaryrefslogtreecommitdiffstats
path: root/cmake
Commit message (Collapse)AuthorAgeFilesLines
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308412 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303873 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two-stage build on windows using DistributionExample cmake cacheNAKAMURA Takumi2017-05-111-3/+10
| | | | | | Thanks to Matthew Larionov <matthewtff@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302795 91177308-0d34-0410-b5e6-96231b3b80d8
* 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> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302740 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302685 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302556 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300917 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300257 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299813 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299463 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298424 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297351 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295480 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294207 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293632 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286210 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286181 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285206 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284658 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284646 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278987 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278862 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] [Apple Cache] Set CLANG_VENDOR_UTI for Apple buildsChris Bieneman2016-08-161-0/+1
| | | | | | 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
* [CMake] Apple stage1 doesn't need to set libcxx optionsChris Bieneman2016-08-151-5/+0
| | | | | | 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
* Add CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLSMichael Gottesman2016-07-101-10/+17
| | | | | | | | | | | | | | LLVM_BUILD_TOOLS is a boolean variable that controls whether or not generated targets for llvm tools are built by the "all" target. CLANG_BUILD_TOOLS is an analogous variable for clang targets. This is useful functionality for selectively disabling the building of clang targets by default to speed up builds. In terms of implementation, I just followed the model of LLVM's implementation of this functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275006 91177308-0d34-0410-b5e6-96231b3b80d8
* Move add_clang_* entry points from the main clang CMakeLists.txt to ↵Michael Gottesman2016-07-091-0/+142
| | | | | | | | | cmake/modules/AddClang.cmake. This matches how LLVM has its cmake files organized and is cleaner than just shoving this business logic into the main CMakeLists.txt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274992 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Remove stale comment. NFC.Michael Gottesman2016-06-301-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274212 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Store all of the targets exported in the variable ↵Michael Gottesman2016-06-292-1/+2
| | | | | | CLANG_EXPORTED_TARGETS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274180 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Unset some variables after we are done using them to configure ↵Michael Gottesman2016-06-291-0/+5
| | | | | | | | | | ClangConfig.cmake.in files. This ensures that the values do not bleed over in between computations. It may make sense in the future to just refactor this code into functions to provide "true scoping". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274179 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Instead of hard coding the ClangTargets location to ↵Michael Gottesman2016-06-292-1/+19
| | | | | | | | /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@. This just makes ClangConfig more consistent with LLVMConfig. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274178 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Follow LLVM's example and only install ↵Michael Gottesman2016-06-291-4/+6
| | | | | | Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274177 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Instead of just copying ClangConfig.cmake, configure it using ↵Michael Gottesman2016-06-292-10/+14
| | | | | | | | | ClangConfig.cmake.in. This will allow for cmake to expand variables in ClangConfig.cmake for downstream users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274176 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Copy ClangConfig.cmake to ↵Michael Gottesman2016-06-291-1/+1
| | | | | | | | | | | | | | ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}. This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in ${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an in tree build. In the case where clang is built out of tree, this is still correct since CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274168 91177308-0d34-0410-b5e6-96231b3b80d8
* [ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR ↵Michael Gottesman2016-06-291-2/+2
| | | | | | with a deref of the variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274158 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Move creation of ClangTargets and installation of ClangConfig.cmake ↵Michael Gottesman2016-06-291-0/+22
| | | | | | | | from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt. This matches LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274157 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] [Apple Clang] Enable Compiler-RT tests on stage2 buildsChris Bieneman2016-06-281-2/+0
| | | | | | We want to be able to run the compiler-rt tests on stage2 build configurations in CI. This should enable that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274031 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Enable zlib support for Apple stage2 buildsVedant Kumar2016-05-091-1/+1
| | | | | | | | | This allows llvm-profdata to interact with profiles containing compressed name data. rdar://problem/26122944 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268947 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Removing LLVM_ENABLE_TIMESTAMPS from the cache filesChris Bieneman2016-05-052-2/+0
| | | | | | Since the option was removed in r268670, the cache scripts should stop referring to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268685 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Apple-stage2] Don't link with -fno-pieChris Bieneman2016-05-051-1/+0
| | | | | | On Darwin the default is to build PIC and link PIE. We shouldn't need to override that in the Apple Clang distributions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268642 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmakeChris Bieneman2016-05-021-1/+1
| | | | | | This enables installing the libcxx headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268322 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Install libcxx-headers as part of the Apple-stage2 distributionChris Bieneman2016-05-021-0/+1
| | | | | | This installs the clang headers as part of the install-distribution target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268320 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Adding clang-headers to the Apple-stage2 distributionChris Bieneman2016-05-021-0/+1
| | | | | | This installs the clang headers as part of the install-distribution target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268319 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use just-built clang and build iOS support when building stage2Chris Bieneman2016-04-261-0/+3
| | | | | | The Apple stage2 build should include compiler-rt iOS libraries and be built with the stage2 compiler. This matches Apple's production clang builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267584 91177308-0d34-0410-b5e6-96231b3b80d8
* [Apple Clang] Expose llvm-config from stage2 builds in stage1Chris Bieneman2016-03-231-0/+1
| | | | | | This exposes the stage2-llvm-config target though the stage1 build configuration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264125 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Updating Apple build configurationsChris Bieneman2016-03-151-1/+1
| | | | | | This updates Apple build configurations to adapt to r263566 & r263570, which added a PACKAGE_VENDOR variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263571 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Updating Apple Clang CMake cachesChris Bieneman2016-03-142-9/+58
| | | | | | | | This is a big update that gets the public configurations more in line with the ones we're actually using internally to ship Clang in Xcode. From here forward I expect most of the changes in these files to be incremental as the changes get made internally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263483 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Only configure Native target in stage 1, configure all in other stagesChris Bieneman2016-02-262-1/+2
| | | | | | This patch causes the 3-stage build pipeline to only build a host compiler in the first stage, and to build all targets for subsequent stages. The host target is determined via the Native target specifier added in r262070. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262071 91177308-0d34-0410-b5e6-96231b3b80d8
* Add call to find_package to load LLVM dependenciesReid Kleckner2016-02-191-0/+2
| | | | | | | | | | | | | ClangConfig requires LLVMConfig, so add find_package call in ClangConfig so find_package(clang REQUIRED CONFIG) will just work. This makes it easier for cmake based projects to use clang, e.g., tools using ClangTooling. Patch by Don Hinton Differential Revision: http://reviews.llvm.org/D13622 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261290 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] For multi-stage builds to be deterministic we need to disable ↵Chris Bieneman2016-02-101-0/+1
| | | | | | | | timestamps. Duh! With this change I've verified -O3 builds are deterministic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260350 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fixing the 3-stage cmake cache.Chris Bieneman2016-02-102-21/+17
| | | | | | | | I had hoped this would work from a single cache file, but turns out there is a bug I can't quite figure out relating to passing list arguments to recursive CMake invocations. This change works around that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260340 91177308-0d34-0410-b5e6-96231b3b80d8