summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Pass external project source directories to sub-configuresShoaib Meenai2019-10-171-0/+9
| | | | | | | | | | We're passing LLVM_EXTERNAL_PROJECTS to cross-compilation configures, so we also need to pass the source directories of those projects, otherwise configuration can fail from not finding them. Differential Revision: https://reviews.llvm.org/D69076 llvm-svn: 375157
* [llvm] [ocaml] Support linking against dylibMichal Gorny2019-10-111-14/+18
| | | | | | | | | Support linking OCaml modules against LLVM dylib when requested, rather than against static libs that might not be installed at all. Differential Revision: https://reviews.llvm.org/D68452 llvm-svn: 374556
* Reland r349624: Let TableGen write output only if it changed, instead of ↵Nico Weber2019-10-031-16/+14
| | | | | | | | | | | doing so in cmake Move the write-if-changed logic behind a flag and don't pass it with the MSVC generator. msbuild doesn't have a restat optimization, so not doing write-if-change there doesn't have a cost, and it should fix whatever causes PR43385. llvm-svn: 373664
* [llvm] [cmake] Add install targets for missing distribution componentsMichal Gorny2019-10-022-0/+17
| | | | | | | | | | Add install targets as necessary to include all files normally installed in LLVM_DISTRIBUTION_COMPONENTS. This includes targets for Sphinx docs, opt-viewer Python modules and TableGens. Differential Revision: https://reviews.llvm.org/D68339 llvm-svn: 373482
* Revert rL349624 : Let TableGen write output only if it changed, instead of ↵Simon Pilgrim2019-10-011-4/+16
| | | | | | | | | | doing so in cmake, attempt 2 Differential Revision: https://reviews.llvm.org/D55842 ----------------- As discussed on PR43385 this is causing Visual Studio msbuilds to perpetually rebuild all tablegen generated files llvm-svn: 373338
* build: serialise `LLVM_ENABLE_UNWIND_TABLES` into LLVMConfigSaleem Abdulrasool2019-09-301-0/+2
| | | | | | | | | Serialize the value of the configuration option into the configuration so that builds which integrate LLVM can identify the value of the flag that was used to build the libraries. This is intended to be used by Swift to control tests which rely on the unwind information. llvm-svn: 373253
* Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGEJustin Bogner2019-09-241-1/+1
| | | | | | | | Mimics the changes in r372209 to handle the change of quotes in r372226. Probably isn't sufficient for windows, but unbreaks the cmake flag at least. llvm-svn: 372791
* [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM ↵Simon Pilgrim2019-09-231-0/+5
| | | | | | | | | | | | library Modify LLVMConfig to produce LLVM_USE_CRT variables in build-directory. It helps to set the same compiler debug options like in builded library. Committed on behalf of @igorban (Igor) Differential Revision: https://reviews.llvm.org/D67175 llvm-svn: 372610
* [cmake] Changes to get Windows self-host working with PGORussell Gallop2019-09-181-17/+33
| | | | | | | | | | | | | Fixes quoting of profile arguments to work on Windows Suppresses adding profile arguments to linker flags when using lld-link Avoids -fprofile-instr-use being added to rc.exe flags Removes duplicated adding of -fprofile-instr-use to linker flags (since r355541) Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake Differential Revision: https://reviews.llvm.org/D62063 llvm-svn: 372209
* [CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compilerDavid Zarzycki2019-09-101-1/+8
| | | | | | | | GCC (unlike clang!) warns about C++ flags when compiling C. https://reviews.llvm.org/D67171 llvm-svn: 371521
* [CMake] LLVM_COMPILE_FLAGS also applies to C filesDavid Zarzycki2019-09-061-1/+1
| | | | | | | | | LLVM_COMPILE_FLAGS also applies to C files, otherwise tuning flags, etc. won't be picked up. https://reviews.llvm.org/D67171 llvm-svn: 371173
* [cmake] Remove MSVC C4180 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/D67103 llvm-svn: 370871
* [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] Define _FILE_OFFSET_BITS=64 on SolarisRainer Orth2019-07-301-0/+6
| | | | | | | | | | | | This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on Solaris succeed by always making the host and freshly built clang consistent. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D64483 llvm-svn: 367304
* [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
OpenPOWER on IntegriCloud