Commit Graph

4325 Commits

Author SHA1 Message Date
Xavier Claessens 71bfec7ec1 cmake: subproject() supports the 'required' kwarg 2019-10-01 13:30:15 -04:00
Xavier Claessens 70b1391248 cmake: Write AST into build dir
It easier to read it from a file than looking into logs. Users needs to
read it to find variable names of generated dependency objects.
2019-10-01 13:30:15 -04:00
Xavier Claessens dd5a0df3ec Recursively include all objects from uninstalled static libraries 2019-10-01 13:06:45 -04:00
Xavier Claessens a3153747b9 Do not promote to link_whole when an internal library links to another 2019-10-01 13:06:45 -04:00
Xavier Claessens 19fc692b25 pkgconfig: Include dependencies of uninstalled static libraries 2019-10-01 13:06:45 -04:00
Xavier Claessens dc5ad1fad9 pkgconfig: Do not include uninstalled static libraries 2019-10-01 13:06:45 -04:00
Xavier Claessens 484b721369 Fix link_with of a static library with an uninstalled static library 2019-10-01 13:06:45 -04:00
Xavier Claessens f396c71c52 Fix link_whole of static libraries 2019-10-01 13:06:45 -04:00
Marc-André Lureau 01569fee2e Add depfile to configure_file()
In qemu, minikconf generates a depfile that meson could use to
automatically reconfigure on dependency change.

