aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/data
AgeCommit message (Collapse)AuthorFilesLines
2024-07-22cmake: extend library pattern to work on GNU/Hurd as wellPino Toscano1-1/+1
The existing "*-linux-gnu*" works on the Debian multiarch model for Linux architectures; tweak it to be "*-gnu*" so it works also for Hurd architectures. This makes the cmake-based search of dependencies work on Debian GNU/Hurd.
2024-02-07cmake: improve heuristics for static LLVM detectionSam James1-1/+1
In 89146e84c9eab649d3847af101d61047cac45765, a heuristic was introduced where if libLLVMSupport is available as a static library, LLVM itself is assumed to be availble as a static library as a whole. This is unfortunately not the case at least on Gentoo and Arch Linux, where a subsequent llvm-config call yields: ``` $ /usr/lib/llvm/17/bin/llvm-config --libfiles --link-static llvm-config: error: missing: /usr/lib/llvm/17/lib64/libLLVMTargetParser.a llvm-config: error: missing: /usr/lib/llvm/17/lib64/libLLVMBinaryFormat.a llvm-config: error: missing: /usr/lib/llvm/17/lib64/libLLVMBitstreamReader.a llvm-config: error: missing: /usr/lib/llvm/17/lib64/libLLVMRemarks.a [...] ``` On Gentoo, where LLVM's static libraries are not included, we still have: ``` $ equery f llvm:17 | grep -i lib64/.*.a$ /usr/lib/llvm/17/lib64/libLLVMDemangle.a /usr/lib/llvm/17/lib64/libLLVMSupport.a /usr/lib/llvm/17/lib64/libLLVMTableGen.a /usr/lib/llvm/17/lib64/libLLVMTestingAnnotations.a /usr/lib/llvm/17/lib64/libLLVMTestingSupport.a /usr/lib/llvm/17/lib64/libllvm_gtest.a /usr/lib/llvm/17/lib64/libllvm_gtest_main.a ``` Therefore, testing for libLLVMSupport is insufficient. We now try libLLVMCore instead, as that appears to only be installed when LLVM truly has static libraries available. libLLVMCore is handled as a LLVM component which gives us some guarantee this is supposed to be happening and not a fluke. (Specifically, LLVM's llvm/lib/Support/CMakeLists.txt pays 0 attention to -DLLVM_BUILD_LLVM_DYLIB and -DLLVM_LINK_LLVM_DYLIB, and is hence only affected by -DBUILD_SHARED_LIBS, which LLVM upstream say is only to be used for development. Therefore, with -DBUILD_SHARED_LIBS=OFF (as is recommended/the default) and -DLLVM_BUILD_LLVM_DYLIB=ON, you will get a static libLLVMSupport, without it indicating anything about the rest of your configuration.) Closes: https://github.com/mesonbuild/meson/issues/12323 Fixes: 89146e84c9eab649d3847af101d61047cac45765 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2023-05-13Make `dependency('foo', static: true, method: 'cmake') link staticallyVolker Weißmann1-0/+4
Fixes #1709
2023-04-11fix various spelling issuesJosh Soref1-1/+1
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-28cmake: allow dynamic linking with LLVMKonstantin1-20/+130
llvm-config is unsuitable for standard cross-compile, because we need to build llvm especially for it, which is not done is almost any distros, so, for example, standard bootstrap chroot will be unsuitable. This patch is trying to acheive feature parity between config-tool searching of LLVM and CMake-based one, which is arch-agnostic. Signed-off-by: Konstantin <ria.freelander@gmail.com>
2022-04-12cmake: Always use all compilers for LLVM (fixes #10249)Daniel Mensinger1-1/+0
2022-01-10port from embedded data to importlib.resourcesEli Schwartz1-0/+0
2020-11-21Handle cmake dependencies which require a specified versionJason Ekstrand1-1/+5
Some CMake packages fail to find at all if no version is specified. This commit adds a cmake_version parameter to dependency() to allow you to specify the requested version.
2020-03-19cmake: Add find_package COMPONETS supportDaniel Mensinger1-1/+1
2019-12-09cmake: add project language to cmakelists.txtMichael Hirsch, Ph.D1-1/+5
cmake: get language from Meson project if not specified as depedency(..., langugage: ...) deps: add threads method:cmake dependency('threads', method: 'cmake') is useful for cmake unit tests or those who just want to find threads using cmake. cmake: project(... Fortran) generally also requires C language
2019-08-03Improve support for crosscompiled CMake modulesMarcin Niestroj1-0/+2
There are two variables that CMake takes into account during find_package() in cross-compiled environments, which are: CMAKE_SYSROOT and CMAKE_FIND_ROOT_PATH. Those are used in cmFindCommon::RerootPaths() function, which blindly prepends all search paths with those specified via CMAKE_SYSROOT and CMAKE_FIND_ROOT_PATH. Extend search paths by using CMAKE_SYSROOT and CMAKE_FIND_ROOT_PATH in a similar way as CMake does, so we successfully find CMake packages information in cross-compiled environments.
2019-05-03cmake: LLVM better modules handlingDaniel Mensinger1-4/+27
2019-05-03CMake: optional modules supportDaniel Mensinger1-2/+4
2019-05-03LLVM: Added CMake backendDaniel Mensinger1-0/+70
2019-02-26Preliminary CMake module searchDaniel Mensinger2-14/+33
2019-01-24Try multiple CMAKE_LIBRARY_ARCHITECTURE. Closes #4812Daniel Mensinger1-11/+18
2018-11-22CMake find_package dependency backend (#4444)Daniel Mensinger1-0/+93