Commit Graph

676 Commits

Author SHA1 Message Date
Paolo Bonzini 3778a34979 mintro: include test protocol in introspection data 2019-12-13 00:47:10 +02:00
Jussi Pakkanen 17dd9e5bff
Merge pull request #6207 from dcbaker/linker-option
Add a way to select the dynamic linker meson uses
2019-12-11 23:29:33 +02:00
Daniel Mensinger fc800a2cb8 mintro: Add version key to --scan-dependencies (fixes #6287) 2019-12-10 20:17:21 +02:00
Xavier Claessens 1dda7cde39 run_unittests: Disable pytest with python <= 3.5
It's causing issues in some CI runners, it looks like it could be that
bug: https://github.com/pytest-dev/pytest-xdist/issues/204.
2019-12-10 18:02:41 +02:00
Xavier Claessens 552e78da4d assert(): Make message argument optional 2019-12-10 18:02:41 +02:00
Xavier Claessens 1298f71b1c dist: Add --include-subprojects option 2019-12-08 20:21:43 +02:00
Dylan Baker 875ef354d0 compilers: Rework the CompilerArgs to be less awful
There are two awful things about CompilerArgs, one is that it directly
inherits from list, and there are a lot of subtle gotcahs with
inheriting from builtin types. The second is that the class allows
arguments to be passed in whatever order. That's bad. This also fully
annotates the CompilerArgs class, so mypy can type check it for us.
2019-12-05 22:15:40 +02:00
Dylan Baker f8aa17d8e6 run_unittests: Add tests for LD on windows 2019-12-03 13:08:42 -08:00
Dylan Baker 75c1874bb3 run_unittests: Add unittests for ld overriding 2019-12-03 13:08:42 -08:00
Dylan Baker 8091b4c744 Intel: Dump worthless Xild abstractions
This dumps xild on mac and linux. After a lot of reading and banging my
head I've discovered we (meson) don't care about xild, xild is only
useful if your invoke ld directly (not through icc/icpc) and you want to
do ipo/lto/wpo. Instead just make icc report what it's actually doing,
invoking ld or ld64 (for linux and mac respectively) directly. This
allows us to get -fuse-ld working on linux.
2019-12-03 13:08:42 -08:00
Dylan Baker 71e3fac5af run_unittests: remove unused PatchModule class 2019-12-02 16:39:06 -08:00
Dylan Baker ef9aeb188e Allow selecting the dynamic linker
This uses the normal meson mechanisms, an LD environment variable or via
cross/native files.

Fixes: #6057
2019-12-02 16:39:06 -08:00
Michael Hirsch, Ph.D 83b4e981c4 Use strict function prototypes 2019-11-18 22:21:36 +02:00
Jussi Pakkanen bf800101c2
Merge pull request #6182 from mensinda/depInfo
Better dependency logs
2019-11-17 14:29:47 +02:00
Daniel Mensinger c361181cd9
mintro: dependencies: added version key 2019-11-14 18:16:47 +01:00
Paulo Neves 07389e23bc coredata: CmdLineFileParser no longer interpolates strings.
Previously if a user tried to pass a command line build
option that contained a '%' character the command line
parser assumed that there was string interpolation to be
done. As there is no sense in such a scenario no code
provides any input for the interpolation. This then leads to
a failure.

In this commit we specifically override the defaults in
ConfigParser and set interpolation to None, which disables
command line build option interpolation.

Fixes #6157
2019-11-13 22:04:15 +02:00
Jussi Pakkanen 2a73517e08 Revert "Add `-Wl,-rpath-link` for secondary dependencies"
This reverts commit 7b9c348102.

Closes #6027.
2019-11-13 17:46:34 +02:00
Marvin Scholz 273d6e75ea dependencies/pkgconfig: Fix error reporting
The stderr of pkg-config was never used, leading to no details about
failures at all in exception messages.
2019-11-07 17:50:00 +05:30
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Michael Hirsch, Ph.D bbe6db08e3 Minit templates modularization 2019-11-02 23:34:58 +02:00
Aleksey Gurtovoy 6eee9e48bb MSVC: support -LIBPATH
Fixes #6101 (with a test), following up #5881
2019-10-29 22:40:13 +02:00
Orlando Wingbrant 9ee9a1e1b2 Fix for issue #4499, multiple entries per file in install-log.txt 2019-10-23 22:37:45 +03:00
Jussi Pakkanen f96a8cbdf5 Test that running configure on a build dir works. 2019-10-22 22:32:34 +03:00
Daniel Mensinger 80ec5e9d28 Fix all flake8 warnings 2019-10-20 17:44:43 +03:00
Jussi Pakkanen 7bc7ff1433 Do not try to run dist test with VS backend. 2019-10-20 13:30:17 +03:00
Ross Burton a1a8772034 Add test case to verify identity cross builds
A build with a cross file should always be identified as a cross build, even if
the host and build machine are identical.  This was the case in 0.50, regressed
in 0.51, and is fixed again in 0.52, so add a test case to ensure it doesn't
regress again.
2019-10-15 23:46:35 +03:00
Jussi Pakkanen b6af3f3810
Merge pull request #5833 from dcbaker/remove-compiler-type
Remove compiler type
2019-10-09 19:53:56 +03:00
Jakub Adam 1bf1782476 Fix *.pdb files missing in meson introspect --installed output
On Windows, make sure the introspect command lists all Program database
(PDB) files containing debugging information that Meson will install.
2019-10-09 15:50:20 +02:00
Jan Beich 217036f2d9 Skip more tests if pkg-config is missing
meson.build:13:2: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.
2019-10-08 22:03:25 +03:00
Dylan Baker 0c22798b1a compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
2019-10-07 12:08:20 -07:00
Daniel Mensinger b1b8a7a7e3
Use -isystem instead of -idirafter 2019-10-03 10:06:04 +02:00
Jussi Pakkanen 48a5d17830
Merge pull request #5873 from mesonbuild/py2optional
Make Python 2 tests optional(er) to prepare for py2 purge in Debian.
2019-10-01 22:03:43 +03:00
Jussi Pakkanen d3b389f349 Add clang-tidy target. Closes #2383. 2019-10-01 22:02:51 +03:00
Jussi Pakkanen 5b422fce87 Make Python 2 tests optional(er) to prepare for py2 purge in Debian. 2019-10-01 21:12:04 +03:00
Xavier Claessens 058f89c2f2 Fix test_static_link() on MacOSX
test3-static was actually always using the shared library because that
warning was not fatal:
  WARNING: Static library 'func6' not found for dependency 'func6', may
  not be statically linked

The reason why the libfunc6.a wasn't found is because the prefix in the
generated pc file was not set to install dir.
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 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
Aleksey Gurtovoy 7dbabdc7b6 Correctly handle platform-specific LDFLAGS options 2019-09-27 00:57:21 +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
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
Daniel Mensinger 47bdea5040 mconf: Fix meson configure crash (fixes #5909) 2019-09-13 15:44:02 +03:00
Dylan Baker 3a011df4df unitests: dont assume cc exists or is valid
On illumos (and presumably Solaris, though I can't test) cc normally
points to Sun CC, which we don't support. So ensure that gcc is used
explicitly in that case.
2019-09-09 21:22:26 -07:00
David Seifert e19a49b895 Fix static archives stripping (#5905)
* Do not strip static archives

Stripping static archives without more fine-grained options (e.g. `-g`)
leads to failures such as

    ld: libfoo.a: error adding symbols: archive has no index; run ranlib to add one

because GNU strip removes *every* symbol in a static archive by default.
Given that static archives are not final build artifacts (unlike
executables and shared libraries), stripping them gains little and only
causes more edge case failures.

* Gentoo's portage only strips debug information:
  86f211e3a5/bin/estrip (L322)
* Fedora also only strips debug information:
  e9c13c6565/scripts/brp-strip-static-archive (L18)
* Debian also only does some very light stripping:
  72ed1d3261/dh_strip (L374)

Fixes #4138

* Add test case for static archive stripping
2019-09-08 19:48:57 -04:00
David Seifert c9042fc3ee Rename 'rpath-link secondary' unit test 2019-09-08 16:28:57 +03:00
David Seifert 7b9c348102 Add `-Wl,-rpath-link` for secondary dependencies 2019-09-06 22:16:16 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Dylan Baker 0efab591da compilers: Move the compiler argument to proxy linker flags to the compiler class
Instead of the DynamicLinker returning a hardcoded value like
`-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be
something '-Xlinker='

This makes a few things cleaner, and will make it possible to fix using
clang (not clang-cl) on windows, where it invokes either link.exe or
lld-link.exe instead of a gnu-ld compatible linker.
2019-08-30 00:01:32 +03:00
Jussi Pakkanen 3a04d325aa Fix packaging. [skip ci] 2019-08-26 20:23:35 +03:00
Dylan Baker 2bd85c614a unittests: Create a fake DynamicLinker when necessary 2019-08-14 13:13:23 -07:00