summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Addressed Takumi's comment about redundancy.Galina Kistanova2017-06-121-32/+18
| | | | llvm-svn: 305222
* TableGen.cmake: Try to fix build breakage introduce in r305142.NAKAMURA Takumi2017-06-111-1/+1
| | | | | | | | | | | | LLVM_TABLEGEN_TARGET is undefined in clang standalone build. STREQUAL cannot omit LHS. Then I saw an error; CMake Error at /path/to/install/llvm/lib/cmake/llvm/TableGen.cmake:40 (if): if given arguments: "STREQUAL" "/path/to/install/llvm/bin/llvm-tblgen.exe" Unknown arguments specified llvm-svn: 305159
* Added dependency on the TableGen executable file.Galina Kistanova2017-06-101-13/+37
| | | | | | | | | | | | For the case when LLVM_OPTIMIZED_TABLEGEN is ON (enables LLVM_USE_HOST_TOOLS), we need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list to have .inc files rebuilt on a tablegen change, as cmake does not propagate file-level dependencies of custom targets. We could always have just one dependency on both the target and the file, but the 2 cases would produce cleaner cmake files. llvm-svn: 305142
* Enable c++1z experimental builds.Vassil Vassilev2017-06-091-0/+3
| | | | | | Patch by David Abdurachmanov! llvm-svn: 305123
* [cmake] Enable reverse iteration by default through build macroMandeep Singh Grang2017-06-061-0/+4
| | | | | | | | | | | | | | | | | | Summary: Reverse iteration can be turned on, by default, by setting -DLLVM_REVERSE_ITERATION:BOOL=ON during cmake. With this enabled, we can uncover lots of cases of non-determinism in codegen by simply running our tests (without any other change). We can then setup a buildbot which will have this turned on by default. Initially, a lot of unit tests will fail in this configuration. Once we start fixing non-determinism issues, we can gradually make this a blocker for patches. Reviewers: davide, dblaikie, mehdi_amini, dberlin Reviewed By: dblaikie Subscribers: probinson, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33908 llvm-svn: 304757
* CMake: Fix docs-llvm-man target when clang+llvm is in the same source treeTom Stellard2017-05-151-2/+2
| | | | | | | | | | | | | | | | Summary: This was broken by r302499. Configuring with -DLLVM_BUILD_DOCS=ON would cause the docs-llvm-man target not to be created. Reviewers: anemet, beanz Reviewed By: anemet Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D33146 llvm-svn: 303042
* Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""Tom Stellard2017-05-092-10/+13
| | | | | | | | This reverts commit r302054. Re-commit now that I have fixes for clang/lld. llvm-svn: 302499
* Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake"Tom Stellard2017-05-032-13/+10
| | | | | | | | This reverts commit r302025. clang and lld need to be updated too so they don't break with this patch. llvm-svn: 302054
* CMake: Move sphinx detection into AddSphinxTarget.cmakeTom Stellard2017-05-032-10/+13
| | | | | | | | | | | | Reviewers: chandlerc, beanz, mgorny Reviewed By: beanz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31773 llvm-svn: 302025
* CMake: Silence more stderr when running git.Tim Northover2017-05-021-1/+2
| | | | | | It can confuse bots collecting errors. llvm-svn: 301934
* limit to 2 parallel links when using thinltoBob Haarman2017-04-281-7/+11
| | | | | | | | | | | | | | | | Summary: When using ThinLTO, the linker performs its own parallelism. This change limits the number of parallel link jobs that Ninja will issue to keep the total number of threads reasonable when linking with ThinLTO. Reviewers: hans, ruiu Subscribers: mgorny, mehdi_amini, Prazek Differential Revision: https://reviews.llvm.org/D31990 llvm-svn: 301676
* CMake: ignore git stderr when trying to sort out revision. NFC.Tim Northover2017-04-281-1/+2
| | | | llvm-svn: 301650
* [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM.Nitesh Jain2017-04-241-0/+7
| | | | | | | | | | Reviewers: beanz Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste Differential Revision: https://reviews.llvm.org/D32125 llvm-svn: 301171
* Add a linker script to version LLVM symbolsSylvestre Ledru2017-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a very simple linker script to version the lib's symbols and thus trying to avoid crashes if an application loads two different LLVM versions (as long as they do not share data between them). Note that we deliberately *don't* make LLVM_5.0 depend on LLVM_4.0: they're incompatible and the whole point of this patch is to tell the linker that. Avoid unexpected crashes when two LLVM versions are used in the same process. Author: Rebecca N. Palmer <rebecca_palmer@zoho.com> Author: Lisandro Damían Nicanor Pérez Meyer <lisandro@debian.org> Author: Sylvestre Ledru <sylvestre@debian.org> Bug-Debian: https://bugs.debian.org/848368 Reviewers: beanz, rnk Reviewed By: rnk Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D31524 llvm-svn: 300496
* Reverting cmake/modules/AddLLVM.cmake changes from revision 300184 (Added by ↵Ayman Musa2017-04-131-2/+1
| | | | | | mistake). llvm-svn: 300185
* [X86] Change instructions names to keep consistency with the naming ↵Ayman Musa2017-04-131-1/+2
| | | | | | | | convention. NFC Differential Revision: https://reviews.llvm.org/D31743 llvm-svn: 300184
* Support: Add a VCSRevision.h header file.Peter Collingbourne2017-04-131-38/+46
| | | | | | | | | | | | | | | | | | | | | This is a magic header file supported by the build system that provides a single definition, LLVM_REVISION, containing an LLVM revision identifier, if available. This functionality previously lived in the LTO library, but I am moving it out to lib/Support because I want to also start using it in lib/Object to create the IR symbol table. This change also fixes a bug where LLVM_REVISION was never actually being used in lib/LTO because the macro HAS_LLVM_REVISION was never defined (it was misspelled as HAVE_SVN_VERSION_INC in lib/LTO/CMakeLists.txt, and was only being defined in a non-existent file Version.cpp). I also changed the code to use "git rev-parse --git-dir" to locate the .git directory, instead of looking for it in the LLVM source root directory, which makes this compatible with monorepos as well as git worktrees. Differential Revision: https://reviews.llvm.org/D31985 llvm-svn: 300160
* Append -w when LLVM_ENABLE_WARNINGS is Off.Vassil Vassilev2017-04-121-0/+4
| | | | | | Reviewed by rnk (D31702)! llvm-svn: 300100
* Fix detection of backtrace() availability on FreeBSDEd Maste2017-04-121-2/+3
| | | | | | | | | | | | On FreeBSD backtrace is not part of libc and depends on libexecinfo being available. Instead of using manual checks we can use the builtin CMake module FindBacktrace.cmake to detect availability of backtrace() in a portable way. Patch By: Alex Richardson Differential Revision: https://reviews.llvm.org/D27143 llvm-svn: 300062
* Respect CMAKE_INSTALL_MANDIR for sphinx generated manpagesJonathan Roelofs2017-04-051-1/+6
| | | | | | | | This is a re-work of r297516, which was reverted in r297545. https://reviews.llvm.org/D30906 llvm-svn: 299547
* Fix evaluation of LLVM_DEFINITIONSSerge Pavlov2017-03-212-11/+23
| | | | | | | | | | | | | | | | CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided for host compiler that builds llvm components. A function add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep track of these definitions and was intended to be a replacement for CMake command add_definitions. Actually in many cases add_definitions is still used and the content of LLVM_DEFINITIONS is not actual now. On the other hand the current version of CMake allows getting set of definitions in a more convenient way. This fix implements evaluation of the variable by reading corresponding cmake property. Differential Revision: https://reviews.llvm.org/D31125 llvm-svn: 298336
* [cmake] Refactor warning flag logic to use Unix warnings with clang-clReid Kleckner2017-03-161-137/+146
| | | | | | | | | | | | | | | | | | | | | | | Summary: clang-cl understands the GCC-style -W[no-]foo flags, and for the most part ignores MSVC -wd flags. So, let's pass the curated set of warning flags we use on Unix on Windows. We can also stop passing /W4 -wd*, which for the most part corresponds to -Wall -Wextra with a bunch of flags that we mostly ignore. I had to disable -Wnon-virtual-dtor on Windows, because it fires on every COM class ever. I filed PR32286 to fix this. So far I've only found two instances of -Wstring-conversion in the WinASan code, which I'll fix. Other than that we seem clean. Reviewers: hans Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D30992 llvm-svn: 297964
* Re-apply r296730, "cmake: Configure the ThinLTO cache directory when using ↵Peter Collingbourne2017-03-151-5/+14
| | | | | | | | | ELF lld or gold." All known cache-related bugs observed when self hosting have been fixed (r296907 and r297853). llvm-svn: 297854
* Revert r297516 - Respect CMAKE_INSTALL_MANDIR for sphinx generated manpagesEric Fiselier2017-03-111-1/+1
| | | | | | | | When CMAKE_INSTALL_MANDIR isn't defined it ends up attempting to install the man pages under "/man1" and we really don't want to accidentally install stuff at the filesystem root. llvm-svn: 297545
* Respect CMAKE_INSTALL_MANDIR for sphinx generated manpagesJonathan Roelofs2017-03-101-1/+1
| | | | llvm-svn: 297516
* CMake: Don't install llvm-tblgen twiceTom Stellard2017-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: The add_tablegen macros defines its own install target, and it was also calling add_llvm_utility which adds another install target. Configuring with -DLLVM_TOOLS_INSTALL_DIR set to something other than 'bin' along with -DLLVM_INSTALL_UTILS=ON was causing llvm-tablgen to be installed to two separate directories. Reviewers: beanz, hans Reviewed By: beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30656 llvm-svn: 297403
* [X86] Quick fix for build bot failure (r297127) due to unused variable.Ayman Musa2017-03-071-2/+1
| | | | llvm-svn: 297130
* [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX ↵Ayman Musa2017-03-071-1/+2
| | | | | | | | | | | | compressing tables. X86EvexToVex machine instruction pass compresses EVEX encoded instructions by replacing them with their identical VEX encoded instructions when possible. It uses manually supported 2 large tables that map the EVEX instructions to their VEX ideticals. This TableGen backend replaces the tables by automatically generating them. Differential Revision: https://reviews.llvm.org/D30451 llvm-svn: 297127
* Detect the existence of pthread_{s,g}etname_np in libpthread on LinuxKrzysztof Parzyszek2017-03-031-0/+8
| | | | | | Older Linux distributions may not have those functions. llvm-svn: 296915
* Revert r296730, "cmake: Configure the ThinLTO cache directory when using ELF ↵Peter Collingbourne2017-03-031-14/+5
| | | | | | | | | lld or gold." Causes a build failure on the clang-with-thin-lto-ubuntu bot. http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/2117/steps/build-stage3-compiler/logs/stdio llvm-svn: 296850
* CMake: Clean up VersionFromVCS.cmakeTom Stellard2017-03-021-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix a few problems in VersionFromVCS.cmake to make it more reliable: - Stop using git svn info to retrieve the svn revision. I am unable to determine what the svn revision returned by this command means. During my testing this command returned a revision from a month ago which was not the HEAD of any of my local branches. Also, this revision was never actually added to the version string due to a typo in the script. All it was used for was to reject the revision number returned by git svn find-rev HEAD when the revision numbers didn't match. - Populate GIT_COMMIT even when we detect a git repo without any svn information. Reviewers: mehdi_amini, beanz Reviewed By: beanz Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D30092 llvm-svn: 296829
* cmake: Configure the ThinLTO cache directory when using ELF lld or gold.Peter Collingbourne2017-03-021-5/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D30522 llvm-svn: 296730
* enable building with LTO on Windows using clang-cl and lldBob Haarman2017-03-011-10/+27
| | | | | | | | | | | | | | Summary: With clang-cl gaining support for link-time optimization, we can now enable builds using LTO when using clang-cl and lld on Windows. To do this, we must not pass the -flto flag to the linker; lld-link does not understand it, but will perform LTO automatically when it encounters bitcode files. We also don't pass /Brepro when using LTO - the compiler doesn't generate object files for LTO, so passing the flag would only result in a warning about it being unused. Reviewers: rnk, ruiu, hans Reviewed By: hans Subscribers: mgorny, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30240 llvm-svn: 296658
* [Support] Provide linux/magic.h fallback for older kernelsMichal Gorny2017-02-221-0/+9
| | | | | | | | | | | | | | | | | | | | | The function for distinguishing local and remote files added in r295768 unconditionally uses linux/magic.h header to provide necessary filesystem magic numbers. However, in kernel headers predating 2.6.18 the magic numbers are spread throughout multiple include files. Furthermore, LLVM did not require kernel headers being installed so far. To increase the portability across different versions of Linux kernel and different Linux systems, add CMake header checks for linux/magic.h and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers which contained the numbers previously. Furthermore, since the numbers are static and the feature does not seem critical enough to make LLVM require kernel headers at all, add fallback constants for the case when none of the necessary headers is available. Differential Revision: https://reviews.llvm.org/D30261 llvm-svn: 295854
* [CMake] Support externalizing debug info on non-Darwin platformsPetr Hosek2017-02-171-2/+10
| | | | | | | | On other platorms, we use objcopy to export the debug info. Differential Revision: https://reviews.llvm.org/D28575 llvm-svn: 295481
* [CMake] Add variable IOS to iOS toolchainChris Bieneman2017-02-171-0/+1
| | | | | | This is useful for some edge cases where detecting things gets tricky. Specifically LLDB needs this to support iOS because CMake doesn't support running tests using obj-c code. llvm-svn: 295392
* [Tablegen] Instrumenting table gen DAGGenISelDAGAditya Nandakumar2017-02-141-0/+7
| | | | | | | | | | To help assist in debugging ISEL or to prioritize GlobalISel backend work, this patch adds two more tables to <Target>GenISelDAGISel.inc - one which contains the patterns that are used during selection and the other containing include source location of the patterns Enabled through CMake varialbe LLVM_ENABLE_DAGISEL_COV llvm-svn: 295081
* config-ix.cmake: Search for CMAKE_XCRUN before using it.Matthias Braun2017-02-111-0/+3
| | | | | | | | | This was previously searched in CMakeLists.txt unconditionally but as of r294371 it is only searched in some circumstances. Repeating the search in config-ix.cmake to make this robust and hopefully fix the macOS Asan+Ubsan jenkins build. llvm-svn: 294811
* [CMake] Fix pthread handling for out-of-tree buildsEric Fiselier2017-02-103-4/+8
| | | | | | | | | | | | | | | LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects to correctly link the threading library when needed. Unfortunately `PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed and therefore can't be used when configuring out-of-tree builds. This causes such builds to fail since `pthread` isn't being correctly linked. This patch attempts to fix that problem by renaming and exporting `LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB` because It seemed likely to cause collisions with downstream users of `LLVMConfig.cmake`. llvm-svn: 294690
* [CMake] Fix standalone project builds broken in r294514Chris Bieneman2017-02-091-0/+1
| | | | | | This patch sets the global property indicating that target registration is complete for standalone sub-project builds. llvm-svn: 294602
* [CMake] Fix `is_llvm_target_library` and support out-of-order componentsChris Bieneman2017-02-081-11/+73
| | | | | | | | | | | | Summary: This patch is required by D28855, and enables us to rely on CMake's ability to handle out of order target dependencies. Reviewers: mgorny, chapuni, bryant Subscribers: llvm-commits, jgosnell Differential Revision: https://reviews.llvm.org/D28869 llvm-svn: 294514
* [CMake] Fix USE_LLVM_SANITIZER configuration for out-of-tree builds.Eric Fiselier2017-02-071-2/+5
| | | | | | | | | | | | | | | | | Summary: r291918 changed `HandleLLVMOptions.cmake` to add `-fsanitize-blacklist=<llvm-file>` when `LLVM_USE_SANITIZER=Undefined` is specified. This breaks out-of-tree users of `LLVM_USE_SANITIZER` since that file is not present. This patch fixes the issue by checking if the file exists first. Reviewers: mgorny, bogner, vitalybuka, krasin Reviewed By: krasin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29686 llvm-svn: 294367
* [CMake] Move ninja job pool options to HandleLLVMOptionsChris Bieneman2017-02-071-0/+24
| | | | | | Moving the Ninja job pool configuration settings into the HandleLLVMOptions module will allow standalone builds of LLVM sub-projects to use the LLVM options without needing to re-implement them. llvm-svn: 294334
* Fix LLDB Android AArch64 GCC debug info buildOmair Javaid2017-02-021-0/+1
| | | | | | | | | Committing after fixing suggested changes and tested release/debug builds on x86_64-linux and arm/aarch64 builds. Differential revision: https://reviews.llvm.org/D29042 llvm-svn: 293850
* Remove LLVM_CONFIG from config headersReid Kleckner2017-01-311-2/+0
| | | | | | | It appears to be dead, and it needlessly caused me to rebuild all of LLVM when I changed CMAKE_INSTALL_PREFIX. llvm-svn: 293574
* CMake is funky on detecting Intel 17 as GCC compatible.Yichao Yu2017-01-261-0/+2
| | | | | | | | | | | | | | Summary: This adds a fallback in case that the Intel compiler is failed to be detected correctly. Reviewers: chapuni Reviewed By: chapuni Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D27610 llvm-svn: 293230
* cmake: Only sanitize use-after-scope if the host compiler supports itJustin Bogner2017-01-181-1/+2
| | | | | | | | | In r292256, we started adding -fsanitize-use-after-scope when using the address sanitizer, but that flag wasn't always available. This fixes the config to only add the flag if the host compiler supports it. llvm-svn: 292423
* Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=AddressVitaly Buka2017-01-171-0/+3
| | | | | | | | Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28823 llvm-svn: 292256
* [cmake] Update SOVERSION for the new versioning schemeMichal Gorny2017-01-171-5/+3
| | | | | | | | | | | | | | | Update SOVERSION to use just the major version number rather than major+minor, to match the new versioning scheme where only major is used to indicate API/ABI version. Since two-digit SOVERSIONs were introduced post 3.9 branching, this change does not risk any SOVERSION collisions. In the past, two-component X.Y SOVERSIONs were shortly used but those will not interfere with the new ones since the new versions start at 4. Differential Revision: https://reviews.llvm.org/D28730 llvm-svn: 292255
* Add a LLVM_USE_LINKER that defines the linker to use when building LLVMMehdi Amini2017-01-151-3/+13
| | | | | | | | | | | | | | | Summary: This string parameter is passed to -fuse-ld when linking. It can be an absolute path to your custom linker, otherwise clang will look for `ld.{name}`. Reviewers: davide, tejohnson, pcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28738 llvm-svn: 292047
OpenPOWER on IntegriCloud