To make Fortran tests useful on Windows, the library_type should default to static,
unless needed to specifically test shared. Shared Fortran libs on Windows for
non-Gfortran compilers is fragile requiring proprietary code syntax.
* 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
The job is taking too long and timing out, use pytest-xdist to speed
up unit tests. Speeds it up on my system from 20 min to 8 min.
Still much slower than native windows: vs2017-x64 takes 3.5 min with
pytest-xdist.
Run docker with seccomp:unconfined, since otherwise we're blocked from
calling CreateToolhelp32Snapshot() inside the cross-mingw tests,
specifically `common/122 shared module`.
There are two problems, one is that it assumes -flto is the argument
to do LTO/WPO, which isn't true of ICC and MSVC (and presumably)
others. It's also incorrect because it assumes that the compiler and
linker will always be the same, which isn't necessarily true. You
could combine GCC with Apple's linker, or clang with link.exe, which
use different arguments.
I started out just annotating, but realized there is a lot of really
silly duplication of methods in this module. Nearly all of the methods
return [], but each class implemented the same methods over and over!
I've fixed this by moving the default implementation down into the
`StaticLinker` class, and then overriding as necessary in the derived
classes.
This is used in a lot of places, having a single way to reference it is
convenient. It's placed under a typing.TYPE_CHECKING guard to mimimize
runtime impact