summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [CMake] Add option LLVM_EXTERNALIZE_DEBUGINFOChris Bieneman2015-12-031-0/+27
| | | | | | | | | | | | Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds. Reviewers: bogner, friss Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15133 llvm-svn: 254627
* [CMake] export_executable_symbols also needs to add -rdynamic to the linker ↵Chris Bieneman2015-11-241-0/+4
| | | | | | | | flags on Darwin Without -rdynamic LLVM built with LTO fails to pass "check" due to loadable modules failing. llvm-svn: 253944
* NFC. Fixing my consistently incorrect spelling.Chris Bieneman2015-11-231-4/+4
| | | | llvm-svn: 253936
* Unbreak build on OpenBSD by not adding -Wl,-z,defs to linker flags.Yaron Keren2015-11-211-1/+2
| | | | | | | | | | | | This is similar to the fix for FreeBSD in r226862. Without this patch, the build aborts when linkling libLTO.so, complaining about undefined references to assert2, cxa_atexit, etc. Patch by Stefan Kempf! http://reviews.llvm.org/D14236 llvm-svn: 253769
* [CMake] Fix handling of passing through semi-colon separated lists.Chris Bieneman2015-11-201-1/+2
| | | | | | When passing around CMake arguments as lists of arguments any arguments containing lists need to have their semi-colons escaped otherwise CMake will split the arguments in the middle. llvm-svn: 253719
* [CMake] Support -fvisibility-inlines-hidden when LLVM_ENABLE_PIC=OffChris Bieneman2015-11-181-7/+6
| | | | | | I'm unaware of any reasons why -fvisibility-inlines-hidden would depend on PIC, and since autoconf supports this flag without PIC, we should support it in CMake too. llvm-svn: 253517
* LLVM_ENABLE_MODULES: No need to set -fcxx-modules in trunk, just -fmodules.NAKAMURA Takumi2015-11-131-1/+1
| | | | llvm-svn: 252996
* [CMake] Fixing passthrough for variables starting with the sub-project nameChris Bieneman2015-11-111-1/+1
| | | | | | This allows TEST_SUITE variables to be passed from the top-level CMake into the external project. llvm-svn: 252810
* [CMake] Make llvm_install_library_symlink respect LLVM_LIBDIR_SUFFIX.Chris Bieneman2015-11-111-1/+1
| | | | | | This is required to support multilib install targets, and addresses a regression introduced in r252093. llvm-svn: 252749
* [CMake] Add support for building the llvm test-suite as part of an LLVM ↵Chris Bieneman2015-11-111-0/+194
| | | | | | | | | | | | | | | | | | | build using clang and lld Summary: This patch adds a new CMake module for working with ExternalProjects. This wrapper for ExternalProject supports using just-built tools and can hook up dependencies properly so that projects get cleared out. The example usage here is for the llvm test-suite. In this example, the test-suite is setup as dependent on clang and lld if they are in-tree. If the clang or lld binaries change the test-suite is re-configured, cleaned, and rebuilt. This cleanup and abstraction wrapping ExternalProject can be extended and applied to other runtime libraries like compiler-rt and libcxx. Reviewers: samsonov, jroelofs, rengolin, jmolloy Subscribers: jmolloy, llvm-commits Differential Revision: http://reviews.llvm.org/D14513 llvm-svn: 252747
* [cmake] move SONAME handling to llvm_add_libraryAndrew Wilkins2015-11-101-14/+19
| | | | | | | | | | | | | | | | | | | | Summary: Move handling of the SONAME option from add_llvm_library to llvm_add_library, so that it can be used in sub-projects. In particular, this makes it possible to have consistently named shared libraries for LLVM, Clang and LLDB. Also, base the SONAME and symlinks on the output name by extracting the OUTPUT_NAME property, rather than assuming it is the same as the target name. Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14539 llvm-svn: 252669
* AddLLVM: squelch CMP0007 by not adding empty elements to listRamkumar Ramachandra2015-11-101-3/+2
| | | | | | | | | | | | | When configuring various llvm projects that use AddLLVM.cmake, this warning is emitted many times, flooding the screen: Policy CMP0007 is not set: list command no longer ignores empty elements. The fix is removing an extra semicolon. Differential Revision: http://reviews.llvm.org/D14339 llvm-svn: 252628
* [CMake] Bug 25059 - CMake libllvm.so.$MAJOR.$MINOR shared object name not ↵Chris Bieneman2015-11-041-7/+52
| | | | | | | | | | | | | | | | | | | | | compatible with ldconfig Summary: This change makes the CMake build system generate libraries for Linux and Darwin matching the makefile build system. Linux libraries follow the pattern lib${name}.${MAJOR}.${MINOR}.so so that ldconfig won't pick it up incorrectly. Darwin libraries are not versioned. Note: On linux the non-versioned symlink is generated at install-time not build time. I plan to fix that eventually, but I expect that is good enough for the purposes of fixing this bug. Reviewers: loladiro, tstellarAMD Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D13841 llvm-svn: 252093
* llvm-config: Add --has-rtti optionTom Stellard2015-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This prints NO if LLVM was built with -fno-rtti or an equivalent flag and YES otherwise. The reasons to add -has-rtti rather than adding -fno-rtti to --cxxflags are: 1. Building LLVM with -fno-rtti does not always mean that client applications need this flag. 2. Some compilers have a different flag for disabling rtti, and the compiler being used to build LLVM may not be the compiler being used to build the application. Reviewers: echristo, chandlerc, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11849 llvm-svn: 252075
* Revert parts accidentally included in r251823David Blaikie2015-11-021-1/+1
| | | | llvm-svn: 251826
* StringRef-ify DiagnosticInfoSampleProfile::FilenameDavid Blaikie2015-11-021-1/+1
| | | | llvm-svn: 251823
* [CMake] Fixing dependency issue with parallel make when building with ↵Chris Bieneman2015-10-231-1/+8
| | | | | | | | LLVM_OPTIMIZED_TABLEGEN. Patch by Alex Wang llvm-svn: 251138
* Fix add_llvm_external_project.Manuel Klimek2015-10-221-1/+1
| | | | | | | | | | | | | r250835 unintentionally discarded the optional parameter to the add_llvm_external_project() macro that may point to a path when the said path is different from ${name}. This should fix it by passing ${ARGN} on to add_llvm_subdirectory(). The problem manifests itself with e.g. add_llvm_external_project(clang-tools-extra extra) from clang/tools/CMakeLists.txt Patch by Luchesar V. Iliev. llvm-svn: 251001
* [CMake] Refactor subdirectory inclusion code to take a project name.Chris Bieneman2015-10-201-23/+34
| | | | | | | | | | | | | | | Summary: This refactoring makes some of the code used to control including subdirectories parameterized so it can be re-used elsewhere. Specifically I want to re-use this code in clang to be able to turn off specific tool subdirectories. Reviewers: chapuni, filcab, bogner, Bigcheese Subscribers: emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D13783 llvm-svn: 250835
* [CMake] Cleaning up and generalizing the LLVMInstallSymlink script so that ↵Chris Bieneman2015-10-162-11/+7
| | | | | | | | it can be used for libraries too. In order to resolve PR25059, we're going to need to be able to generate symlinks to libraries manually, so I need this code to be reusable. llvm-svn: 250573
* Split -pedantic and -Wno-long-long into two separate flags so libc++ can ↵Eric Fiselier2015-10-131-1/+2
| | | | | | remove -pedantic llvm-svn: 250255
* cmake: Avoid leading space in LLVM_DEFINITIONS.Pawel Bylica2015-10-121-1/+5
| | | | | | | | | | Summary: Unnecessary space at the beginning of LLVM_DEFINITIONS in cmake shared files can break projects that use the variable. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13432 llvm-svn: 250025
* [CMake] Parallel make breaks on native tablegenChris Bieneman2015-10-091-1/+10
| | | | | | | | Patch by Alex Wang This patch resolves a parallelization issue that occurs when native tablegen targets are built at the same time. They both try to build libSupport and clobber each other causing the builds to fail. llvm-svn: 249911
* Enable gtest SEH when building with clang-clReid Kleckner2015-10-081-4/+0
| | | | | | | Clang supports SEH well enough that this should work out of the box. If it doesn't, we'll hear about it. llvm-svn: 249766
* Revert "Enable -Wdeprecated in the cmake build now that LLVM (& Clang, ↵David Blaikie2015-10-011-1/+1
| | | | | | | | | | | Polly, and LLD) are -Wdeprecated clean" This reverts commit r248963. Seems there's some standard libraries (and libcxxabi implementations) that aren't -Wdeprecated clean... hrm. llvm-svn: 248972
* Enable -Wdeprecated in the cmake build now that LLVM (& Clang, Polly, and ↵David Blaikie2015-09-301-1/+1
| | | | | | | | | | | | | | | | | | | LLD) are -Wdeprecated clean This particularly helps enforce the C++ Rule of 5 (for new move ops this is already an error, but for a type only using C++98 features (copy ctor/assign, dtor) it is only deprecated, not invalid) Applying the flag for any GCC compatible compiler - GCC doesn't warn on the Rule of 5 cases that C++11 deprecates, but it doesn't have other false positives so far as I could see (compiling with GCC 4.8 didn't produce any -Wdeprecated warnings I could spot). Reviewers: aaron.ballman Differential Revision: http://reviews.llvm.org/D13314 llvm-svn: 248963
* [CMake] Make the bindir and libdir arguments to set_output_directory optionalJohn Brawn2015-09-301-20/+29
| | | | | | | | | | | | When building a plugin against an installed LLVM toolchain using add_llvm_loadable_module (in the documented manner) doesn't work as nothing sets the *_OUTPUT_INTDIR variables causing an error when set_output_directory is called. Making those arguments optional (causing the default output directory to be used) fixes this. Differential Revision: http://reviews.llvm.org/D13215 llvm-svn: 248911
* [CMake] Adjust the variables set by LLVMConfig.cmakeJohn Brawn2015-09-301-1/+4
| | | | | | | | | | | When using LLVMConfig.cmake from an installed toolchain in order to build a loadable pass using add_llvm_loadable_module LLVM_ENABLE_PLUGINS and LLVM_PLUGIN_EXT must be set. Also make LLVM_DEFINITIONS be set to what it actually is. Differential Revision: http://reviews.llvm.org/D13214 llvm-svn: 248884
* [CMake] Move the setting of LLVM_COMPILER_IS_GCC_COMPATIBLE to a separate fileJohn Brawn2015-09-293-8/+14
| | | | | | | | | | | | Currently LLVM_COMPILER_IS_GCC_COMPATIBLE is set as a side-effect of determining the stdlib to use in HandleLLVMStdlib, which causes problems when attempting to use AddLLVM from an installed LLVM toolchain, as HandleLLVMStdlib is not used. Move the setting of this variable into DetermineGCCCompatible and include that from both AddLLVM and HandleLLVMStdlib. Differential Revision: http://reviews.llvm.org/D13216 llvm-svn: 248798
* [CMake] Adding ALWAYS_GENERATE option to symlink utility functions.Chris Bieneman2015-09-181-20/+33
| | | | | | This implements the behavior required for clang symlinks which should be always generated. llvm-svn: 248039
* [CMake] More cleanup of installing symlinks.Chris Bieneman2015-09-182-1/+7
| | | | | | | | In order to support building clang out-of-tree the install_symlink script needs to be installed, and it needs to be found by searching the CMAKE_MODULE_PATH. This change renames install_symlink -> LLVMInstallSymlink so it doesn't conflict with naming from other projects, and adds searching behavior in AddLLVM.cmake llvm-svn: 248009
* [CMake] More refactoring of symlink creation.Chris Bieneman2015-09-161-11/+17
| | | | | | This refactoring is to enable clang to re-use this code. llvm-svn: 247850
* [CMake] Rename target->dest as per feedback from Chapuni on ↵Chris Bieneman2015-09-151-10/+10
| | | | | | http://reviews.llvm.org/D12864 llvm-svn: 247658
OpenPOWER on IntegriCloud