Commit Graph

2818 Commits

Author SHA1 Message Date
Jon Turney 82bdf07a9d
Hoist trying several dependency detection methods up to find_external_dependency()
find_external_dependency() now makes and iterates over a list of callables
which are constructors with bound arguments for the dependency objects we
are going to attempt to make, so we can consolidate reporting on these
attempts and handling failures in that function.
2018-08-01 14:25:58 +01:00
Jon Turney 983263e82c
Remove do-nothing pkgconfig method from dub
dub dependencies allegedly support method:pkgconfig, but this is meaningless
as it's only ever used when the dub method is explicitly requested.
Possibly cut-and-pasted from elsewhere?
2018-08-01 14:25:57 +01:00
Jon Turney fce4f35170
Remove do-nothing extraframework method from libwmf and pcap
libwmf and pcap allegedly support method:extraframework, but this does
nothing but return not-found.  Possibly cut-and-pasted from elsewhere?
2018-08-01 14:25:56 +01:00
Derek Kingston 448b93fbe5 Updated boost discovery to handle version >= 1.65 for MSVC (#3961) 2018-07-31 20:03:56 +03:00
Nirbheek Chauhan a2dab5439c custom targets: Add a 'console' kwarg for long-running commands
Ninja buffers all commands and prints them only after they are
complete. Because of this, long-running commands such as `cargo
build` show no output at all and it's impossible to know if the
command is merely taking too long or is stuck somewhere.

To cater to such use-cases, Ninja has a 'pool' with depth 1 called
'console', and all processes in this pool have the following
properties:

1. stdout is connected to the program, so output can be seen in
   real-time
2. The output of all other commands is buffered and displayed after
   a command in this pool finishes running
3. Commands in this pool are executed serially (normal commands
   continue to run in the background)

This feature is available since Ninja v1.5

https://ninja-build.org/manual.html#_the_literal_console_literal_pool
2018-07-31 19:38:54 +03:00
Jussi Pakkanen 543a49a29c
Merge pull request #3799 from rossburton/gtkdoc
scripts/gtkdochelper: add support for --run
2018-07-31 19:37:00 +03:00
Jussi Pakkanen e75f6e4305
Merge pull request #3850 from mesonbuild/nirbheek/exe-wrapper-compiler-fallbacks
Be more permissive about not-found exe_wrapper
2018-07-31 19:33:06 +03:00
TingPing bd21987685 gnome: Fix building gir with asan again
asan must be first in ldflags and this order was lost in cb36add970

So this is the most simple solution of just putting it first in internal_ldflags

See https://github.com/mesonbuild/meson/issues/2117#issuecomment-408560838
2018-07-29 21:04:04 +03:00
Christoph Reiter 6b9fdfe67b python.find_installation: only try to find python with the py launcher if it isn't in PATH
Meson tries to find the interpreter path through the "py" launcher on Windows in all
cases which breaks if meson is run under MSYS2 and an official CPython is installed as well.
MSYS2 Python doesn't install a py launcher which results in meson finding the system one instead
even though python2/python3 is in PATH.

Always check if the interpreter name is in PATH before falling back to checking the py launcher.
2018-07-27 18:10:13 +03:00
Jussi Pakkanen 8c735069b3
Merge pull request #3898 from mesonbuild/vsinstall
Add install target to VS
2018-07-27 14:38:50 +03:00
Xavier Claessens e7dcf5cf16 Warn for future keyword (#3908) 2018-07-27 14:31:54 +03:00
Rafael Ávila de Espíndola c7360dd426 Make the rpath order deterministic. (#3932) 2018-07-25 19:40:54 +03:00
Xavier Claessens 10a1a39961
Merge pull request #3943 from xclaesse/auto-feature-default
UserFeatureOption: Default to 'auto' when no value specified
2018-07-25 11:14:35 -04:00
Nirbheek Chauhan 0ea21d7aea Add a feature-new entry for UserFeatureOption
Since we can't detect it in meson_options.txt, detect it when the
option is used.
2018-07-25 08:02:49 -07:00
Xavier Claessens 5f9fda4acc UserFeatureOption: Default to 'auto' when no value specified
Closes #3938.
2018-07-25 09:55:16 -04:00
Nirbheek Chauhan 9e8566a277 Print a useful error when a compiler is not found in the cross file 2018-07-24 18:54:52 -07:00
Rafael Ávila de Espíndola 1a27714f97 Make the dependency order deterministic. (#3927)
We were using sets to store the dependencies. Just switch to
OrderedSet.

Fixes #3922.
2018-07-22 22:24:42 -07:00
Jussi Pakkanen 7bb5f82736 Added install target to VS. Closes #3841. 2018-07-22 16:05:09 +03:00
Khem Raj 6fafbad6d5 mesonbuild: Recognise risc-v architecture
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-21 22:02:25 +03:00
Jussi Pakkanen 306fa07f62
Merge pull request #3893 from FFY00/master
Add dlang module (dub support)
2018-07-21 02:46:11 +03:00
Rafael Ávila de Espíndola aee9f58939 Handle transitive links to 'threads' dependencies. (#3895)
Meson already had code to propagate link dependencies from static
libraries to programs that use those static libraries.

Unfortunately, it was not handling the special cases of 'threads' and
'openmp' dependencies.
2018-07-19 01:24:59 +03:00
Jussi Pakkanen f390a0a2f3
Merge pull request #3814 from behlec/configure-file-output
Check if calls to configure_file write to the same output file.
2018-07-19 01:17:34 +03:00
Jussi Pakkanen 808d229c37 Moved install data file generation to base class. 2018-07-17 13:04:07 +03:00
FFY00 e39b6be670
dlang module: fix DubDependency - new compiler api 2018-07-16 15:32:42 +01:00
FFY00 6727af4e61
dlang module: allow all configuration types when generating dub.json 2018-07-16 12:39:29 +01:00
Thomas Hindoe Paaboel Andersen e2c36457c5 Avoid concatenating two options in list
'c++17' and 'gnu++98' were concatenated due to a missing comma
2018-07-13 20:00:50 +03:00
Nirbheek Chauhan 43f7a75060 gnome.gdbus_codegen: Handle XML docbook in subdirs
Closes https://github.com/mesonbuild/meson/issues/3870
2018-07-11 22:47:12 +03:00
Alberto Sartori 8bee30367e Implement get_link_whole_for() for IntelCompiler (#3863)
closes #3862
2018-07-10 13:23:51 -07:00
Nirbheek Chauhan 47c68a5993 find_library: Validate and sort globbed shared library files
We need to pick the library with the highest version, which is what
the OpenBSD linker also does.

https://github.com/mesonbuild/meson/issues/3570#issuecomment-403638752
2018-07-10 12:42:52 -07:00
Ross Burton 49e97fb704 gtkdoc: pass the cross compiler if cross compiling
When cross-compiling, tell gtkdoc to use the cross compile instead of the target
compiler.
2018-07-09 23:44:35 +01:00
Ross Burton d365bde555 scripts/gtkdochelper: add support for --run
gtkdoc-scangobj has a --run argument that specifies a wrapper to be used when
executing the GObject scanner.  Typically this can be libtool but it is also
useful in cross-compilation environments.

This patch adds support for this argument to the gtkdochelper so that tools
using the helper can pass --run if required.
2018-07-09 23:44:35 +01:00
Jussi Pakkanen 09ad29ec56 Fix directory verification. Closes #3857. 2018-07-09 23:14:59 +02:00
Nirbheek Chauhan 8cfb8fd02c
Fix searching of shared libraries on OpenBSD (#3851)
* get_library_naming: Use templates instead of suffix/prefix pairs

This commit does not change functionality, and merely sets the
groundwork for a more flexibly naming implementation.

* find_library: Fix manual searching on OpenBSD

On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the
major version and Y is the minor version. We were assuming that it's
libfoo.so and not finding shared libraries at all while doing manual
searching, which meant we'd link statically instead.

See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs

Now we use file globbing to do searching, and pick the first one
that's a real file.

Closes https://github.com/mesonbuild/meson/issues/3844

* find_library: Fix priority of library search in OpenBSD

Also add unit tests for the library naming function so that it's
absolutely clear what the priority list of naming is.

Testing is done with mocking on Linux to ensure that local testing
is easy
2018-07-09 09:45:02 -07:00
Nirbheek Chauhan e8dae2b966 cross: Be more permissive about not-found exe_wrapper
We used to immediately try to use whatever exe_wrapper was defined in
the cross file, but some people generate the cross file once and use
it for several projects, most of which do not even need an exe wrapper
to build.

Now we're a bit more resilient. We quietly fall back to using
non-exe-wrapper paths for compiler checks and skip the sanity check.
However, if some code needs the exe wrapper, f.ex., if you run a built
executable using custom_target() or run_target(), we will error out
during setup.

Tests will, of course, continue to error out when you run them if the
exe wrapper was not found. We don't want people's tests to silently
"pass" (aka skip) because of a bad CI setup.

Closes https://github.com/mesonbuild/meson/issues/3562

This commit also adds a test for the behaviour of exe_wrapper in these
cases, and refactors the unit tests a bit for it.
2018-07-09 05:39:40 +05:30
Nirbheek Chauhan 416a00308f cross: Use ExternalProgram for cross-file exe_wrapper
We already have code to fetch and find binaries specified in a cross
file, so use the same code for exe_wrapper. This allows us to handle
the same corner-cases that were fixed for other cross binaries.
2018-07-09 04:09:46 +05:30
Nirbheek Chauhan 78f1ef85fd
Add missing method on external library object: type_name() (#3845)
For some reason this was missing, but it should've always existed
since cc.find_library() returns an object that is internally an
ExternalDependency instance.
2018-07-08 10:58:07 -07:00
Christoph Behle 430506f814 Use mlog.bold to add quotes 2018-07-08 19:46:36 +02:00
Christoph Behle 2f494d2ccf Simplified and cleaned up warning. 2018-07-08 18:19:17 +02:00
Christoph Behle 2d5e1e24a1 Consider subdir for output files.
Files will only clash if in the same subdir.
Print the subdir in the warning.
2018-07-07 21:20:23 +02:00
Christoph Behle 620c0b07a9 Track line numbers for configure_file.
Track line numbers of calls. Warning reports now the line number of the
first and the current write to the same file.
2018-07-07 21:20:23 +02:00
Christoph Behle 07f5a5e490 Add warning if configure_file overwrites output.
Record the output for each call to configure_file.
If a previous output is overwritten print a warning.
2018-07-07 21:20:23 +02:00
Nirbheek Chauhan 2093d45a4e Print a more usable message when a subproject fails to configure
Instead of just printing the message in the exception, if it's
a MesonException, also print the file and the line number. If it's an
unknown exception, print the entire traceback so that we can pin-point
what the Meson bug causing it is.
2018-07-07 04:33:24 -07:00
Nirbheek Chauhan 80392225a6 Raise a MesonException when substituting an invalid value
Avoids throwing a traceback. Also, warn when setting such a value.
2018-07-07 04:33:24 -07:00
Nirbheek Chauhan 4fb00ee1d8 Add new method: mlog.deprecation()
Instead of constructing it manually, use a helper.
2018-07-07 04:33:24 -07:00
Jussi Pakkanen 4dc97a910e
Merge pull request #3763 from noverby/wip/noverby/jar-linking-manifest
java: support for linking jar files (using manifest)
2018-07-07 13:10:22 +03:00
Nirbheek Chauhan 9bc9e9f306 Ask for more details when warning about unknown arch [skip appveyor] 2018-07-07 11:47:42 +03:00
Ross Burton e3e2e4ca14 Canonicalise 64-bit PowerPC CPU families to "ppc64"
Instead of exposing the endianness in the CPU family, canonicalise the CPU
family to just "ppc64" to match MIPS (which is also bi-endian).

Part of the work for #3842.
2018-07-07 11:47:42 +03:00
Nirbheek Chauhan e4417eb301 mlog: Log timestamps in profile-self mode
This makes it much clearer which statements are taking a long time,
and helps in interpreting the outputted profile itself.
2018-07-06 06:25:12 +00:00
Nirbheek Chauhan 1415cd2d07 mlog: Add built-in support for quoting bolded messages
This allows us to drop wonky sep='' hacks and manual addition of
spaces across the codebase.
2018-07-06 06:25:12 +00:00
Nirbheek Chauhan f2b008f874 gnome.gtkdoc: Don't treat install_dir as a file option
Causes the value to be expanded to current source directory.

Fixes https://github.com/mesonbuild/meson/issues/3829
2018-07-06 05:44:02 +00:00