Commit Graph

8634 Commits

Author SHA1 Message Date
Daniel Mensinger 3607f50d7f
cmake: Refactor CMakeExecutor and CMakeTraceParser
This moves most of the execution code from the CMakeInterpreter
into CMakeExecutor. Also, CMakeTraceParser is now responsible
for determining the trace cmd arguments.
2020-01-26 18:23:34 +01:00
Xavier Claessens b74ece344f Support multiple args to message() and warning() 2020-01-26 07:51:16 -05:00
Ernestas Kulik dbad64cf34 tests: Prevent multiple-definition of symbols
With GCC 10, -fno-common becomes default behavior, meaning that any
subtly-broken code will be broken not so subtly anymore.

This commit changes the linkage to variables declared in headers to
external and, where needed, adds additional definitions in other
compilation units.
2020-01-25 23:07:38 +02:00
Xavier Claessens f54f27b1a8 Fix required dependency() not failing when wrap-mode=nofallback
When a dependency is required, not found on the system, and its fallback
is disabled with --wrap-mode=nofallback, meson should abort instead of
returning not-found.
2020-01-25 08:51:46 -05:00
Xavier Claessens b6b4903129 mconf: Recommend using --reconfigure when setting unknown options
Fixes: #6477
2020-01-25 12:08:47 +02:00
Dylan Baker b871b9fd06 docs: Update the release procedure to include release candidates [skip ci]
Fixes #6456
2020-01-25 11:58:12 +02:00
Xavier Claessens 5c8dbdcd38 wrap: Fix git clone with commit id in revision
Fixes: #6505.
2020-01-25 13:49:00 +05:30
Jussi Pakkanen 37716aed6d Remove trial conversions as it is stale. [skip ci] 2020-01-24 16:10:17 -08:00
Jan Alexander Steffens (heftig) 03065f2f00 Fix CUDA test without devices.
Getting the runtime version fails when no devices are present.
2020-01-24 14:28:06 +02:00
Nirbheek Chauhan 8be4802b0b unit tests: summary() test does not fail on Windows anymore 2020-01-24 02:53:34 +05:30
Nirbheek Chauhan e99e742454 summary: Ensure that output is deterministic
Use OrderedDict instead of dict() to ensure that the order is the same
every time, and change the unit test to check for that.
2020-01-24 02:53:34 +05:30
Daniel Mensinger a78f90c3f8 ci: Fix boost test on xenial 2020-01-24 02:53:34 +05:30
Nirbheek Chauhan ca1776d6db tests: Disable fortran submodule test on old GCC versions
Need gcc 6.0 or newer: https://gcc.gnu.org/wiki/Fortran2008Status
2020-01-24 02:53:34 +05:30
Daniel Mensinger da7a1cf52a ci: Install more packages 2020-01-24 02:53:34 +05:30
Nirbheek Chauhan 2c8e676e2b tests: Fix some test failures on Ubuntun 16.04 CI
* xenial doesn't ship many dependencies, so make them all optional
  since we don't guarantee that everything will work
* cmake/{5,6}: needs stdlib.h for EXIT_SUCCESS on GCC 5
* common/222: needs C++11, and GCC 5 doesn't understand `auto`
  correctly unless we explicitly enable it.
* frameworks/1 boost: xenial doesn't ship boost_python3, so make it
  properly optional
* frameworks/6 gettext: gettext can be installed without xgettext,
  which doesn't cause the project to fail, but the installed files
  list is different which causes the test to fail.
* frameworks/7 gnome: gobject-introspection can't be enabled because
  the sanitizer unit test detects leaks in glib and fails
2020-01-24 02:53:34 +05:30
Nirbheek Chauhan 4d93a11427 unit tests: Open all documentation as utf-8
Fixes compatibility of unit tests with Python 3.5.2 on Ubuntu 16.04
2020-01-24 02:53:34 +05:30
Nirbheek Chauhan 7672cd99c2 compilers: Derive CompilerArgs from collections instead of typing
Deriving from typing.MutableSequence does not give us a usable
sequence type on Python 3.5.2.
2020-01-24 02:53:34 +05:30
Nirbheek Chauhan d8e738f04f typing: Fix compatibility with Python 3.5.2
Explicitly use the type instead of the string 'NotImplemented' which
still works with Python 3.5.2

