These options often don't exist for the build machine, as they're
generally invalid (ie, prefix, libdir, etc). So we should always check
for their existance as host optiuons, since all we want to know in this
case is if the option is yeilding (valid per-subproject), and build/vs
host doesn't matter in that cases:
Fixes#8613
Instead of treating native files as always being for the build machine,
and then copying them to the host machine, treat them as for the build
machine only when a cross file is also present
They are supposed to have different behavior. The environment variables
apply to both the compiler and linker when the compiler acts as a
linker, but the command line ones do not.
Fixes#8345
If a test program forks a child, the pipes might remain open and
"await stdo_task"/"await stde_task" will never complete in
SingleTestRunner._run_cmd().
Instead, catch them in TestSubprocess.wait() so that the whole
process group is killed.
Fixes: #8533
Reported-by: Bastien Nocera <hadess@hadess.net>
This fix issue when using --wipe and the machine file was passed as a
pipe and written locally, or when the file was resolved in XDG_DATA_HOME
or XDG_DATA_DIRS.
Fixes: #8560
get_non_matching_default_options is checking a string from
project_default_options against a validated value from
coredata.options.
Passing the string to validate_value ensures that the comparison
is sound; otherwise, "false" might be compared against False
and a bogus difference is printed.
When reverting from 0.57 to 0.56, one can see an error like this:
File /Users/pm215/src/qemu-for-merges/meson/mesonbuild/coredata.py,
line 1016, in load
obj = pickle.load(f)
ModuleNotFoundError: No module named 'mesonbuild.mesonlib.universal';
'mesonbuild.mesonlib' is not a package
FAILED: build.ninja
The reason is that the old version fails to resolve mesonbuild.mesonlib,
which is a similar situation to the existing AttributeError check. Raise
a MesonException for ModuleNotFoundError as well, so that reconfiguration
proceeds using cmd_line.txt.
Previously builds would *potentially* get sammed with messaging at
configure time that duplicate entries in an array would be an error in
the future, and the cause was because the same entries were getting
added over and over to pkg_config_path.p
In commit caab4d3d, the uid and gid arguments passed to os.chown() by
set_chown() were accidentally swapped, causing files to end up with
incorrect owner/group if the owner and group are not the same.
Also update the documentation to better indicate which argument to
install_mode is which.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Reusing the runners for multiple repeats of the test run gets in the
way of the progress report, which stores runners in an OrderedSet.
Instead, create a separate SingleTestRunner object for each repeat.
While at it, fix the "duplicate suite" assertion as it can fire
with TAP tests and --repeat=N.
Fixes: #8405
The way the tracking is currently done it works if no new subprojects
are added to a configured build directory. For cases where we want to
add a new subproject, it fails because we don't initialize builtins for
that subproject. This corrects that by checking to see if the subproject
already exists, and if it doesn't initializes the bultins for it.
Fixes: #8421
Enables -Db_sanitize=undefined and company.
Also serves as a testcase for NVCC comma-shielding: Because the test-
case declares `b_sanitize=address,undefined`, the host GCC compiler
needs `-fsanitize=address,undefined`, but this stands a danger of being
split by NVCC when wrapped with `-Xcompiler=args,args`. Special,
already-existing comma-shielding codepaths activate to prevent this
splitting.
Closes#8394.
Some time between 0.56 and 0.57 the TAP parser broke when a test exits
with a nonzero status.
The TAP protocol does not specify this behaviour - giving latitude to
implementers, and meson's previous behaviour was to report the exit
status gracefully.
This patch restores the old behaviour and adds a regression test
Currently we don't handle things correctly if we get a string we should
split, and the linker and needs compiler arguments. It would result in
two unsplit strings in a list, instead of the split arguments in a list
Fixes: #8348
This did work previously, so we need to let it continue working. I'm
proposing removing it in 0.60 because the correct solution has always
worked.
I've also been a bit more defensive here, and made setting
`subproject:opt = foo` in the machine files an error, as we have
`[subproject:built-in options]` or `[subproject:project options]` for
that.
os.path.relpath(f, wd) returns path with \ seperator on Windows, but ninja
targets always uses / separator.
See for example https://gitlab.freedesktop.org/ocrete/libnice/-/jobs/7348274.
Analyzed-by: Xavier Claessens <xavier.claessens@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Clang has a hand `-Wunused-command-line-argument` switch, which when
turned to an error, gets very grump about `-flto-jobs=0` being set in
the compiler arguments (although `-flto=` belongs there). We'll refactor
a bit to put that only in the link arguments.
GCC doesn't have this probably because, a) it doesn't have an equivalent
warning, and b) it uses `-flto=<$numthreads.
Fixes: #8347
This is a) useless because it's only used to print which options are not
default, and b) harmful because it can result in cases where things
break, like in projects that set a standard that the chosen compiler
doesn't support, but the project (or some subset) can be built with a
different standard.
Fixes: #8360
run_target() does some variable substitutions since 0.57.0. This is a
new behavior, and undocumented, caused by sharing more code with
custom_target(). More consistency is better, so document it now.
custom_target() was doing variable substitution in the past, because it
shared some code with generator(), but that was undocumented. Some
refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@,
@SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back
@CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@
because it is duplicate with @SOURCE_ROOT@ that has a better name. Also
do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and
not @BUILD_ROOT@ surprisingly, adding to the confusion.