Note: someone clever can perhaps find a way to express this with a
ninja rule & depfile=. I didn't manage, so I wrote a simple depfile
parser.
2019-09-30 22:17:50 +03:00
Olexa Bilaniuk e32b0f8fbb Deduplicate PKG_CONFIG_PATH entries when initializing the array option pkg_config_path.
This avoids a warning about duplicate entries in an array option,
and closes #5736.
2019-09-30 20:54:08 +03:00
Olexa Bilaniuk 2057ffccc3 Correct obviously-wrong test for gold linker. 2019-09-30 20:54:08 +03:00
Jussi Pakkanen 1473fbc3f6
Merge pull request #5939 from lantw44/move-the-list-of-llvm-versions-to-a-common-place
Move the list of LLVM versions to a common place
2019-09-30 00:07:32 +03:00
Christoph Weiss 0008b326ff Add support for `depth` option in wrap-git
This allows cloning subprojects shallowly.  It works recursively for a
subproject's submodules in case `clone-recursive` is set to `true`.
2019-09-29 20:47:59 +03:00
Marc-André Lureau a65d5801f3 environment: Support taking values from dict
Related to #5955.
2019-09-29 08:42:53 -04:00
Marc-André Lureau 18897b6afd ConfigurationDataHolder: pass initial_values to ctor 2019-09-29 08:42:53 -04:00
Marc-André Lureau 6c72119cfd configure_file: add feature version checks for taking dict
Since commit 38a658214 ("configure_file: Support taking values from a
dict" #4236), configuration_data() and configure_file()'s
configuration kwarg can take a dict. Add missing version checks.
2019-09-29 08:42:53 -04:00
Ting-Wei Lan 24bd029437 environment: LLVM 9 is now a stable release 2019-09-29 00:11:16 +08:00
Ting-Wei Lan 0390b673f1 Find clang-format with alternative names
This is similar to what we currently do for scan-build except there is
no environment variable to choose a specific clang-format to run. If an
environment variable is needed for better control, we can add it later.
2019-09-29 00:11:15 +08:00
Ting-Wei Lan 08ce1fb541 Move the list of LLVM version suffixes to a common place
Both scan-build and llvm-config need the same list of LLVM version
suffixes. It is better to keep the list at a common place instead of
having several copies in different files, which is likely to become
out-of-sync when the list is updated.
2019-09-29 00:11:13 +08:00
Dylan Baker d6c4e79c84 mtest: Don't require an exe wrapper for if the cross file says we don't need one
Fixes #5970
2019-09-28 18:11:06 +03:00
Dylan Baker f724cc2042 backends: Add needs_exe_wrapper to test serialization
We need to know if the test actually needs an exe wrapper to run or not.
2019-09-28 18:11:06 +03:00
Andrew Conrad 714908e5d9 Catch NotADirectoryError to fix selinux error
Fixes #4798
2019-09-27 13:09:52 -07:00
Andrei Alexeyev 3fd460bce7 Fix GNU-like LLD being misdetected as MSVC-like LLD
Affects the latest version of the llvm-mingw toolchain
2019-09-27 08:20:07 -07:00
Aleksey Gurtovoy 7dbabdc7b6 Correctly handle platform-specific LDFLAGS options 2019-09-27 00:57:21 +03:00
Daniel Mensinger 534e94ffc3 cmake: Support ALIAS libraries 2019-09-26 20:33:50 +03:00
Daniel Mensinger fbddeeb4ac cmake: define set_and_check in CMake package config (fixes #5889) 2019-09-26 20:29:42 +03:00
Nathan Rossi 2dd5e695c7 envconfig: Add MicroBlaze CPU family
Add the CPU family for the MicroBlaze processor.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
2019-09-26 20:28:42 +03:00
Jussi Pakkanen 0993c57ce6
Merge pull request #5958 from keszybz/caching-cleanup
Caching cleanup
2019-09-26 00:08:57 +03:00
Ting-Wei Lan 74d5136e59 environment: Don't make special case for scan-build on Linux
Versioning of executables is not related to the operating system kernel.
It is possible for a Linux distribution to support multiple versions of
LLVM in a way similar to FreeBSD. For example, on Debian, you can use
'apt install clang-tools-7' to install the versioned 'scan-build-7'
executable without bringing the unversioned 'scan-build' into the
environment. Therefore, we should not skip the version list on Linux.
It also makes it consistent with the behavior of llvm dependency, which
does not change the search list depending on the operating system.

This commit also fixes the version suffix for Debian. Debian stops using
the minor version number on the executable after version 7, so it should
be 'scan-build-7', not 'scan-build-7.0'.

This is a follow-up of https://github.com/mesonbuild/meson/pull/5918.
2019-09-25 22:52:19 +03:00
Xavier Claessens 2e7f0ce557 Print user defined options in meson-log.txt
It can be useful to know what options have been passed to the command
line, excluding default values.

Closes: #5956
2019-09-25 22:50:48 +03:00
Zbigniew Jędrzejewski-Szmek f745e8fc4d Use functools cache instead of open-coded implementation
Functional behaviour is not identical, because the cache not set
when an exception is thrown. I hope this doesn't matter in practice.
2019-09-25 14:52:07 +02:00
Zbigniew Jędrzejewski-Szmek 11c1f8644c Drop unused variable 2019-09-25 14:52:07 +02:00
Zbigniew Jędrzejewski-Szmek 3a6920ebdc Add helper to print warnings once
The helper is general, although in this patch it is only used for
warnings. No functional change intended.
2019-09-25 14:52:07 +02:00
Daniel Mensinger c4f96e00a6 removed the InternalDepdendencyHolder, since it is unused 2019-09-25 08:28:11 -04:00
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Patrick Griffis 1670fca36f Add blocks dependency
This allows easily enabling the blocks clang extension.
2019-09-23 21:10:00 +03:00
Marc-André Lureau 6a12f3fc16 mtest: TAP: ignore empty lines
According to http://testanything.org/tap-specification.html

"Any output line that is not a version, a plan, a test line, a
diagnostic or a bail out is considered an “unknown” line. A TAP parser
is required to not consider an unknown line as an error but may
optionally choose to capture said line and hand it to the test
harness, which may have custom behavior attached [...] TAP::Harness
reports TAP syntax errors at the end of a test run".

(glib gtest can generate empty lines)
2019-09-23 13:28:11 -04:00
Jehan 179861ccd1 mesonbuild: fix exception name.
CrossNoRunException is in compilers module, not mesonlib.
2019-09-23 13:25:53 -04:00
Xavier Claessens ef3992f1cc configure_file(): Allow multiple inputs in command mode
Closes: #5893
2019-09-17 13:05:40 -04:00
Xavier Claessens 5d0ced220c pkgconfig: Fix ordering of public libraries
The main library must come before extra libraries, because they are
likely to be dependencies of the main library that get promoted from
private to public. This was causing static link issues with glib-2.0.pc.
2019-09-17 11:56:46 -04:00
Gabriel Ganne e7197895b2 uniform scan-build detection process
Detect scan-build the same way when trying to launch it and when
generating the target.
The detection method is:
  1. look within SCANBUILD env variable
  2. shutil.which('scan-build')
  3. *on non-linux platforms only*: go through all the possible
     name candidates and test them individually.

The third step is added following this comment
https://github.com/mesonbuild/meson/pull/5857#issuecomment-528305788
However, going through a list of all the possible candidates is neither
easily maintainable nor performant, and is therefore skipped on
platforms that should not require such a step (currently, only Linux
platforms).

This is a follow-up to the issue raised by @lantw44 during PR:
https://github.com/mesonbuild/meson/pull/5857
2019-09-14 05:51:36 +03:00
Jussi Pakkanen 9e04450eb6
Merge pull request #5917 from alanc/solaris-fixes
Solaris fixes
2019-09-14 05:50:41 +03:00
Alan Coopersmith 3e0279ba9f get_library_dirs: Add Solaris 64-bit library subdirs
Solaris puts 32-bit libraries in the main /lib & /usr/lib directories
and 64-bit libraries in platform specific subdirectories.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-09-13 16:13:44 -07:00
Daniel Mensinger 47bdea5040 mconf: Fix meson configure crash (fixes #5909) 2019-09-13 15:44:02 +03:00
Ross Burton ad368cfc07 modules/python: improve log when probing Python binary
If the Python binary that we find doesn't return valid JSON when asked to run a
small script, show the command being ran and stdout/stderr in meson-log.txt.

Fixes: #5914
2019-09-12 15:09:40 +03:00
Alan Coopersmith 3d74987c81 compilers: Recognize Solaris 11.4 linker
Solaris 11.3 & earlier sent the --version output to stderr, but
Solaris 11.4 moved it to stdout in an attempt to be more compatible
with the GNU tools, so look for it in both streams of output.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-09-10 22:43:34 -07:00
Andrei Alexeyev d768a76ab2 Workaround for mingw-llvm linker (lld) misdetection
llvm-mingw uses a wrapper script to inject (among other things) a
-target argument into the clang command, which breaks -Wl,--version.
This confuses Meson into thinking the linker is some unknown version of
Apple ld, which breaks builds.

This patch makes it detect and recover from the issue.

Fixes #5910
2019-09-10 13:23:22 -07:00
Dylan Baker 15f8165bde environment: merge successive is_windows blocks 2019-09-09 21:22:26 -07:00
Dylan Baker 4030ee4b6f the solaris linker also needs start/end-group for circular linking 2019-09-09 21:22:26 -07:00
Dylan Baker 52aba19b17 environment: gcc/g++ and clang/clang++ are valid objc/objc++ compilers to try 2019-09-09 21:22:26 -07:00