Fixes https://github.com/mesonbuild/meson/issues/6427
2020-01-24 02:53:34 +05:30
Daniel Mensinger 806068304b ci: Add a Ubuntu 16.04 test 2020-01-24 02:53:34 +05:30
Daniel Mensinger bc27ebacc9 cmake: Always Add C, CXX if no language is specified (fixes #6441) 2020-01-23 20:57:17 +01:00
Jussi Pakkanen a11a28a988 Add LCA2020 talk to videos page. [skip ci] 2020-01-23 21:35:32 +02:00
Jussi Pakkanen 254cb3209d Set source and build dir envvars when running dist. 2020-01-23 02:25:52 +02:00
Dylan Baker a55e3434c5 environment: Fix initialization of compilers that don't use a
_guess_linker method

Fixes #6448
2020-01-23 01:59:31 +02:00
Nirbheek Chauhan 712b2f08c7 Move git helper out into mesonlib for reuse
Reuse the git helper for `meson wrap` and `meson subprojects` so we
don't need to maintain the same git-colors-on-windows workarounds in
multiple places.
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan da486bfddc msubprojects: Rename 'git' to 'git_output'
No functional changes. Split out from the next commit for ease of
reading.
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan 06dddf2ef0 wrap: Re-set the console mode after calling git
`git submodule update --recursive` calls git clone recursively, and on
Windows it will undo the console mode we set in mlog and cause ANSI
colors to stop working. We could set it again only when we call that,
but we will definitely miss other instances where this could happen
in the future and regress.
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan e962147d8a wrap: Redirect stdin to DEVNULL when calling git
Without this git messes up the console and ANSI colors stop working on
Windows inside cmd.exe.

This broke in https://github.com/mesonbuild/meson/pull/6139. Also add
the same to all git calls. Missed this when I opened
https://github.com/mesonbuild/meson/pull/6255
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan f09056f903 wrap: Always use a wrapper for running git
We need this for the next commit.
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan 7065cef62f wrap: Look for git only once at startup
No need to repeatedly call `shutil.which`.
2020-01-22 17:29:38 -05:00
Nirbheek Chauhan 2661b1bfb5 wrap: Use uppercase for global constants
This makes things much clearer and follows PEP8.
2020-01-22 17:29:38 -05:00
Dylan Baker 8c1221b437 Add m68k to known cpus for Motorola 68000 series processors
Fixes #6492
2020-01-23 00:20:01 +02:00
Mike Gilbert b51ba60b80 test_pkgconfig_gen_deps: set PKG_CONFIG_SYSTEM_LIBRARY_PATH=/usr/lib
pkgconf automatically prunes "system library paths" from its output. The
system library paths depend on the system toolchain. A common value on a
64-bit system is as follows:

/lib64:/usr/lib64:/usr/local/lib64

So, if -L/usr/lib64 appears in the Libs section, it will be pruned from
the output of pkg-config --libs.

The pc files generated for this test contain something like this:

libdir=/usr/lib
Libs: -L${libdir} ...

pkgconf may not consider /usr/lib to be a system library path, so it is
not pruned as the test expects. To work around this, override the
compiled-in list of paths via the PKG_CONFIG_SYSTEM_LIBRARY_PATH
environment variable.

Fixes: https://github.com/mesonbuild/meson/issues/6004
2020-01-22 14:10:54 -08:00
Dylan Baker 255fa5a320 tests: Add a test case for finding ld 2020-01-22 23:39:33 +02:00
Dylan Baker 730a7b296f environment: Replace LD with <LANG>LD
The rust code is ugly, because rust is annoying. It doesn't invoke a
linker directly (unless that linker is link.exe or lld-link.exe),
instead it invokes the C compiler (gcc or clang usually) to do it's
linking. Meson doesn't have good abstractions for this, though we
probably should because some of the D compilers do the same thing.
Either that or we should just call the c compiler directly, like vala
does.

This changes the public interface for meson, which we don't do unless we
absolutely have to. In this case I think we need to do it. A fair number
of projects have already been using 'ld' in their cross/native files to
get the ld binary and call it directly in custom_targets or generators,
and we broke that. While we could hit this problem again names like
`c_ld` and `cpp_ld` are far less likely to cause collisions than `ld`.
Additionally this gives a way to set the linker on a per-compiler basis,
which is probably in itself very useful.

Fixes #6442
2020-01-22 23:39:33 +02:00
Stéphane Cerveau 958df63dac envconfig: add pkg_config_libdir property
In order to unify the use of sysroot in the cross-file,
the pkg_config_libdir can now be passed directly in the file.
2020-01-22 15:42:13 -05:00
Nirbheek Chauhan c5c0c467fe tests/windows/16: Use pefile module instead of objdump/dumpbin
The pefile module is a CI dependency now, so we can use that instead
of objdump/dumpbin which greatly simplifies the test. Of course, this
module is also cross-platform so it will work if we add cross-win32 CI
at some point.
2020-01-22 19:34:05 +05:30
Nirbheek Chauhan bd17c9ad4f tests: Add a unit test for checksums
Adds a CI dependency on the `pefile` python module.
2020-01-22 19:34:05 +05:30
Nirbheek Chauhan b293852d07 vs: Write checksums in PE binaries (DLLs and EXEs)
This is needed for detecting data corruption, and its absence (or
an incorrect value) is also used as a hint by anti-viruses that the
binary may be malware.

Flag is only supported by MSVC `link.exe`, not `lld-link.exe`

https://docs.microsoft.com/en-us/cpp/build/reference/release-set-the-checksum
2020-01-22 19:34:05 +05:30
Nirbheek Chauhan 89b132f240 linkers: Accept both str and List[str] for _apply_prefix
Simplifies some usage.
2020-01-22 19:34:05 +05:30
Nirbheek Chauhan 38db769aaf linkers: Clarify a comment about rspfiles 2020-01-22 19:34:05 +05:30
Jussi Pakkanen ad687462e1 Add link to PDF manual site on the front page. [skip ci] 2020-01-22 11:42:20 +02:00
Jussi Pakkanen 21eba740e7 Reformat user list page. [skip ci] 2020-01-22 11:29:59 +02:00
Dylan Baker 04c4bbccb7
Merge pull request #6481 from jon-turney/osx-qt-dep-crash
Fix dependency('qt') crash with old Qt on OSX
2020-01-21 09:09:14 -08:00
Niklas Hambüchen b44501b02d docs: Fix typo in link
Commit 1404f404 (#4744) introduced this typo, making the link not jump to the correct section when clicked.
2020-01-21 08:46:33 -08:00
Marc-Andre Lureau 24174abfb2 Users.md: add qboot [skip ci]
It's worth to list a meson project building a firmware.
2020-01-21 05:55:27 +10:00
Sebastien Bacher 82f6790d5c Use python3 in some tests which were still using python
The unversioned command is deprecated and removed from some distributions
2020-01-21 04:26:50 +10:00
alex-tee 646c928b34 add zrythm to Users.md [skip ci] 2020-01-20 16:38:36 +10:00
Jon Turney d2e5a82fb5
Fix 'qt4test' test executable when only Qt4 is present
This always tries to load a 'qt5core_fr' translation file, when it is
actually named 'qtNcore_fr'(where N is the qt version).
2020-01-18 17:29:55 +00:00
Jon Turney c272c8de38
Make the 'framework/4 qt' test more flexible
Make the 'framework/4 qt' test more flexible about what version of Qt is
expected to be present in the CI environment. Currently, this is
hard-coded as Qt5. We add an option to specify it so we can run this
test under CI with just Qt4 present.
2020-01-18 17:29:47 +00:00
Jon Turney 3ae34b4386
Add macOS Qt4 framework test to ci-actions 2020-01-18 17:29:39 +00:00