summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Install CheckAtomic.cmake (needed by lldb)Chris Bieneman2016-08-251-2/+1
| | | | | | | | | | | | | | | Summary: Install CheckAtomic.cmake along with other LLVM modules, therefore making it possible for other projects to use it. This file is needed for LLDB to be built standalone, and installing it was suggested in https://reviews.llvm.org/D23881. Patch by: Michał Górny Reviewers: krytarowski, zturner, eugenis, jyknight, labath, beanz Subscribers: beanz, llvm-commits Differential Revision: https://reviews.llvm.org/D23887 llvm-svn: 279777
* [CMake] Make llvm-config implicit dependency for subprojectsChris Bieneman2016-08-181-1/+1
| | | | | | | | The subproject interface being used for runtime libraries expects that llvm-config is passed into the subproject for consumption. We currently do this for every subproject, so we should expect that all LLVM ExternalProjects depend on llvm-config for the time being. Eventually I'd like to see the sub-projects using LLVMConfig.cmake instead of the llvm-config binary, but that will take time to roll out. llvm-svn: 279155
* Remove LLVM_ENABLE_LIBCXXABIJonas Hahnfeld2016-08-041-5/+0
| | | | | | | | libc++.so is now a linker script that includes -lc++abi if necessary. Differential Revision: https://reviews.llvm.org/D22861 llvm-svn: 277714
* Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker.Eugene Zelenko2016-07-291-0/+6
| | | | | | Differential revision: https://reviews.llvm.org/D22896 llvm-svn: 277093
* [llvm-go] parameterize $GOPATH constructionAndrew Wilkins2016-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: To build llgo, you must currently ensure that llgo is in the tools/llgo directory, due to a hard-coded path in llvm-go. To support the use of LLVM_EXTERNAL_LLGO_SOURCE_DIR, we introduce a flag to llvm-go that enables the caller to specify the paths to symlink in the temporary $GOPATH. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D21634 llvm-svn: 276829
* cmake: When adding lit testsuites, ignore Output directoriesJustin Bogner2016-07-251-1/+2
| | | | | | | | | With in-tree builds we can get Output directories scattered among our tests. Recursing into those to find tests doesn't make sense. Thanks to nlewycky for noticing this! llvm-svn: 276667
* Add AIX support to Path.inc, Host.h, and CMake.Chandler Carruth2016-07-192-4/+7
| | | | | | | | Patch by Andrew Paprocki! Differential Revision: https://reviews.llvm.org/D18359 llvm-svn: 276045
* [cmake] Create the LLVM_BUILD_UTILS option.Michael Gottesman2016-07-101-2/+7
| | | | | | | | | | | | | | | This option is the equivalent option to LLVM_BUILD_TOOLS but for executables created via add_llvm_utility. This is a useful tool for improving compile time in situations where LLVM is used as a library and no testing tools are needed. It follows the exact same implemention model as LLVM_BUILD_TOOLS. Since the option is by default set to on, no behavior is changed unless one sets it from the command line to be false. llvm-svn: 275007
* [CMake] Adjust export_executable_symbols to cope with non-target link librariesJohn Brawn2016-07-051-13/+15
| | | | | | | | | export_executable_symbols looks though the link libraries of the executable in order to figure out transitive dependencies, but in doing so it assumes that all link libraries are also targets. This is not true as of r273302, so adjust it to check if they actually are targets. llvm-svn: 274546
* [CMake] Add LLVM_BUILD_32_BITS to LLVMConfig.cmakeJohn Brawn2016-07-011-0/+2
| | | | | | | | | | | Previously out-of-tree passes could detect if LLVM was built with LLVM_BUILD_32_BITS by looking for -m32 in LLVM_DEFINITIONS, but as of r271871 it no longer appears there. Resolve this by instead emitting LLVM_BUILD_32_BITS in LLVMConfig so it can be checked for directly. Differential Revision: http://reviews.llvm.org/D21434 llvm-svn: 274351
* [CMake] Add an LLVM_ENABLE_MODULE_DEBUGGING flag for building with -gmodules.Adrian Prantl2016-06-301-0/+5
| | | | | | | | | This flag is only effective in builds with debug info and modules. The default is On for Darwin only. rdar://problem/27019000 llvm-svn: 274244
* Revert "[CMake] Move the -Xclang option before -fmodules-cache-path"Adrian Prantl2016-06-301-2/+2
| | | | | | | | | This reverts commit 3db82f646a0890eb7664d0351b5a3c79622e8bef. Vassil already fixed this and I mechanically undid his fix without looking too close at what I'm actually doing. Need more coffee. llvm-svn: 274242
* [CMake] Move the -Xclang option before -fmodules-cache-pathAdrian Prantl2016-06-301-2/+2
| | | | | | | | | | This fixes a typo introduced in r274196. Thanks to Vassil Vassilev for noticing! http://reviews.llvm.org/D21827 rdar://problem/27019000 llvm-svn: 274240
* [CMake] -fmodules-local-submodule-visibility is a cc1-only option.Vassil Vassilev2016-06-301-2/+2
| | | | | | This should fix modules builds on platforms other than Darwin after r274196. llvm-svn: 274227
* [CMake] Introduce a LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY flag.Adrian Prantl2016-06-301-2/+11
| | | | | | | | | | | | | On Darwin it is currently impossible to build LLVM with modules because the Darwin system module map is not compatible with -fmodules-local-submodule-visibility at this point in time. This patch makes the flag optional and off by default on Darwin so it becomes possible to build LLVM with modules again. http://reviews.llvm.org/D21827 rdar://problem/27019000 llvm-svn: 274196
* [LLVMConfig.cmake] LLVM_CONFIG_EXPORTED_TARGETS => LLVM_EXPORTED_TARGETS.Michael Gottesman2016-06-291-1/+1
| | | | | | | This matches more closely the rest of the variables in LLVMConfig.cmake which shed the _CONFIG_ part of their names. llvm-svn: 274175
* [LLVMConfig.cmake.in] Create a new variable LLVM_CONFIG_EXPORTED_TARGETS ↵Michael Gottesman2016-06-291-0/+1
| | | | | | that contains the list of all targets exported via LLVMExports.cmake. llvm-svn: 274140
* [cmake] Port the llvm-config option --build-mode to LLVMConfig.cmake via the ↵Michael Gottesman2016-06-251-0/+2
| | | | | | | | | | | | variable LLVM_BUILD_TYPE. This is just a small step in the direction of making LLVMConfig.cmake a complete replacement for llvm-config. For those unfamiliar, llvm-config --build-mode prints out CMAKE_BUILD_TYPE. Thus as one can imagine, LLVM_BUILD_TYPE is @CMAKE_BUILD_TYPE@. llvm-svn: 273782
* [CMake] Add LLVM runtimes directoryChris Bieneman2016-06-231-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There are a few LLVM projects that produce runtime libraries. Ideally runtime libraries should be built differently than other projects, specifically they should be built using the just-built toolchain. There is support for building compiler-rt in this way from the clang build. Moving this logic into the LLVM build is interesting because it provides a simpler way to extend the just-built toolchain to include LLD and the LLVM object file tools. Once this functionality is better fleshed out and tested we’ll want to encapsulate it in a module that can be used for clang standalone builds, and we’ll want to make it the default way to build compiler-rt. With this patch applied there is no immediate change in the build. Moving compiler-rt out from llvm/projects into llvm/runtimes enables the functionality. This code has a few improvements over the method provided by LLVM_BUILD_EXTERNAL_COMPILER_RT. Specifically the sub-ninja command is always invoked, so changes to compiler-rt source files will get built properly, so this patch can be used for iterative development with just-built tools. This first patch only works with compiler-rt. Support for other runtime projects will be coming in follow-up patches. Reviewers: chandlerc, bogner Subscribers: kubabrecka, llvm-commits Differential Revision: http://reviews.llvm.org/D20992 llvm-svn: 273620
* Default to using the Unicode version of Win32 APIs instead of the ANSI ↵Aaron Ballman2016-06-231-0/+6
| | | | | | version. This helps to catch instances where a developer accidentally forgets to explicitly specify which version of the API to use and accidentally winds up failing to support non-ASCII characters properly. llvm-svn: 273599
* [LLVM][MIPS] Introduce 64 bit atomic check in CheckAtomic.cmakeSagar Thakur2016-06-231-0/+37
| | | | | | | | | | Patch by Nitesh Jain. Summary: On some target like MIPS32 we need to explicitly link atomic library for 64 bit atomic operations. This module then can be used in LLDB (http://reviews.llvm.org/D20464) or Libcxx (http://reviews.llvm.org/D16613) for explicitly link to atomic library. Reviewers: chandlerc, beanz Differential: reviews.llvm.org/D20896 llvm-svn: 273534
* [CMake] LLVM_BINARY_DIR was not being properly set in LLVMConfig.cmakeChris Bieneman2016-06-222-1/+3
| | | | | | LLVMConfig.cmake needs to set LLVM_BINARY_DIR differently based on whether or not it is the build directory or the install directory. The build directory just needs to set the value from the configuration, the install directory needs to set it to the install prefix. llvm-svn: 273479
* [build] Fixed build break for OCaml bindings.Artem Belevich2016-06-211-1/+7
| | | | | | | After r273302 LLVM_SYSTEM_LIBS may have entries that already have -l prefix and we need to deal with that. llvm-svn: 273333
* [build] Make sure to link main executable with pthreadsArtem Belevich2016-06-211-1/+10
| | | | | | | | | | Otherwise it gets linked in by one of the dependencies of shared libraries which may be too late and we end up with weird crashes in std::call_once(). Differential Revision: http://reviews.llvm.org/D21478 llvm-svn: 273302
* Add support for collating profiles for use with code coverageVedant Kumar2016-06-131-1/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D20993 llvm-svn: 272599
* [CMake] Removing fallback code for CMake versions before 3.1Chris Bieneman2016-06-091-14/+0
| | | | | | This code is dead code now. Out with the old, in with the new! llvm-svn: 272347
* [CMake] Cleanup ExternalProject usage of CMake 3.x featuresChris Bieneman2016-06-091-19/+7
| | | | | | All the ExternalProject features in use here are supported by CMake 3.4.3, so we don't need these version checks anymore. llvm-svn: 272327
* [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
OpenPOWER on IntegriCloud