* 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
* intel-cl tests: more rigorous detection of intent to use Intel Windows compilers
* fortran coarray test: make skipping more robust in that underlying MPI stack is .run()
This is useful for any Fortran coarray work, and especially for intel-cl where multiple Intel compiler
versions are often installed, and the wrong underlying MPI library may be dynamically linked,
and so a runtime check is needed to exercise the MPI stack underlying Fortran coarray.
This is done by
fc.run('sync all; end', dependencies: coarray)
* pep8
the fact that foo and bar are not directories makes Apple's ld upset, and with
fatal warnings it dies on this test. Using real directories makes it happy.
'if_true' sources should be built with their dependencies, as
illustrated by test case change.
Ideally, I think we would want only the files with the dependencies to
be built with the flags, but that would probably change the way
sourceset are used.
At configure time, kconfig can read from configure_file().
"test cases/kconfig/4 load_config builddir/meson.build" was already
showing a workaround, now it actually can take configure_file input
directly.
* PGI C++ PCH enable
PGI compilers support precompiled headers for C++ only.
The common/13 pch test passes if run manually with no spaces in the build path.
However, since Meson run_project_tests.py makes temporary build directories
with spaces in each tests, PGI --pch_dir can't handle this and fails.
So we skip the test for PGI despite it working for usual case with no-spaces
in build dir.
Note: it's fine to have spaces in full path for sourcedir, just no spaces in
relative path to builddir.
* doc
* gtkdoc: Add 'check' kwarg
This runs gtkdoc-check in meson tests.
Also reorganize the gtkdoc test because we cannot reliably build
multiple doc into the same directory. Not all files generated by gtk-doc
are prefixed with the target name.
The Windows CI runs with codepage 1252, which is basically ISO-8859-1 and does not
have a mapping for character U+0151 (ő). It is currently passing because of a
happy accident, as the generator command line is emitted in UTF-8 anyway
(starting at commit 6089631a, "Open build files with utf-8", 2018-04-17, which
however lacks documentation or history) and file.py treats it as two
single-byte characters.
When going through meson_exe, however, Windows passes a genuine Unicode
character via CreateProcessW and file.py fails to decode it, so we need to
pass errors='replace' when opening the output file.
On Windows, the test is then fixed. On POSIX systems it is _still_ passing as
a happy accident because (according to the current locale) the output file
contains two single-byte characters rather than the single Unicode character
"ő"; in fact, if one modifies the ninja backend to use force_serialize=True,
meson_exe fails to build the command line for file.py and stops with a
UnicodeEncodeError.