This creates a new command line option to store pkg_config_path into,
and store the environment variable into that option. Currently this
works like the environment variable, for both cross and native targets.
Since sanity check now includes CFLAGS, the test fails earlier.
But if the compiler is ICC, it will only fail during the build proper as
before, since that's where where the flag making `-std=unknown` an error
not warning is used.
This patch creates an enum for selecting libtype as static, shared,
prefer-static, or prefer-shared. This also renames 'static-shared'
with 'prefer_static' and 'shared-static' with 'prefer_shared'. This is
just a refactor with no behavioral changes or user facing changes.
OpenBSD doesn't have any support for the compiler sanitizers yet.
While this may change in the future, better fix test suite run in "failfast"
mode for now. This can be revisited once (if) we get support in the future.
* clang 7.0.1
$ make CFLAGS=-fsanitize=address foo
cc -fsanitize=address -o foo foo.c
cc: error: unsupported option '-fsanitize=address' for target 'amd64-unknown-openbsd6.5'
* gcc 4.2.1
*** Error 1 in /tmp (<sys.mk>:85 'foo')
$ make CC=gcc CFLAGS=-fsanitize=address foo
gcc -fsanitize=address -o foo foo.c
cc1: error: unrecognized command line option "-fsanitize=address"
* gcc 8.2.0
$ make CC=egcc CFLAGS=-fsanitize=address foo
egcc -fsanitize=address -o foo foo.c
ld: error: unable to find library -lasan
collect2: error: ld returned 1 exit status
This provides an initial support for parsing TAP output. It detects failures
and skipped tests without relying on exit code, as well as early termination
of the test due to an error or a crash.
For now, subtests are not recorded in the TestRun object. However, because the
TAP output goes on stdout, it is printed by --print-errorlogs when a test does
not behave as expected. Handling subtests as TestRuns, and serializing them
to JSON, can be added later.
The parser was written specifically for Meson, and comes with its own
test suite.
Fixes#2923.
This makes the testsuite work better with other test runners, like
pytest. This is important because better test runners are very useful to
development (e.g. avoiding running succeeding tests again and again),
even if we want to still support 0 dependency testing of Meson though
keeping the default test runnner working.
This allows the person running configure (either a developer, user, or
distro maintainer) to keep a configuration of where various kinds of
files should end up.
Instead use coredata.compiler_options.<machine>. This brings the cross
and native code paths closer together, since both now use that.
Command line options are interpreted just as before, for backwards
compatibility. This does introduce some funny conditionals. In the
future, I'd like to change the interpretation of command line options so
- The logic is cross-agnostic, i.e. there are no conditions affected by
`is_cross_build()`.
- Compiler args for both the build and host machines can always be
controlled by the command line.
- Compiler args for both machines can always be controlled separately.
macOS provides the tool `lipo` to check the archs supported by an
object (executable, static library, dylib, etc). This is especially
useful for fat archives, but it also helps with thin archives.
Without this, the linker will fail to link to the library we mistakenly
'found' like so:
ld: warning: ignoring file /path/to/libfoo.a, missing required architecture armv7 in file /path/to/libfoo.a
Instead of only doing a naive filesystem search, also run the linker
so that it can tell us whether the -F path specified actually contains
the framework we're looking for.
Unfortunately, `extraframework` searching is still not 100% correct in
the case when since we want to search in either /Library/Frameworks or
in /System/Library/Frameworks but not in both. The -Z flag disables
searching in those prefixes and would in theory allow this, but then
you cannot force the linker to look in those by manually adding -F
args, so that doesn't work.