summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Add LLVM_TOOLS_INSTALL_DIR to LLVMConfig.cmakeChris Bieneman2016-06-091-0/+1
| | | | | | This is the more-correct fix to out-of-tree building. AddLLVM.cmake relies on this variable being set, so we should make sure it is set in LLVMConfig.cmake. llvm-svn: 272279
* [CMake] Cleanup version check for 2.8.11Chris Bieneman2016-06-081-8/+6
| | | | | | We are always greater than CMake 2.8.11, so we don't need this check. llvm-svn: 272220
* [CMake] Cleanup version check for 2.8.12Chris Bieneman2016-06-081-15/+6
| | | | | | Since we're always greater than 2.8.12, we don't need this check anymore. llvm-svn: 272219
* cmake: Simplify add_lit_testsuitesJustin Bogner2016-06-081-21/+13
| | | | | | | cmake 3.4 introduced LIST_DIRECTORIES to glob recurse, which can be used to simplify this code greatly. llvm-svn: 272217
* [CMake] Cleanup uses of USES_TERMINALChris Bieneman2016-06-082-8/+4
| | | | | | Now that we are on CMake 3.4.3 we no longer need a version check around this. llvm-svn: 272211
* [CMake] Fixing a typoChris Bieneman2016-06-081-1/+1
| | | | | | This was called out on the list a long time ago and just got pointed out to me again. Need to fix it before I forget. llvm-svn: 272201
* [CMake] Support overriding binary install directoryChris Bieneman2016-06-082-3/+3
| | | | | | | | This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag. This patch is based on patches from and collaboration with Tony Kelman, and replaces http://reviews.llvm.org/D20934. llvm-svn: 272200
* Revert "Use CMAKE_INSTALL_BINDIR instead of hardcoding bin for tools install ↵Chris Bieneman2016-06-072-3/+3
| | | | | | | | paths" This reverts commit 0dc5a55f66ed06d7859c4e0474a87428d27775e6. llvm-svn: 272033
* Use CMAKE_INSTALL_BINDIR instead of hardcoding bin for tools install pathsChris Bieneman2016-06-072-3/+3
| | | | | | | | | | | | | | Summary: This allows customizing the location executables and symlinks get installed to, as with --bindir in autotools. Reviewers: loladiro, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20934 llvm-svn: 272031
* LLVM_BUILD_32_BITS: Add -m32 with CMAKE_C*_FLAGS. [CMP0056]NAKAMURA Takumi2016-06-061-1/+2
| | | | | | | | | With CMP0056, try_compile() uses also CMAKE_EXE_LINKER_FLAG. It caused mismatch between CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS, to fail to examine CXX_SUPPORTS_CXX11 with -m32. FYI, before this, try_compile() tries without -m32 regardless of LLVM_BUILD_32_BITS. llvm-svn: 271871
* cmake: Fix color diags under ninja if the compiler is "AppleClang"Justin Bogner2016-06-011-1/+1
| | | | | | | Apparently cmake differentiates between Clang and AppleClang, and we fail to color our diagnostics if you have the latter. Fix that. llvm-svn: 271442
* Since some time clang itself figures out the default for ↵Ismail Donmez2016-05-261-13/+0
| | | | | | | | | | ms-compatibility-version and uses it. Trying to figure it out during build is redundant and also will not work when the environment variable VSINSTALLDIR is not defined (which is not defined if you don't install whole Visual Studio but use Visual C++ Build Tools package). Tested by bootstrapping clang with clang-cl. Differential Revision: http://reviews.llvm.org/D20672 llvm-svn: 270860
* Add auto-exporting of symbols from tools so that plugins work on WindowsJohn Brawn2016-05-263-13/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with plugins on Windows is that when building a plugin DLL it needs to explicitly link against something (an exe or DLL) if it uses symbols from that thing, and that thing must explicitly export those symbols. Also there's a limit of 65535 symbols that can be exported. This means that currently plugins only work on Windows when using BUILD_SHARED_LIBS, and that doesn't work with MSVC. This patch adds an LLVM_EXPORT_SYMBOLS_FOR_PLUGINS option, which when enabled automatically exports from all LLVM tools the symbols that a plugin could want to use so that a plugin can link against a tool directly. Plugins can specify what tool they link against by using PLUGIN_TOOL argument to llvm_add_library. The option can also be enabled on Linux, though there all it should do is restrict the set of symbols that are exported as by default all symbols are exported. This option is currently OFF by default, as while I've verified that it works with MSVC, linux gcc, and cygwin gcc, I haven't tried mingw gcc and I have no idea what will happen on OSX. Also unfortunately we can't turn on LLVM_ENABLE_PLUGINS when the option is ON as bugpoint-passes needs to be loaded by both bugpoint.exe and opt.exe which is incompatible with this approach. Also currently clang plugins don't work with this approach, which will be fixed in future patches. Differential Revision: http://reviews.llvm.org/D18826 llvm-svn: 270839
* Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"Steven Wu2016-05-261-7/+12
| | | | | | This reverts r270723. This commit breaks greendragon. llvm-svn: 270820
* [CMake] LINK_LIBS need to be public for Darwin dylib targetsChris Bieneman2016-05-251-12/+7
| | | | | | This should actually address PR27855. This results in adding references to the system libs inside generated dylibs so that they get correctly pulled in when linking against the dylib. llvm-svn: 270723
* [CMake] Add some extra variables to LLVMConfig.cmake.inChris Bieneman2016-05-101-0/+2
| | | | | | | | Compiler-RT needs LLVM_LIBRARY_DIR, LLVM_BINARY_DIR. Setting these in LLVMConfig.cmake will allow Compiler-RT to not need to run llvm-config as long as the LLVMConfig.cmake module is in the CMake module path. llvm-svn: 269104
* cmake: Avoid continue, apparently that's newJustin Bogner2016-05-061-8/+7
| | | | llvm-svn: 268812
* CMake: generate check targets for lit suites without their own lit.cfgsJustin Bogner2016-05-061-6/+21
| | | | | | | | | | | | | Currently our cmake generates targets like check-llvm-unit and check-llvm-transforms-loopunroll-x86, but not check-llvm-transforms or check-llvm-transforms-adce. This is because the search for test suites only lists the ones with a custom lit.cfg or lit.local.cfg. Instead, we can do something a little smarter - any directory under test that isn't called Inputs or inside a directory called Inputs is a test suite. llvm-svn: 268806
* Remove LLVM_ENABLE_TIMESTAMPSChris Bieneman2016-05-051-15/+10
| | | | | | | | | | | | | | | | | | | Summary: As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS. The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled. With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic. See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html Reviewers: bogner, silvas, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19892 llvm-svn: 268670
* Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to ↵Filipe Cabecinhas2016-04-291-0/+5
| | | | | | | | | | | | | | | | | | | the cmake build to enable them. Summary: Historically, we had a switch in the Makefiles for turning on "expensive checks". This has never been ported to the cmake build, but the (dead-ish) code is still around. This will also make it easier to turn it on in buildbots. Reviewers: chandlerc Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits Differential Revision: http://reviews.llvm.org/D19723 llvm-svn: 268050
* cmake: Fix grammarTobias Grosser2016-04-291-2/+2
| | | | llvm-svn: 268038
* When building with LLVM_ENABLE_MODULES, put the module cache into the buildRichard Smith2016-04-171-19/+18
| | | | | | directory. This is important for build bots to avoid filling up /tmp. llvm-svn: 266571
* Add SVN version to libLLVMLTOMehdi Amini2016-04-162-9/+54
| | | | | | | | | | | | | | | | | | | | Summary: For Incremental LTO, we need to make sure that an old cache entry is not used when incrementally re-linking with a new libLTO. Adding a global LLVM_REVISION in llvm-config.h would for to rebuild/relink the world for every "git pull"/"svn update". So instead only libLTO is made dependent on the VCS and will be rebuilt (and the dependent binaries relinked, i.e. as of today: libLTO.dylib and llvm-lto). Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18987 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266523
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-161-0/+2
| | | | | | | | | | | | At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. llvm-svn: 266515
* Update and fix LLVM_ENABLE_MODULES:Richard Smith2016-04-161-19/+19
| | | | | | | | | | | | | | | | 1) We need to add this flag prior to adding any other, in case the user has specified a -fmodule-cache-path= flag in their custom CXXFLAGS. Such a flag causes -Werror builds to fail, and thus all config checks fail, until we add the corresponding -fmodules flag. The modules selfhost bot does this, for instance. 2) Delete module maps that were putting .cpp files into modules. 3) Enable -fmodules-local-submodule-visibility, to get proper module visibility rules applied across submodules of the same module. Disable -fmodules for C builds, since that flag is not available there. llvm-svn: 266502
* [CMake] Make llvm_ExternalProject always call the build actionChris Bieneman2016-04-081-9/+17
| | | | | | | | This makes it so that when running 'ninja test-suite' from the top-level LLVM ninja build it *always* re-runs the ninja command in the test-suite directory. This mechanism is required because the top-level ninja file doesn't have a view into the subdirectory dependency tree, so it can't know what, if anything, needs to be rebuilt. llvm-svn: 265863
* [CMake] Provide the ability to skip stripping when generating dSYMsChris Bieneman2016-03-311-1/+6
| | | | | | For debugging it is useful to be able to generate dSYM files but not strip the executables. This change adds the ability to skip stripping by setting LLVM_EXTERNALIZE_DEBUGINFO_SKIP_STRIP=On. llvm-svn: 265041
* [cmake] Instead of testing char16_t for MSVC compat, directly ask cl.exe its ↵Reid Kleckner2016-03-301-8/+10
| | | | | | | | version Credit to Aaron Ballman for thinking of this. llvm-svn: 264886
* [cmake] Add -fms-compatibility-version=19 when clang-cl gives errors about ↵Reid Kleckner2016-03-301-0/+11
| | | | | | | | | | | char16_t What we are really trying to do here is to figure out if we are using the 2015 STL. Unfortunately, so far as I know the MSVC STL does not define a version macro that we can check directly. Instead I wrote a check to see if char16_t works. llvm-svn: 264881
* [cmake] Allow EH usage with clang-clReid Kleckner2016-03-301-3/+3
| | | | llvm-svn: 264880
* cmake: include what you useSaleem Abdulrasool2016-03-081-0/+2
| | | | | | | | Add a missing include. This is important in the case HandleLLVMOptions is included prior to the missing CheckCXXSourceCompiles or CheckCXXCompilerFlag which includes CheckCXXSourceCompiles. llvm-svn: 262949
* [CMake] Refactor add_llvm_implicit_projects to be reusableChris Bieneman2016-03-081-3/+7
| | | | | | This adds llvm_add_implicit_projects which takes a project name and is wrapped by add_llvm_implicit_projects. llvm-svn: 262948
* [cmake] Check the compiler version firstReid Kleckner2016-03-022-43/+51
| | | | | | | | | | | | | | | Otherwise users get messages from CheckAtomic about missing libatomic instead of a sensible message that says "use GCC 4.7 or newer". I structured the change along the lines of HandleLLVMStdlib.cmake, so that the standalone build of Clang still gets the compiler version check. Reviewers: beanz Differential Revision: http://reviews.llvm.org/D17789 llvm-svn: 262491
* Avoid linking LLVM component libraries with libLLVMAndrew Wilkins2016-02-122-19/+28
| | | | | | | | | | | Patch by Jack Howarth. When linking to libLLVM, don't also link to the component libraries that constitute libLLVM. Differential Revision: http://reviews.llvm.org/D16945 llvm-svn: 260641
* Disable MSVC 2015's warning about zero extending after ~ and othersReid Kleckner2016-02-101-1/+2
| | | | | | | | | Very often in LLVM we have APIs that take a bitwidth and a uint64_t that we pass immediates such as ~0U to. Consider APInt, Constant, and MachineInstrBuilder::addImm. Fixing all uses of these APIs to manually extend their arguments to uint64_t doesn't seem worth it. llvm-svn: 260416
* Revert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"Reid Kleckner2016-02-101-1/+1
| | | | | | This reverts r260262, it broke some LLVM tests (bugpoint). llvm-svn: 260339
* Turn on LLVM_ENABLE_PLUGINS by default on WindowsEhsan Akhgari2016-02-091-1/+1
| | | | | | | | | | Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16760 llvm-svn: 260262
* cmake: Use "set" instead of "option" for LLVM_ENABLE_LTOJustin Bogner2016-02-081-1/+1
| | | | | | | | | Apparently option is for bools and cmake-gui will display this strangely with option. Pointed out by edward-san - thanks! llvm-svn: 260154
* cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTOJustin Bogner2016-02-081-6/+12
| | | | | | | Mehdi suggested in a review of r259766 that it's also useful to easily set the type of LTO. Augment the cmake variable to support that. llvm-svn: 260143
* Install cmake files to lib/cmake/llvmNiels Ole Salscheider2016-02-041-1/+1
| | | | | | | | | | | This is the right location for platform-specific files. On some distributions (e. g. Exherbo), a package can be installed for several architectures in parallel, but the architecture-independent files are shared. Therefore, we must not install architecture-dependent files (like the CMake config and export files) to share/. llvm-svn: 259821
* cmake: Add a flag to enable LTOJustin Bogner2016-02-041-0/+7
| | | | | | | This adds -DLLVM_ENABLE_LTO, rather than forcing people to manually add -flto to the various _FLAGS variables. llvm-svn: 259766
* Remove autoconf supportChris Bieneman2016-01-262-151/+1
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Reapplying r256836 with a fix for MSVC 14 support.Aaron Ballman2016-01-251-0/+17
| | | | | | | | Enable more strict standards conformance in MSVC for rvalue casting and string literal type conversion to non-const types. Also enables generation of intrinsics for more functions. Patch by Alexander Riccio llvm-svn: 258687
* [cmake] Disable manifest generation when LLD is the linkerReid Kleckner2016-01-221-4/+8
| | | | | | | Running mt.exe to make the manifest is really slow. Disabling manifest generation doesn't seem to break anything. llvm-svn: 258581
* Strip local symbols when using externalized debug info.Owen Anderson2016-01-221-1/+1
| | | | | | | | | | | When we build LLVM with externalized debug info, all debugging and symbolication related data is extracted into dSYM files prior to stripping. As such, there is no need to preserve local symbols in LLVM binaries after dSYM creation. This shrinks libLLVM.dylib from 58MB to 55MB on my system. llvm-svn: 258566
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-201-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-commit of r257003, which was reverted, along with the fixes from http://reviews.llvm.org/D15986. r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15986 llvm-svn: 258283
* Reenable -Wexpansion-to-defined.Nico Weber2016-01-191-3/+0
| | | | | | | | | I think I fixed all instances of this in the codebase (r258202, 258200, 258190). Also, the suppression didn't have an effect on bots using make anyways, and it looks like many bots still use configure/make bots. llvm-svn: 258210
* Fix bootstrap -Werror builds after clang r258128Nico Weber2016-01-191-0/+3
| | | | llvm-svn: 258181
* [cmake] Fix add_version_info_from_vcs git svn version bug.Geoff Berry2016-01-191-17/+9
| | | | | | | | | | | | | | | | | | | | Summary: add_version_info_from_vcs was setting SVN_REVISION to the last fetched svn revision when using git svn instead of the svn revision corresponding to HEAD. This leads to conflicts with the definition of SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is not the most recently fetched svn revision. Use 'git svn info' to determine SVN_REVISION when git svn is being used instead (as is done in GetSVN.cmake). Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16299 llvm-svn: 258148
* [CMake] Need to install VersionFromVCS.cmake as part of LLVM's CMake modulesChris Bieneman2016-01-151-1/+0
| | | | | | This is required to support clang --version detecting the clang repository information. llvm-svn: 257909
OpenPOWER on IntegriCloud