summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Remove MSVC C4258 overrideSimon Pilgrim2019-09-041-1/+0
| | | | | | | | Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning. Differential Revision: https://reviews.llvm.org/D67047 llvm-svn: 370866
* [cmake] Improve comment describing the C4245 warning. NFCI.Simon Pilgrim2019-09-031-1/+1
| | | | llvm-svn: 370772
* [lit] Only set DYLD_LIBRARY_PATH for shared buildsJonas Devlieghere2019-08-301-0/+1
| | | | | | | | | | | | In r370135 I committed a temporary workaround for the sanitized bot to not set (DY)LD_LIBRARY_PATH when (DY)LD_INSERT_LIBRARIES was set. Setting (DY)LD_LIBRARY_PATH is only necessary for (standalone) shared-library builds, so a better solution is to only set the environment variable when necessary. Differential revision: https://reviews.llvm.org/D67012 llvm-svn: 370549
* [CMake] Update C4324 MSVC warning comment to explain its still broken at VS2019Simon Pilgrim2019-08-201-3/+1
| | | | | | As promised, I've updated the comment for the C4324 MSVC warning that was re-disabled at rL367409 / rG8f823e63e3edf87ab029ba32b68f3eb5d2f392b5 to put it in terms of currently supported VS versions llvm-svn: 369368
* [cmake] Move blocks out of redundant else( MSVC ); NFCHubert Tong2019-08-181-61/+60
| | | | | | | | Address post-commit comment on D66256 regarding the `else( MSVC )` block containing only blocks guarded with `LLVM_COMPILER_IS_GCC_COMPATIBLE`, which would imply `NOT MSVC`. llvm-svn: 369221
* [AIX] For XL, pick GCC-compatible std & default warning optionsHubert Tong2019-08-151-18/+31
| | | | | | | | | | | | | | | | | | | | Summary: LLVM now requires C++14. For IBM XL compilers with C++14 support, this can be done with the GCC-style options. The relevant block in the CMake file is split up into smaller parts as part of this patch to allow the common cases to be shared. Reviewers: jfb, jasonliu, daltenty, xingxue Reviewed By: jfb, xingxue Subscribers: mstorsjo, mgorny, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66256 llvm-svn: 369058
* [cmake] install_symlink should obey DESTDIR unconditionallyJustin Bogner2019-08-151-1/+1
| | | | | | | Setting DESTDIR was erroneously buried under a condition here - if it's set it should always be used. llvm-svn: 369011
* Add support in CMake to statically link the C++ standard library.Erich Keane2019-08-141-0/+20
| | | | | | | | | | | | | | | It is sometimes useful to have the C++ standard library linked into the assembly when compiling clang, particularly when distributing a compiler onto systems that don't have a copy of stdlibc++ or libc++ installed. This functionality should work with either GCC or Clang as the host compiler, though statically linking libc++ (as may be required for licensing purposes) is only possible if the host compiler is Clang with a copy of libc++ available. Differential Revision: https://reviews.llvm.org/D65603 llvm-svn: 368907
* [CMake] Fix cache invalidation of LLVM_CXX_STDChris Bieneman2019-08-141-1/+4
| | | | | | This cleans up fallout from https://reviews.llvm.org/D66195. llvm-svn: 368897
* Match if / elseif properlyJF Bastien2019-08-141-1/+1
| | | | | | My last commit fumbled it. llvm-svn: 368892
* Remove now useless C++1y flagJF Bastien2019-08-141-2/+0
| | | | | | As of D66195 we support C++14 by default. llvm-svn: 368890
* Move to C++14JF Bastien2019-08-141-1/+1
| | | | | | | | | | | | | | | Summary: I just bumped the minimum compiler versions to support C++14 in D66188. Following [our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain) and [our previous agreement](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html), I'm now officially bumping the C++ version to 14 and updating the documentation. Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, chandlerc, thakis, EricWF, jyknight, lhames, JDevlieghere Tags: #llvm Differential Revision: https://reviews.llvm.org/D66195 llvm-svn: 368887
* Remove minimum toolchain soft-errorJF Bastien2019-08-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: Back in January I changed the minimum toolchain version required to build clang and LLVM: D57264. Since then we've release LLVM 8, following [our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain) it's therefore now a good time to remove the soft-error and officially deprecate older toolchains. I tried this out last Tursday night to see if any bots complained, and I saw no complaints. I also manually audited bots and didn't see any bot that should break, but their toolchain information is unreliable and some bots are offline. Once this patch stick we'll move to C++14 as we've [already agreed](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html). Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, EricWF, thakis, chandlerc Tags: #llvm Differential Revision: https://reviews.llvm.org/D66188 llvm-svn: 368799
* Fix rpath for MacOS/iOSHaibo Huang2019-08-091-1/+1
| | | | | | | | | | | | Summary: libs can be installed to ../lib64. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65972 llvm-svn: 368398
* Revert "Temporarily bump minimum compiler version"JF Bastien2019-08-081-4/+4
| | | | | | | | | It's been in for more than 30 min and no bots have complained. Let's see if some slow ones catch up. I'll do another manual pass on bots later (in case some that were down are back up), and then turn this on permanently through a regular review. llvm-svn: 368253
* Temporarily bump minimum compiler versionJF Bastien2019-08-081-4/+4
| | | | | | | | It's pretty hard to find a reliable list of which bots use which compiler version... so I'm going to commit this change which allows us to mandate the compilers required for C++14. This bump is what we've already agreed to do, so I'll use the list of failures to figure out which bots need to bump their compiler version. I'll revert the change in a few minutes. The last discussion of this is here: http://lists.llvm.org/pipermail/llvm-dev/2019-August/134360.html llvm-svn: 368252
* Append an executable suffix to the toolchain tool paths on Windows platform.Galina Kistanova2019-08-071-12/+12
| | | | | | | | | | | Append a default CMake suffix (CMAKE_EXECUTABLE_SUFFIX) for the build host to the toolchain tool path when adding a LLVM external project. The tool binary files should contain .exe suffix to run them properly on Windows platform when building the projects. Patch by Vlad Vereschaka. Differential Revision: https://reviews.llvm.org/D65824 llvm-svn: 368121
* Add order-dependencies to object librariesChris Bieneman2019-08-061-0/+3
| | | | | | | | | | | | | | | | Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic. Reviewers: compnerd, hintonda, smeenai Reviewed By: smeenai Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65818 llvm-svn: 368074
* [CMake] Add mapping for IBM XL -qnoeh and -qnorttiHubert Tong2019-08-061-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch maps in the `-qnoeh` and `-qnortti` options for building with IBM XL compilers. Reviewers: daltenty, xingxue, jasonliu Reviewed By: daltenty Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65669 llvm-svn: 368050
* NFC. Documenting Native tablegen dependencyChris Bieneman2019-08-051-0/+3
| | | | | | Adding documentation explaining why this dependency is required and should not be removed again. llvm-svn: 367896
* NATIVE tablegen needs to depend on target tablegenChris Bieneman2019-08-051-1/+1
| | | | | | | | This dependency was removed in r357486, which has lead to a stream of difficult to diagnose bugs. Without this dependency, when building with `LLVM_OPTIMIZED_TABLEGEN=On` the native tablegen executible may not be rebuilt at all, and often won't get rebuilt before targets that use the tablegen headers. In the best case this results in a build-time failure, in the worst case it results in runtime failures. llvm-svn: 367895
* Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383Simon Pilgrim2019-07-311-0/+8
| | | | | | This was breaking /WX builds llvm-svn: 367409
* [NFC] Remove LLVM_ALIGNASJF Bastien2019-07-311-8/+0
| | | | | | | | | | | | | | Summary: The minimum compilers support all have alignas, and we don't use LLVM_ALIGNAS anywhere anymore. This also removes an MSVC diagnostic which, according to the comment above, isn't relevant anymore. Reviewers: rnk Subscribers: mgorny, jkorous, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65458 llvm-svn: 367383
* Remove cmake checks for MSVC 1900 / VS 2013Reid Kleckner2019-07-301-16/+4
| | | | | | Our minimum Visual C++ version is 19.10 from Visual Studio 2017. llvm-svn: 367362
* [NFC] Improve cmake diagnostic when checking atomicsJF Bastien2019-07-301-2/+2
| | | | llvm-svn: 367359
* [CMake] Add -z defs on SolarisRainer Orth2019-07-231-1/+1
| | | | | | | | | | Like other ELF targets, shared objects should be linked with -z defs on Solaris. Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D64484 llvm-svn: 366821
* Re-commit: r366610 and r366612: Expand pseudo-components before embedding in ↵Daniel Sanders2019-07-191-72/+89
| | | | | | | | | | | | | | | | | llvm-config There were two main problems: * The 'nativecodegen' pseudo-component was unconditionally adding ${native_tgt}CodeGen even though it conditionally added ${native_tgt}Info and ${native_tgt}Desc. This has been fixed by making ${native_tgt}CodeGen conditional too * The 'all' pseudo-component was causing library names like LLVMLLVMDemangle as the expansion was to a library name and not a component. There doesn't seem to be a list of available components anywhere so this has been fixed by moving the expansion of 'all' back where it was before. This manifested in different ways on different builders but it was the same root cause llvm-svn: 366622
* Revert r366610 and r366612: Expand pseudo-components before embedding in ↵Daniel Sanders2019-07-191-86/+70
| | | | | | | | | | llvm-config Some targets are missing LLVMDemangle, one is adding the LLVM prefix twice, and two are hitting the very error this patch fixes for my target. Reverting while I work through the reports. llvm-svn: 366615
* Fix a latent bug discovered by r366610: nativecodegen includes X86CodeGen ↵Daniel Sanders2019-07-191-1/+3
| | | | | | | | | | | | when X86 is not compiled I believe this to have been a latent bug as the same expansion checks for the existence of ${native_tgt}Info and ${native_tgt}Desc and only adds them if they were compiled but unconditionally adds ${native_tgt}CodeGen. This should fix llvm-clang-x86_64-win-fast which builds ARM only on an X86 host and similar builders. llvm-svn: 366612
* Expand pseudo-components before embedding in llvm-configDaniel Sanders2019-07-191-70/+84
| | | | | | | | | | | | | | | | | | | | Summary: If you use pseudo-targets like AllTargetsCodeGens in LLVM_DYLIB_COMPONENTS then a test will fail because `./bin/llvm-config --shared-mode` can't handle these targets. We can fix this by expanding them before embedding the string into llvm-config Reviewers: bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65011 llvm-svn: 366610
* [cmake] Fix typo where a varible was checked for Apple instead of DarwinNathan Lanza2019-07-191-1/+1
| | | | | | | | | | Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64965 llvm-svn: 366515
* [cmake] Convert the NATIVE llvm build process to be project agnosticNathan Lanza2019-07-191-28/+31
| | | | | | | | | lldb recently added a tablegen tool. In order to properly cross compile lldb standalone there needs to be a mechanism to generate the native lldb build, analgous to what's done for the NATIVE llvm build. Thus, we can simply modify this setup to allow for any project to be used. llvm-svn: 366514
* [cmake] Only run llvm-codesign if targetting apple on an apple hostNathan Lanza2019-07-181-1/+1
| | | | | | | | | | | | | | | | | Summary: Other platforms don't have the capability to perform llvm_codesign step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would attempt to codesign if the target was Apple. But when cross compiling to Darwin from Linux, for example, this step would fail. So test if the host is Apple as well. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64942 llvm-svn: 366498
* [cmake] Don't set install rules for tblgen if building utils is disabledKeno Fischer2019-07-151-1/+1
| | | | | | | | | | | | | | | | | Summary: This is a follow up to D64032. Afterwards if building utils is disabled and cross compilation is attempted, CMake will complain that adding `install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined". Indeed, it appears depending on the CMake version and the selected Generator, the install rule will error because the underlying target isn't built. Fix that by not adding the install rule if building utils is not requested. Note that this doesn't prevent building tblgen as a dependency in not cross-build, even if building tools is disabled. Reviewed By: smeenai Differential Revision: https://reviews.llvm.org/D64225 llvm-svn: 366108
* cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macrosTom Stellard2019-07-121-6/+2
| | | | | | | | | | | | | | | | | | | Summary: This will simplify the macros by allowing us to remove the hard-coded list of libraries that should be installed when LLVM_INSTALL_TOOLCHAIN_ONLY is enabled. Reviewers: beanz, smeenai Reviewed By: beanz Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64580 llvm-svn: 365902
* Retire VS2015 SupportSimon Pilgrim2019-07-091-1/+4
| | | | | | | | | | As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017. Differential Revision: https://reviews.llvm.org/D64326 llvm-svn: 365452
* Fix issues building libraries as more than one type with XcodeChris Bieneman2019-07-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: CMake+Xcode doesn't seem to handle targets that only have object sources. This patch works around that limitation by adding a dummy soruce file to any library target that is generated by llvm_add_library when object libraries are generated. Object libraries are generated whenever llvm_add_library is passed more than one library type, which is now the default case for clang static libraries (which generate STATIC and OBJECT libraries). Reviewers: zturner, compnerd, joanlluch Reviewed By: joanlluch Subscribers: joanlluch, xbolva00, mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64300 llvm-svn: 365365
* [cmake] With utils disabled, don't build tblgen in cross modeKeno Fischer2019-07-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In cross mode, we build a separate NATIVE tblgen that runs on the host and is used during the build. Separately, we have a flag that disables building all executables in utils/. Of course generally, this doesn't turn off tblgen, since we need that during the build. In cross mode, however, that tblegen is useless since we never actually use it. Furthermore, it can be actively problematic if the cross toolchain doesn't like building executables for whatever reason. And even if building executables works fine, we can at least save compile time by omitting it from the target build. There's two changes needed to make this happen: - Stop creating a dependency from the native tool to the target tool. No such dependency is required for a correct build, so I'm not entirely sure why it was there in the first place. - If utils were disabled on the CMake command line and we're in cross mode, respect that by excluding it from the install target (using EXCLUDE_FROM_ALL). Reviewers: smeenai Differential Revision: https://reviews.llvm.org/D64032 llvm-svn: 364872
* [cmake] Allow config.guess to be run with MSYS on WindowsPengxuan Zheng2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | Summary: With r363420, config.guess can no longer be run with MSYS on Windows and this patch should be able to fix this particular case. Reviewers: compnerd Reviewed By: compnerd Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63834 llvm-svn: 364485
* Add llvm-symbolizer to LLVM_TOOLCHAIN_TOOLS (PR40152)Hans Wennborg2019-06-251-0/+1
| | | | | | So that it gets installed in LLVM_INSTALL_TOOLCHAIN_ONLY builds. llvm-svn: 364277
* [LLVM-C] Add LLVM-C.dll to Windows installer packageHans Wennborg2019-06-251-1/+3
| | | | | | | | | | | | This is a follow up to D56781, D56774 and D35077 to makes the LLVM-C.dll file and LLVM-C.lib be installed on Windows, just like LTO.dll and LTO.lib are. Patch by Jakob Bornecrantz! Differential revision: https://reviews.llvm.org/D63717 llvm-svn: 364275
* Remove flag for no longer supported MSVC versionNico Weber2019-06-241-4/+0
| | | | llvm-svn: 364218
* Specify log level for CMake messages (less stderr)Stefan Granitz2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Specify message levels in CMake. Prefer STATUS (stdout). As the default message mode (i.e. level) is NOTICE in CMake, more then necessary messages get printed to stderr. Some tools, noticably ccmake treat this as an error and require additional confirmation and re-running CMake's configuration step. This commit specifies a mode (either STATUS or WARNING or FATAL_ERROR) instead of the default. * I used `csearch -f 'llvm-project/.+(CMakeLists\.txt|cmake)' -l 'message\("'` to find all locations. * Reviewers were chosen by the most common authors of specific files. If there are more suitable reviewers for these CMake changes, please let me know. Patch by: Christoph Siedentop Reviewers: zturner, beanz, xiaobai, kbobyrev, lebedev.ri, sgraenitz Reviewed By: sgraenitz Subscribers: mgorny, lebedev.ri, #sanitizers, lldb-commits, llvm-commits Tags: #sanitizers, #lldb, #llvm Differential Revision: https://reviews.llvm.org/D63370 llvm-svn: 363821
* build: extract LLVM distribution target handlingSaleem Abdulrasool2019-06-141-0/+36
| | | | | | | | | This extracts the LLVM distribution target handling into a support module. Extraction will enable us to restructure the builds to support multiple distribution configurations (e.g. developer and user) to permit us to build the development package and the user package at once. llvm-svn: 363440
* build: don't attempt to run config.guess on WindowsSaleem Abdulrasool2019-06-141-10/+14
| | | | | | | | | | | When cross-compiling LLVM to android from Windows (for LLVMSupport), we would attempt to execute `config.guess` to determine the host triple since `CMAKE_SYSTEM_NAME` is not Windows and `CMAKE_C_COMPILER` will be set to GNU or Clang. This will fail as `config.guess` is a shell script which cannot be executed on Windows. Simply log a warning instead. The user can specify the value for this instead in those cases. llvm-svn: 363420
* [CMake] Export CMAKE_CONFIGURATION_TYPES for the LLVM build-treeStefan Granitz2019-06-051-0/+1
| | | | | | | | | | | | | | Summary: Useful info for standalone builds of subprojects. If a multi-configuration generator was used for the provided LLVM build-tree, standalone builds should consider actual subdirectories per configuration in `find_program()` (e.g. looking for `llvm-lit` or `llvm-tblgen`). Reviewers: labath, beanz, mgorny Subscribers: lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62878 llvm-svn: 362588
* [HWASAN][CMake] Allow instrumenting LLVM/clangEugene Leviant2019-06-041-0/+3
| | | | | | Differential revision: https://reviews.llvm.org/D62813 llvm-svn: 362474
* tools: add `llvm-nm` and `llvm-objcopy` to toolsSaleem Abdulrasool2019-06-031-0/+2
| | | | | | | | | Add `nm` and `objcopy` to the default value for the tools that we install now that they are sufficiently feature complete to replace bintuils' implementation. Patch by Jiang Yi! llvm-svn: 362425
* [test] Fix plugin testsDon Hinton2019-06-021-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recommit of r361790 that was temporarily reverted in r361793 due to bot breakage. Summary: The following changes were required to fix these tests: 1) Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior. 2) Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate `check-` targets, which don't make sense for the plugins because they aren't tests and don't have `RUN` statements. Here's a list of the `clang-check-anlysis*` targets with this change: ``` $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3 ``` 3) Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set. Reviewed By: NoQ Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62445 llvm-svn: 362328
* [CMake] Use libtool for runtimes when building for Apple platformPetr Hosek2019-06-021-0/+50
| | | | | | | | | | | | LLVM CMake build already uses libtool instead of ar when building for Apple platform and we should be using the same when building runtimes. To do so, this change extracts the logic for finding libtool into a separate file and then uses it from both the LLVM build as well as the LLVM runtimes build. Differential Revision: https://reviews.llvm.org/D62769 llvm-svn: 362313
OpenPOWER on IntegriCloud