summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* 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] Check for sys/types.h in config-ix.cmakeJeroen Ketema2016-04-071-0/+1
| | | | | | | | | `sys/types.h` has a related define in `config.h.cmake`, but was never checked for in CMake. Sync this. Differential Revision: http://reviews.llvm.org/D18825 llvm-svn: 265648
* [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
* Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may ↵NAKAMURA Takumi2016-03-071-15/+0
| | | | | | | | check the decl instead of the versions of individual libraries." We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32. llvm-svn: 262810
* [cmake] Check the compiler version firstReid Kleckner2016-03-023-43/+52
| | | | | | | | | | | | | | | 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
* Refactor duplicated code for linking with pthread.Rafael Espindola2016-03-011-0/+4
| | | | llvm-svn: 262344
* [CMAKE] Update build on recent HaikuRenato Golin2016-02-262-1/+4
| | | | | | | | | This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess. Please consider reviewing. Pathc by Jérôme Duval. llvm-svn: 262038
* cmake: Simplify the iOS.cmake toolchainJustin Bogner2016-02-121-40/+15
| | | | | | | | | | | | | | | - Remove a comment that was clearly copy pasted from Android.cmake and isn't relevant. - Remove the toolchain's sensitivity to the environment. It's less error prone to just allow users to set CMAKE_OSX_SYSROOT if they want to use a custom SDK. - Stop explicitly setting -mios-version-min to the default value. It just adds needless complexity. This makes building the native tablegen work for me even when SDKROOT is set in the environment (or passed in as -DCMAKE_OSX_SYSROOT). llvm-svn: 260763
* 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-264-163/+1530
| | | | | | | | | | | | | | | | 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
* [autoconf] Install VersionFromVCS.cmake, too. clang/CMakeLists.txt requires it.NAKAMURA Takumi2016-01-151-2/+1
| | | | llvm-svn: 257856
* [CMake] Add support for populating LLVM_REPOSITORY from CMake.Chris Bieneman2016-01-141-0/+16
| | | | | | Autoconf does this in the GetRepositoryPath script, CMake's VersionFromVCS does grab the SVN_REVISION, but doesn't populate the repository URL. llvm-svn: 257826
* Explicitly enable OBJECT library "target".Axel Naumann2016-01-121-2/+4
| | | | | | | | | | | | | With this, one can build a lib from the objects of other libs: set(SOURCES $<TARGET_OBJECTS:obj.clingInterpreter> $<TARGET_OBJECTS:obj.clingMetaProcessor> $<TARGET_OBJECTS:obj.clingUtils> ) Reviewed by Chris Bieneman - thanks! llvm-svn: 257459
* Revert r257003Andrew Wilkins2016-01-121-1/+6
| | | | | | | | This revision breaks llvm-config if you set BUILD_SHARED_LIBS=on in a CMake build. Backing out until the fix is ready to land. llvm-svn: 257457
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-071-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: 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/D15033 llvm-svn: 257003
* Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPSNico Weber2016-01-061-0/+30
| | | | | | | | | | | | | | | | | | | | | LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's binaries. Turning it off is useful for deterministic builds. r246905 made it so that the define suddenly also controls if the binaries that the llvm binaries _create_ embed timestamps or not – but this shouldn't be a configure-time option. r256203/r256204 added a driver option to toggle this on and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is deterministic – but the built clang can still write timestamps into other executables when requested. This also allows removing some of the test machinery added in r292012 to work around this problem. See PR24740 for background. http://reviews.llvm.org/D15783 llvm-svn: 256958
* Reverting r256836; it causes a build bot failure: ↵Aaron Ballman2016-01-051-11/+0
| | | | | | http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/14050/steps/build/logs/stdio llvm-svn: 256837
* Enable more strict standards conformance in MSVC for rvalue casting and ↵Aaron Ballman2016-01-051-0/+11
| | | | | | | | string literal type conversion to non-const types. Also enables generation of intrinsics for more functions. Patch by Alexander Riccio llvm-svn: 256836
* win: Pass /W4 in front of all the -wd flags.Nico Weber2015-12-231-1/+4
| | | | | | | | | | | This should fix many many -Wunused-parameter warnings in self-host builds on Windows after r255382. cl.exe doesn't care about the order of /W4 and /wd flags, but clang-cl currently does (just like -Wno-foo -Wall order matters for clang). We might want to change how clang-cl behaves in the future, but until then this change makes self-host builds much more silent. llvm-svn: 256315
* Revert r254592 (virtual dtor in SCEVPredicate).Andy Gibbs2015-12-171-10/+17
| | | | | | | | Clang has better diagnostics in this case. It is not necessary therefore to change the destructor to avoid what is effectively an invalid warning in gcc. Instead, better handle the warning flags given to the compiler. llvm-svn: 255905
* Install runtime dlls in the INSTALL_DIR/bin directory. NFCSumanth Gundapaneni2015-12-161-2/+4
| | | | | | | | | One of the earlier patches updated the cmake rule to install the runtime dlls in INSTALL_DIR/lib which is not correct. This patch updates the rule to install CMake's RUNTIME in bin directory Differential Revision: http://reviews.llvm.org/D15505 llvm-svn: 255781
* [CMake] Add LLVM_BUILD_INSTRUMENTED option to enable building with ↵Chris Bieneman2015-12-101-0/+8
| | | | | | | | -fprofile-instr-generate This is the first step in supporting PGO data generation via CMake. I've marked the option as advanced and experimental until it is fleshed out further. llvm-svn: 255298
* [CMake] Ignore externalizing debuginfo for unit testsChris Bieneman2015-12-081-3/+5
| | | | | | If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test. llvm-svn: 255056
* Silence all C4592 warnings with MSVC 2015 Update 1. This warning produces ↵Aaron Ballman2015-12-071-0/+3
| | | | | | | | false positives that Microsoft says will be fixed in Update 2. Until this produces reliable diagnostics, it is safe to disable the diagnostic -- the compiler is not doing anything different than it previously did aside from issuing the diagnostic. (Note, this silences at least one false positive in LLVM with FeatureBitset uses.) llvm-svn: 254915
* [CMake] Fixing botsChris Bieneman2015-12-031-1/+1
| | | | | | CMake calls to set_property with APPEND string need to have a leading space. llvm-svn: 254659
* [CMake] set_target_properties doesn't append link flagsChris Bieneman2015-12-031-3/+3
| | | | | | This fixes a bug introduced in r254627, and another occurance of the same bug in this file. llvm-svn: 254657
* [CMake] Removing an unnecessary layer of variable indirectionChris Bieneman2015-12-031-1/+1
| | | | | | This prevents passthrough variables from having values. llvm-svn: 254641
OpenPOWER on IntegriCloud