summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [Cmake] Add an option to build LLVM using the experimental new pass managerRong Xu2019-02-081-0/+10
| | | | | | | | Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager. Differential Revision: http://reviews.llvm.org/D57068 llvm-svn: 353550
* [cmake] Pass LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN to NATIVE configureShoaib Meenai2019-02-071-0/+1
| | | | | | | We should propagate this down to host builds so that e.g. people using an optimized tablegen can do the sub-configure successfully. llvm-svn: 353463
* Bump minimum toolchain versionJF Bastien2019-02-071-22/+50
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 353374
* Move the SMT API to LLVMMikhail R. Gadelha2019-02-072-0/+53
| | | | | | | | Moved everything SMT-related to LLVM and updated the cmake scripts. Differential Revision: https://reviews.llvm.org/D54978 llvm-svn: 353373
* [CMake] Unify scripts for generating VCS headersPetr Hosek2019-02-065-287/+162
| | | | | | | | | | | | | | | | | Previously, there were two different scripts for generating VCS headers: one used by LLVM and one used by Clang and lldb. They were both similar, but different. They were both broken in their own ways, for example the one used by Clang didn't properly handle monorepo resulting in an incorrect version information reported by Clang. This change unifies two the scripts by introducing a new script that's used from both LLVM, Clang and lldb, ensures that the new script supports both monorepo and standalone SVN and Git setups, and removes the old scripts. Differential Revision: https://reviews.llvm.org/D57063 llvm-svn: 353268
* Revert "Bump minimum toolchain version"JF Bastien2019-02-021-50/+22
| | | | | | | | | | | Reverting D57264 again, it looks like we're down to two bots that need fixing: polly-amd64-linux polly-arm-linux They both have old versions of libstdc++ and recent clang. llvm-svn: 352954
* Bump minimum toolchain versionJF Bastien2019-02-021-22/+50
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 352951
* [CMake] Add install targets for utilities to LLVM exports if ↵Stefan Granitz2019-02-011-11/+21
| | | | | | | | | | | | | | | | LLVM_INSTALL_UTILS=ON Summary: D56606 was only appending target names to the `LLVM_EXPORTS`/`LLVM_EXPORTS_BUILDTREE_ONLY` properties. Targets showed up correctly in the build-tree `LLVMExports.cmake`, but they were missing in the installed one (as we found in https://bugs.llvm.org/show_bug.cgi?id=40443), because install did not register them explicitly. Reviewers: mgorny, smeenai, beanz, gottesmm, dschuff, tstellar, serge-sans-paille Reviewed By: smeenai Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57383 llvm-svn: 352869
* Revert "Bump minimum toolchain version"JF Bastien2019-02-011-57/+22
| | | | | | Looks like we still have a few bots that are sad. Let try to get them fixed! llvm-svn: 352835
* Bump minimum toolchain versionJF Bastien2019-02-011-22/+57
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 352834
* Revert "Bump minimum toolchain version"JF Bastien2019-01-311-54/+22
| | | | | | | | A handful of bots are still breaking, either because I missed them in my audit, they were offline, or something else. I'm contacting their authors, but I'll revert for now and re-commit later. llvm-svn: 352814
* Bump minimum toolchain versionJF Bastien2019-01-311-22/+54
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 352811
* Revert "[CMake] Unify scripts for generating VCS headers"Petr Hosek2019-01-315-158/+287
| | | | | | This reverts commits r352729 and r352731: this broke Sanitizer Windows bots llvm-svn: 352733
* [CMake] Unify scripts for generating VCS headersPetr Hosek2019-01-315-287/+158
| | | | | | | | | | | | | | | | Previously, there were two different scripts for generating VCS headers: one used by LLVM and one used by Clang. They were both similar, but different. They were both broken in their own ways, for example the one used by Clang didn't properly handle monorepo resulting in an incorrect version information reported by Clang. This change unifies two the scripts by introducing a new script that's used from both LLVM and Clang, ensures that the new script supports both monorepo and standalone SVN and Git setups, and removes the old scripts. Differential Revision: https://reviews.llvm.org/D57063 llvm-svn: 352729
* [CMake] Accept ENTITLEMENTS in llvm_add_library()Stefan Granitz2019-01-301-2/+2
| | | | | | | | | | | | | | Summary: We added support for code signing entitlements in add_llvm_executable() with D54443. In the future it would be useful to have this functionality available also for libraries. Reviewers: beanz, bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D57334 llvm-svn: 352628
* [cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT alwaysMichal Gorny2019-01-281-1/+0
| | | | | | | | | | | | | | | | | | | | | Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT, and require the fallback to be defined explicitly as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone after r346888. The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache variable and an optional pre-definition of default value from caller (e.g. libcxx). It included a hack to make this work by assigning the value back and forth but it was fragile and stopped working in libcxx. The new logic is simpler and more transparent. Default value is provided in a separate variable, and used only when user-specified variable is empty (i.e. not overriden). Differential Revision: https://reviews.llvm.org/D57282 llvm-svn: 352374
* Document toolchain update policyJF Bastien2019-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Capture the current agreed-upon toolchain update policy based on the following discussions: - LLVM dev meeting 2018 BoF "Migrating to C++14, and beyond!" llvm.org/devmtg/2018-10/talk-abstracts.html#bof3 - A Short Policy Proposal Regarding Host Compilers lists.llvm.org/pipermail/llvm-dev/2018-May/123238.html - Using C++14 code in LLVM (2018) lists.llvm.org/pipermail/llvm-dev/2018-May/123182.html - Using C++14 code in LLVM (2017) lists.llvm.org/pipermail/llvm-dev/2017-October/118673.html - Using C++14 code in LLVM (2016) lists.llvm.org/pipermail/llvm-dev/2016-October/105483.html - Document and Enforce new Host Compiler Policy llvm.org/D47073 - Require GCC 5.1 and LLVM 3.5 at a minimum llvm.org/D46723 Subscribers: jkorous, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D56819 llvm-svn: 351765
* [NFC] Factor out + document build requirementsJF Bastien2019-01-161-41/+55
| | | | | | | | | | Summary: This change factors out compiler checking / warning, and documents LLVM_FORCE_USE_OLD_TOOLCHAIN. It doesn't introduce any functional changes nor policy changes, these will come late. Subscribers: mgorny, jkorous, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D56799 llvm-svn: 351387
* [CMake] Export utility targets to the build/install tree depending on ↵Stefan Granitz2019-01-111-0/+3
| | | | | | | | | | | | | | | | | | LLVM_BUILD/INSTALL_UTILS Summary: Allow external projects to import test-related targets like FileCheck, count, not etc. and query binary paths, properties, etc. This would be useful for LLDB, because it reduces the difference between in-tree vs. standalone builds and simplifies CMake logic. Reviewers: chapuni, gottesmm, beanz Reviewed By: beanz Subscribers: mgorny, lldb-commits, llvm-commits, #lldb Differential Revision: https://reviews.llvm.org/D56606 llvm-svn: 350959
* [CMake] Use XCODE_ATTRIBUTE properties for code signing and entitlements in ↵Stefan Granitz2019-01-041-7/+11
| | | | | | | | | | | | | | | | Xcode Summary: A post-commit comment to D55116 amended that this was the correct way for code signing in Xcode. Reviewers: beanz Reviewed By: beanz Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55816 llvm-svn: 350383
* Fix mingw build failures caused by r349839Tom Stellard2018-12-221-0/+4
| | | | | | | | | | Reviewers: mstorsjo Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D56004 llvm-svn: 349990
* Fix Windows build failures caused by r349839Tom Stellard2018-12-201-6/+6
| | | | llvm-svn: 349846
* cmake: Remove add_llvm_loadable_module()Tom Stellard2018-12-201-37/+10
| | | | | | | | | | | | | | | | | Summary: This function is very similar to add_llvm_library(), so this patch merges it into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...) with add_llvm_library(lib MODULE ...) Reviewers: philip.pfaffe, beanz, chandlerc Reviewed By: philip.pfaffe Subscribers: chapuni, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D51748 llvm-svn: 349839
* Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"Alexandre Ganea2018-12-191-0/+6
| | | | | | (was reverted by mistake) llvm-svn: 349672
* Revert r349517 "[CMake] Default options for faster executables on MSVC"Alexandre Ganea2018-12-192-17/+0
| | | | llvm-svn: 349656
* Revert r349517 "[CMake] Default options for faster executables on MSVC"Alexandre Ganea2018-12-191-6/+0
| | | | llvm-svn: 349654
* Let TableGen write output only if it changed, instead of doing so in cmake, ↵Nico Weber2018-12-191-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt 2 This relands r330742: """ Let TableGen write output only if it changed, instead of doing so in cmake. Removes one subprocess and one temp file from the build for each tablegen invocation. No intended behavior change. """ In particular, if you see rebuilds after this change that you didn't see before this change, that's unintended and it's fine to revert this change again (but let me know). r330742 got reverted because some people reported that llvm-tblgen ran on every build after it. This could happen if the depfile output got deleted without deleting the main .inc output. To fix, make TableGen always write the depfile, but keep writing the main .inc output only if it has changed. This matches what we did in cmake before. Differential Revision: https://reviews.llvm.org/D55842 llvm-svn: 349624
* Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"Alexandre Ganea2018-12-191-0/+6
| | | | | | | | | Previously, when compiling Visual Studio targets, one could see random build errors. This was caused by tablegen projects using the same build folders. This workaround simply chains tablegen projects. Differential Revision: https://reviews.llvm.org/D54153 llvm-svn: 349596
* Revert r349541 (Fix MSVC dependency issue between Clang-tablegen and ↵Alexandre Ganea2018-12-181-6/+0
| | | | | | LLVM-tablegen) llvm-svn: 349545
* Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegenAlexandre Ganea2018-12-181-0/+6
| | | | | | | | | Previously, when compiling Visual Studio targets, one could see random build errors. This was caused by tablegen projects using the same build folders. This workaround simply chains tablegen projects. Differential Revision: https://reviews.llvm.org/D54153 llvm-svn: 349541
* [CMake] Default options for faster executables on MSVCAlexandre Ganea2018-12-182-0/+17
| | | | | | | | | | - Disable incremental linking by default. /INCREMENTAL adds extra thunks in the EXE, which makes execution slower. - Set /MT (static CRT lib) by default instead of CMake's default /MD (dll CRT lib). The previous default /MD makes all DLL functions to be thunked, thus making execution slower (memcmp, memset, etc.) - Adds LLVM_ENABLE_INCREMENTAL_LINK which is set to OFF by default. Differential revision: https://reviews.llvm.org/D55056 llvm-svn: 349517
* [CMake] llvm_codesign workaround for Xcode double-signing errorsStefan Granitz2018-12-131-12/+13
| | | | | | | | | | | | | | | | | Summary: When using Xcode to build LLVM with code signing, the post-build rule is executed even if the actual build-step was skipped. This causes double-signing errors. We can currently only avoid it by passing the `--force` flag. Plus some polishing for my previous patch D54443. Reviewers: beanz, kubamracek Reviewed By: kubamracek Subscribers: #lldb, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55116 llvm-svn: 349070
* [CMake] Add support for NO_INSTALL_RPATH argument in llvm_add_library()Stefan Granitz2018-12-071-5/+9
| | | | | | | | | | | | | | | | Summary: Allow clients to suppress setup of default RPATHs in designated library targets. This is used in LLDB when emitting liblldb as a framework bundle, which itself doesn't load further RPATH-dependent libraries. This follows the approach in add_llvm_executable(). Reviewers: aprantl, JDevlieghere, davide, friss Reviewed By: aprantl Subscribers: mgorny, lldb-commits, llvm-commits, #lldb Differential Revision: https://reviews.llvm.org/D55316 llvm-svn: 348573
* [cmake] Clean up add_llvm_subdirectoryShoaib Meenai2018-12-031-14/+17
| | | | | | | | | | | | | | | | | I found the pattern of setting the project_BUILD variable to OFF after processing the project to be pretty confusing. Using global properties to explicitly keep track of whether a project has been processed or not seems much more straightforward, and it also allows us to convert the macro into a function (which is required for the early return). Factor the project+type+name combination out into a variable while I'm here, since it's used a whole bunch of times. I don't believe this should result in any functional changes. Differential Revision: https://reviews.llvm.org/D55104 llvm-svn: 348180
* [CMake] Add LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR for custom dSYM target ↵Stefan Granitz2018-12-031-1/+8
| | | | | | | | | | | | | | | | directory on Darwin Summary: When using `LLVM_EXTERNALIZE_DEBUGINFO` in LLDB, the default dSYM location for the shared library in LLDB.framework is inside the framework bundle. With `LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR` we can easily fix that. I consider it a useful feature to be able to set a global output directory for external debug info (rather then having a target-specific one). Only implemented for Darwin so far. Reviewers: beanz, aprantl Reviewed By: aprantl Subscribers: mgorny, aprantl, #lldb, lldb-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D55114 llvm-svn: 348118
* [CMake] build correctly if build path contains whitespaceShoaib Meenai2018-11-301-3/+3
| | | | | | | | | | | | | | | The add_llvm_symbol_exports function in AddLLVM.cmake creates command line link flags with paths containing CMAKE_CURRENT_BINARY_DIR, but that will break if CMAKE_CURRENT_BINARY_DIR contains whitespace. This patch adds quotes to those paths. Fixes PR39843. Patch by John Garvin. Differential Revision: https://reviews.llvm.org/D55081 llvm-svn: 347937
* Revert r343473 "Move llvm util dependencies from clang-tools-extra to ↵Haojian Wu2018-11-221-10/+0
| | | | | | | | | | | | | | | | add_lit_target." Summary: It will cause test tools `FileCheck`, `count`, `not` being built blindly, these dependencies should move back to clang-tools-extra. Reviewers: mgorny Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54797 llvm-svn: 347448
* Silence C4709 in MSVC because it is buggy.Aaron Ballman2018-11-201-0/+4
| | | | | | The diagnostic will trigger on code that does not have any comma operator, but instead default-constructs an object with an explicitly defaulted constructor as the array index argument. llvm-svn: 347345
* [CMake] Accept ENTITLEMENTS in add_llvm_executable and llvm_codesignStefan Granitz2018-11-161-6/+22
| | | | | | | | | | | | | | Summary: Allow code-signing with entitlements. FORCE may be used to avoid an error when replacing existing signatures. Reviewers: beanz, bogner Reviewed By: beanz Subscribers: mgorny, llvm-commits, lldb-commits Differential Revision: https://reviews.llvm.org/D54443 llvm-svn: 347068
* [CMake] Support cross-compiling with multi-stage buildsPetr Hosek2018-11-161-1/+28
| | | | | | | | | | | | | | | | | | | | When using multi-stage builds, we would like support cross-compilation. Example is 2-stage build when the first stage is compiled for host while the second stage is compiled for the target. Normally, the second stage would be also used for compiling runtimes, but that's not possible when cross-compiling, so we use the first stage compiler instead. However, we still want to use the second stage paths. To do so, we set the -resource-dir of the first stage compiler to point to the resource directory of the second stage. We also need compiler tools that support the target architecture. These tools are not guaranteed to be present on the host, but in case of multi-stage build, we can build these tools in the first stage. Differential Revision: https://reviews.llvm.org/D54461 llvm-svn: 347025
* Fix DragonFlyBSD linkage issue.David Carlier2018-11-101-1/+2
| | | | | | environ global failed on LTO linkage step. llvm-svn: 346593
* [CMake] Expose opt-remark tooling through libOptRemarks.dylibFrancis Visoiu Mistrih2018-11-051-0/+1
| | | | | | | | | | | | * Create an install target for it * Add it under tools/opt-remarks * Add an export file for the dylib * Install the llvm-c/OptRemarks.h header * Add an API to query its version rdar://45458839 llvm-svn: 346127
* Enable -Wimplicit-fallthrough for clang as well as GCCReid Kleckner2018-11-011-0/+1
| | | | | | | All instances of this warning should already be fixed across all LLVM subprojects, at least on Linux. llvm-svn: 345887
* [MinGW] Enable large file for mingw-w64Martin Storsjo2018-10-241-0/+4
| | | | | | | | 64-bit mingw doesn't define _FILE_OFFSET_BITS=64 by default. Differential Revision: https://reviews.llvm.org/D53569 llvm-svn: 345131
* [CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPESChris Bieneman2018-10-152-7/+7
| | | | | | | | | | | | There are several places where we use CMAKE_CONFIGURATION_TYPES to determine if we are using an IDE generator and in turn decide not to generate some of the convenience targets (like all the install-* and check-llvm-* targets). This decision is made because IDEs don't always deal well with the thousands of targets LLVM can generate. This approach does not work for Visual Studio 15's new CMake integration. Because VS15 uses a Ninja generator, it isn't a multi-configuration build, and generating all these extra targets mucks up the UI and adds little value. With this change we still don't generate these targets by default for Visual Studio and Xcode generators, and LLVM_ENABLE_IDE becomes a switch that can be enabled on the VS15 CMake builds, to improve the IDE experience. This is a re-land of r340435, with a few minor fix-ups. The issues causing the revert were addressed in r344218, r344219, and r344553. llvm-svn: 344555
* [CMake] Change the default value of LLVM_ENABLE_IDEChris Bieneman2018-10-151-10/+13
| | | | | | | | There really aren't any generator behaviors that we need to take `CMAKE_EXTRA_GENERATOR` into account for. Where we need to take different behaviors for IDEs is mostly in enabling or disabling certain build system features that are optional but trip up the IDE UIs. Like the generation of lots of utility targets. By changing the LLVM_ENABLE_IDE default to only being on for multi-configuration generators, we allow gating where it will impact the UI presentation, while also supporting optionally disabling the generation if your tooling workflow encounters problems. Presently being able to manually disable extra target generation is useful for Visual Studio 2017's CMake integration where the IDE has trouble displaying and working with the large number of optional targets. llvm-svn: 344553
* [CMake] Temporarily remove the LLVM_ENABLE_IDE optionChris Bieneman2018-10-111-6/+10
| | | | | | All uses of this option have been removed, and the intent is to change the purpose and default value of this option. To prevent it from having impacts on users, this patch temporarily removes the option and purges it from CMake caches. In a few days, once this has propagated to contributors I will re-introduce the option with the new default value. llvm-svn: 344219
* [CMake] Unconditionally add .h and .td files to target sourcesChris Bieneman2018-10-111-9/+8
| | | | | | | | Previously adding header and table gen files was conditional on using an IDE. Since these files have the `HEADER_FILE_ONLY` attribute applied they are ignored as sources by all non-IDE generators, so there is really no reason not to include them. Additionally having the CMake always include these files allows the CMake-server to include them in the sources list for targets, which is valuable to anyone using CMake-server integrated tools. llvm-svn: 344218
* [CMake] NFC. Updating documentation on optionsChris Bieneman2018-10-101-2/+2
| | | | | | | The Ninja pool options are only supported with the Ninja generator and should be called out as such. llvm-svn: 344188
* Move llvm util dependencies from clang-tools-extra to add_lit_target.Haojian Wu2018-10-011-0/+11
| | | | | | | | | | | | | | Summary: Address fixme in r301762. And would simplify the cmake file in clang-tools-extra. Reviewers: sammccall Subscribers: mgorny, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52713 llvm-svn: 343473
OpenPOWER on IntegriCloud