summaryrefslogtreecommitdiffstats
path: root/clang/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [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. llvm-svn: 278849
* [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. llvm-svn: 278729
* 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. llvm-svn: 275006
* 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. llvm-svn: 274992
* [cmake] Remove stale comment. NFC.Michael Gottesman2016-06-301-4/+0
| | | | llvm-svn: 274212
* [ClangConfig] Store all of the targets exported in the variable ↵Michael Gottesman2016-06-292-1/+2
| | | | | | CLANG_EXPORTED_TARGETS. llvm-svn: 274180
* [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". llvm-svn: 274179
* [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. llvm-svn: 274178
* [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. llvm-svn: 274177
* [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. llvm-svn: 274176
* [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. llvm-svn: 274168
* [ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR ↵Michael Gottesman2016-06-291-2/+2
| | | | | | with a deref of the variable. llvm-svn: 274158
* [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. llvm-svn: 274157
* [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. llvm-svn: 274031
* [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 llvm-svn: 268947
* [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. llvm-svn: 268685
* [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. llvm-svn: 268642
* [CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmakeChris Bieneman2016-05-021-1/+1
| | | | | | This enables installing the libcxx headers. llvm-svn: 268322
* [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. llvm-svn: 268320
* [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. llvm-svn: 268319
* [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. llvm-svn: 267584
* [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. llvm-svn: 264125
* [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. llvm-svn: 263571
* [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. llvm-svn: 263483
* [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. llvm-svn: 262071
* 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 llvm-svn: 261290
* [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. llvm-svn: 260350
* [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. llvm-svn: 260340
* [CMake] Updating caches README with explanations of useful cache files.Chris Bieneman2016-02-091-8/+64
| | | | | | This is in response to silvas' post-commit suggestion. llvm-svn: 260203
* [CMake] Providing a CMake cache for 3-stage buildsChris Bieneman2016-02-091-0/+34
| | | | | | | | | | | | This cache file can be used to generate a 3-stage clang build. You can configure using the following CMake command: cmake -C <path to clang>/cmake/caches/3-stage.cmake -G Ninja <path to llvm> You can then run "ninja stage3-clang" to build stage1, stage2 and stage3 clangs. This is useful for finding non-determinism the compiler by verifying that stage2 and stage3 are identical. llvm-svn: 260201
* [CMake] Support a simple case for bootstrap builds to generate PGO dataChris Bieneman2016-01-053-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler. With this patch applied you can configure your build directory with the following invocation of CMake: cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir> After configuration the following additional targets will be generated: stage2-instrumented: Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler. stage2-instrumented-generate-profdata: Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training stage2: Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler. stage2-check-llvm: Depends on stage2 and runs check-llvm using the stage3 compiler. stage2-check-clang: Depends on stage2 and runs check-clang using the stage3 compiler. stage2-check-all: Depends on stage2 and runs check-all using the stage3 compiler. stage2-test-suite: Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite). Reviewers: bogner, silvas, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15584 llvm-svn: 256873
* Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"Chris Bieneman2015-12-193-28/+0
| | | | | | | This reverts commit r256069, which was an unintentional tag along on another commit. llvm-svn: 256088
* [CMake] Support a simple case for bootstrap builds to generate PGO dataChris Bieneman2015-12-193-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler. With this patch applied you can configure your build directory with the following invocation of CMake: cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir> After configuration the following additional targets will be generated: stage2-instrumented: Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler. stage2-instrumented-generate-profdata: Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training stage2: Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler. stage2-check-llvm: Depends on stage2 and runs check-llvm using the stage3 compiler. stage2-check-clang: Depends on stage2 and runs check-clang using the stage3 compiler. stage2-check-all: Depends on stage2 and runs check-all using the stage3 compiler. stage2-test-suite: Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite). Reviewers: bogner, silvas, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15584 llvm-svn: 256069
* [CMake] Set CLANG_LINKS_TO_CREATE in Apple-stage2.cmake so that we create cc ↵Chris Bieneman2015-09-181-0/+1
| | | | | | and c++ links. llvm-svn: 248016
* [CMake] Add cache scripts for Apple-style clang builds.Chris Bieneman2015-09-153-0/+79
| | | | | | | | | | | | | | | Summary: These CMake cache scripts are my first pass at replicating Apple's packaging logic from autoconf. They can be used on any Darwin machine to approximate an Apple Clang build. The included README file includes documentation and a sample CMake invocation. Reviewers: chandlerc, echristo Subscribers: echristo, cfe-commits Differential Revision: http://reviews.llvm.org/D12817 llvm-svn: 247726
* Make it easier to build against a pre-built Clang package with CMakeReid Kleckner2014-11-051-0/+8
Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's builtin find_package() utility work with Clang. This also allows downstream consumers of Clang to statically link against libraries like clangAST and have that pull in dependencies like clangBasic and LLVMSupport. See the CMake docs on packages: http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html llvm-svn: 221411
OpenPOWER on IntegriCloud