summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into ↵NAKAMURA Takumi2017-07-181-5/+1
| | | | | | | | | | | | | | clang/Config/config.h. LLVM_ENABLE_MODULES is sensitive of -D. Move them into config.h. FIXME: It'd be better that they are #cmakedefine01 rather than #cmakedefine. (#if FOO rather than #if defined(FOO)) Then we can find missing #include "clang/Config/config.h" in the future. Differential Revision: https://reviews.llvm.org/D35527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308277 91177308-0d34-0410-b5e6-96231b3b80d8
* [GSoC] Shell autocompletion for clangYuka Takahashi2017-05-231-0/+4
| | | | | | | | | | | | | | | | | Summary: This is a first patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. Simple flag completion and path completion is available in this patch. Reviewers: teemperor, v.g.vassilev, ruiu, Bigcheese, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33237 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303670 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
* [analyzer] Add new Z3 constraint manager backendDominic Chen2017-04-041-6/+19
| | | | | | | | | | | | 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
* Define LLVM_ENABLE_WARNINGS when building standalone clang to ensure ↵Eric Fiselier2017-03-071-0/+1
| | | | | | warnings get enabled git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297106 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/CMakeLists.txt: Rework r294954 -- use file(TO_CMAKE_PATH).NAKAMURA Takumi2017-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295592 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.NAKAMURA Takumi2017-02-131-1/+5
| | | | | | | | CMake handles paths with slashes. It caused cmake/install failure on msbuild.exe. Note, Other llvm-config-oriented variables have been normalized since they are stored in the cache attributed with PATH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294954 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Port clang tests to canonicalized booleansMichal Gorny2017-01-251-16/+0
| | | | | | | | | | | Use the new llvm_canonicalize_cmake_booleans() function to canonicalize booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables used to hold canonicalized values with in-place canonicalization. Use implicit logic in Python code to avoid overrelying on exact 0/1 values. Differential Revision: https://reviews.llvm.org/D28529 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293052 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Separate LLVM_ENABLE_LTO and LLVM_ENABLE_LLDPetr Hosek2017-01-181-3/+5
| | | | | | | | | These two are independent: it's possible to use LLD without LTO, and it's possible to do LTO build without LLD. Differential Revision: https://reviews.llvm.org/D28821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292343 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Obtain LLVM_CMAKE_PATH from llvm-configMichal Gorny2017-01-091-2/+3
| | | | | | | | | Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config instead of reconstructing it locally. Differential Revision: https://reviews.llvm.org/D26900 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291495 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Fix clean build of generate-order-fileAlexander Shaposhnikov2016-12-311-23/+23
| | | | | | | | | | | | | | This diff fixes the clean build of the target generate-order-file. In llvm/tools/clang/CMakeLists.txt add_subdirectory(utils/perf-training) should go after the block where the value of the variable CLANG_ORDER_FILE is set - otherwise (tested with cmake's version 3.6.2) the arguments of perf-helper.py gen-order-file will be ill-formed (CLANG_ORDER_FILE will be empty). Differential revision: https://reviews.llvm.org/D28153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290781 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Allow setting the default linker during buildPetr Hosek2016-12-141-0/+3
| | | | | | | | | This change allows setting the default linker used by the Clang driver when configuring the build. Differential Revision: https://reviews.llvm.org/D25263 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289668 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support lld with LTO bootstrapPetr Hosek2016-11-161-3/+8
| | | | | | | | | lld has LTO support, if requested we should add a dependency on lld rather than LLVMgold when doing LTO bootstrap build. Differential Revision: https://reviews.llvm.org/D26649 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287179 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add clang-bootstrap-deps targetChris Bieneman2016-10-191-11/+13
| | | | | | | | Having this target allows other parts of the build system to add to the bootstrap dependencies without needing to be defined before the bootstrap targets are created. This will specifically be used connect the builtins build from the LLVM runtimes directory as a dependency of the next build stage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284648 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Update lit search to match the one in LLVMMichal Gorny2016-10-181-2/+5
| | | | | | | | | | | Update the lit search logic to support all names supported in LLVM (since r283029). The search order (i.e. PATHS vs HINTS) does no really matter since the established path is not used, except for determining whether lit is available. Differential Revision: https://reviews.llvm.org/D23745 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284496 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add a few default passthrough variables for bootstrap buildsChris Bieneman2016-10-181-1/+3
| | | | | | This just passes through a few missing CMake variables for multi-stage builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284443 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] More robust handling for bootstrap variablesChris Bieneman2016-09-221-1/+5
| | | | | | Checking defined isn't good enough we also need to handle defined to empty string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282125 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Check if passthrough variables are definedChris Bieneman2016-09-211-1/+1
| | | | | | Checking if they evaluate to true cases prevents passing values that evaluate to false cases. Instead we should check if the variables are defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282122 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Pass CLANG_VERSION_* variables into later stagesChris Bieneman2016-09-211-0/+3
| | | | | | When supporting overriding clang versions we also need to pass those through to the next stage so they remain overridden. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282109 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Support overriding CLANG_VERSION_*Chris Bieneman2016-09-201-4/+10
| | | | | | | As with how we handle LLVM_VERSION_* variables we should support overriding clang version variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282003 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify Clang's version number configuration in CMake.David L. Jones2016-09-151-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the Clang version is computed as follows: 1. LLVM defines major, minor, and patch versions, all statically set. Today, these are 4, 0, and 0, respectively. 2. The static version numbers are combined into PACKAGE_VERSION along with a suffix, so the result today looks like "4.0.0svn". 3. Clang extracts CLANG_VERSION from PACKAGE_VERSION using a regexp. The regexp allows the patch level to omitted, and drops any non-digit trailing values. Today, this result looks like "4.0.0". 4. CLANG_VERSION is then split further into CLANG_VERSION_MAJOR and CLANG_VERSION_MINOR. Today, these resolve to 4 and 0, respectively. 5. If CLANG_VERSION matches a regexp with three version components, then CLANG_VERSION_PATCHLEVEL is extracted and the CLANG_HAS_VERSION_PATCHLEVEL variable is set to 1. Today, these values are 0 and 1, respectively. 6. The CLANG_VERSION_* variables (and CLANG_HAS_VERSION_PATCHLEVEL) are configured into [llvm/tools/clang/]include/clang/Basic/Version.inc verbatim by CMake. 7. In [llvm/tools/clang/]include/clang/Basic/Version.h, macros are defined conditionally, based on CLANG_HAS_VERSION_PATCHLEVEL, to compute CLANG_VERSION_STRING as either a two- or three-level version number. Today, this value is "4.0.0", because despite the patchlevel being 0, it was matched by regexp and is thus "HAS"ed by the preprocessor. This string is then used wherever Clang's "version" is needed [*]. [*] Including, notably, by compiler-rt, for computing its installation path. This change collapses steps 2-5 by defaulting Clang to use LLVM's (non-string) version components for the Clang version (see [*] for why not PACKAGE_VERSION), and collapses steps 6 and 7 by simply writing CLANG_VERSION_STRING into Version.inc. The Clang version today always uses the patchlevel form, so the collapsed Version.inc does not have logic for a version without a patch level. Historically speaking, this technique began with the VER file in r82085 (which survives in the form of the regexp in #3). The major, minor, and patchlevel versions were introduced by r106863 (which remains in #4-6). The VER file itself was deleted in favor of the LLVM version number in r106914. On the LLVM side, the individual LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, and PACKAGE_VERSION weren't introduced for nearly two more years, until r150405. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281666 91177308-0d34-0410-b5e6-96231b3b80d8
* driver: Support checking for rlimits via cmake (when bootstrapping)Chris Bieneman2016-08-231-0/+3
| | | | | | | | | | | | | | | | | Summary: Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping. // Please also re-apply dfcd52eb1d8e5d322404b40414cb7331c7380a8c (llvm-config.h fix) Patch by: Michał Górny Reviewers: rsmith, beanz Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279559 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Workflow improvements to PGO generationChris Bieneman2016-08-161-4/+15
| | | | | | | | | | | 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
* Support setting default value for -rtlib at build timeJonas Hahnfeld2016-07-271-2/+13
| | | | | | | | | | | | | | | | | This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binaries on Linux that have no runtime dependence on any gcc libs (libstdc++ or libgcc_s). Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276848 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Pass DYLD_LIBRARY_PATH as CMake variable instead of as envarChris Bieneman2016-07-251-6/+9
| | | | | | | | On OS X 10.11 System Integrity Protection prevents the DYLD environment variables from being set on system binaries. To work around this r276710 accepts DYLD_LIBRARY_PATH as a CMake variable and sets it directly on the archiver commands. To make this work with bootstrapping we need to set DYLD_LIBRARY_PATH to the current stage's library directory and pass that into the next stage's configuration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276711 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleaning up some CMake warningsChris Bieneman2016-07-251-3/+6
| | | | | | | | | | In Bootstrap builds Clang logs some warnings. These are caused because Clang passes CLANG_STAGE and BOOTSTRAP_DEFAULT_PASSTHROUGH into the next stage's configuration. BOOTSTRAP_DEFAULT_PASSTHROUGH shouldn't be passed, so it is renamed to _BOOTSTRAP_DEFAULT_PASSTHROUGH, to prevent passthrough. CLANG_STAGE should be passed, so I've changed the code to log it if it is set outside the if(CLANG_ENABLE_BOOTSTRAP) block. This makes the variable always used, so the warning goes away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276674 91177308-0d34-0410-b5e6-96231b3b80d8
* Update description for CLANG_DEFAULT_CXX_STDLIB and add comment. NFCJonas Hahnfeld2016-07-251-2/+2
| | | | | | | We agreed to call it "platform default" instead of "architecture default". (see D17286) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276618 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLSMichael Gottesman2016-07-101-0/+3
| | | | | | | | | | | | | | 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-143/+5
| | | | | | | | | 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] Move creation of ClangTargets and installation of ClangConfig.cmake ↵Michael Gottesman2016-06-291-22/+1
| | | | | | | | 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] Remove CLANG_APPEND_VC_REV optionChris Bieneman2016-06-241-13/+0
| | | | | | | | | | | | I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem. Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf). The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems. This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273714 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ENABLE_X86_RELAX_RELOCATIONS cmake option.Rafael Espindola2016-06-201-0/+3
| | | | | | This corresponds to binutils' --enable-x86-relax-relocations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273224 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleaning up CMake version checks in ExternalProject callsChris Bieneman2016-06-091-17/+6
| | | | | | Now that we're on CMake 3.4.3 all the ExternalProject features we use are supported everywhere, so we don't need the version checks anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272324 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Version is aways greater than 3Chris Bieneman2016-06-091-25/+22
| | | | | | We don't need any checks for this code anymore. Since CMake version is always greater than 3 we can always generate the exports file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272323 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleaning up CMake feature gating on 2.8.12Chris Bieneman2016-06-091-15/+1
| | | | | | CMake 2.8.12 introduced interface libraries and some related policies. This removes the conditional block because we're now past 2.8.12. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272312 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake] Fix an issue building out-of-tree introduced in r272200"Chris Bieneman2016-06-091-2/+0
| | | | | | | | This reverts r272275. This actually wasn't the right way to fix the problem. The correct solution is in r272279. Applying the fix to LLVM as done in r272279, means this fix will get picked up by all projects building out of tree using LLVM's CMake modules. As opposed to the fix I had in r272275, which would require each project to change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272280 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fix an issue building out-of-tree introduced in r272200Chris Bieneman2016-06-091-0/+2
| | | | | | The out-of-tree build needs to read LLVM_TOOLS_INSTALL_DIR out of TOOLS_BINARY_DIR because LLVM_TOOLS_INSTALL_DIR is used by AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272275 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass --build-id to ld by default.Rafael Espindola2016-06-031-0/+2
| | | | | | | | | | | | We now have a cmake option to change the default: ENABLE_LINKER_BUILD_ID. The reason is that build-id is fairly expensive, so we shouldn't impose it in the regular edit/build cycle. This is similar to gcc, that has an off by default --enable-linker-build-id option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271692 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update to requiring CMake 3.4.3Chris Bieneman2016-05-311-1/+1
| | | | | | | | | | | | | | Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271326 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] On Darwin bootstrap LTO builds set DYLD_LIBRARY_PATH instead of ↵Chris Bieneman2016-04-271-8/+13
| | | | | | | | | | using llvm-ar llvm-ar isn't really supported for Darwin, instead the host tools will load libLTO, so we can use the just-built libLTO. This actually makes Darwin bootstrap builds a little faster because you don't need to build llvm-ar before starting the next stage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267756 91177308-0d34-0410-b5e6-96231b3b80d8
* [Perf-Training] Reworked workflow improvements for order-file generationChris Bieneman2016-04-081-9/+20
| | | | | | | | | | | | | | | | | | | This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64. Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265864 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert to Unix line endings due to previous commit error.Mike Spertus2016-03-281-823/+823
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264610 91177308-0d34-0410-b5e6-96231b3b80d8
* Use VS2015 Project Support for Natvis to eliminate the need to manually ↵Mike Spertus2016-03-281-819/+823
| | | | | | | | | | | install clang native visualizer This is the clang equivalent to llvm commit 264601. When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations. Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264603 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Defaulting CLANG_VENDOR to PACKAGE_VENDORChris Bieneman2016-03-151-1/+1
| | | | | | LLVM r263566 adds a generic PACKAGE_VENDOR configuration which can be used to specify the vendor for LLVM toolchain tools. This change defaults the CLANG_VENDOR to the PACKAGE_VENDOR so that you don't have to specify both when building a package. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263570 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add BINUTILS_INCDIR to the default passthrough list for multi-stage ↵Chris Bieneman2016-02-261-0/+1
| | | | | | | | | | | | builds This is needed to build the gold plugin in multi-stage builds. Patch by Mike Edwards Differential Revision: http://reviews.llvm.org/D17655 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262065 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Revert r260742 (and r260744) to improve order file support.Chandler Carruth2016-02-171-13/+7
| | | | | | | | | | This appears to be passing '-Wl,-order_file' to Linux link commands, which then causes the linker to silently, behind the scenes, write the output to 'rder_file' instead of somewhere else. Will work with Chris to figure out the proper support for this, but so far there are numerous people who can't get Clang to update when they build because of this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261054 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fixing bots I broke.Chris Bieneman2016-02-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260744 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-121-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one. Original Patch Review: http://reviews.llvm.org/D16896 Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260742 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Pass stage1 tools through to stage2 when building with LTOChris Bieneman2016-02-121-2/+6
| | | | | | This was originally a hacky if(APPLE) block. Now that we have an option for enabling LTO, it is better to properly gate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260707 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add option to switch default C++ stdlibJonas Hahnfeld2016-02-121-0/+9
| | | | | | | | | With this option one can optionally override the architecture dependent default library to use if no -stdlib= is provided on compiler invocation. Differential Revision: http://reviews.llvm.org/D15920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260662 91177308-0d34-0410-b5e6-96231b3b80d8