Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously, root-project options (key.subproject == '') would always be
stored as an augment or as pending_project_options. But they might actually
be included in self.options instead, so exclude them from the initial test.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This actually tests the handling of deprecated options
when passed to meson instead of just as default_options.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow proper handling of deprecated and read-only options, which is missing from
set_value.
Fixes: #14433
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The structure of the "if" statements in the cmd_line_options iteration
is a bit different from the others due to the need to raise an error
for some kinds of unknown options. Reduce the dissimilarity by
checking key.subproject is None just before raising the exception.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
if needed
Fixes communicating the RPATH to g-i-scanner in macOS.
See #14169
|
|
This was only being used by the introspection interpreter, which meant
the two interpreters had different behavior. They still do, which is
really bad because the IntrospectionInterpreter doesn't have the command
line options or project_default_options. I have a plan to fix that
later, and I don't want to spend time on it here, as it's not a
regression of this patch, it's just the status quo.
This also fixes an issue caused by dead code being left, and hit, due to
the option refactor branch.
Fixes: #14382
|
|
"prefix" has a lot of special handling that has to go on because so many
other options depend on prefix. It was also regressed by the option
refactor changes, so having a test feels appropriate.
This was verified against the 1.7 release, so it has the same behavior
as pre-option refactor Meson.
|
|
The key can be an OptionKey, particularly in the next patch.
|
|
Machine files provide a `Mapping[OptionKey, ElementaryOptionValues]`,
but the expectation listed was that they provided options in the raw DSL
format.
|
|
|
|
|
|
|
|
|
|
The latter is needed for vulkan.pc now, but let's add vulkan-headers
explicitly while at it.
|
|
Workaround for cmake-4.0 vs wxwidgets-gtk2 by setting CMAKE_POLICY_VERSION_MINIMUM=3.5.
|
|
See https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/BJO756KHSCBPDMXVGFMGPHPUMW4PZK6T/#SLVEVFEFOCT3R5RCSVZPQN3GZSZYAEXL.
Use sdl2-compat-devel instead. I did try 'pkgconfig(sdl2)' but it failed
with some resolver error I didn't probe further.
|
|
|
|
We document --wrapper and --wrap works only by expanding it automatically
to --wrapper as it is unambiguous.
|
|
Don't add "<project_source_dir>/<subproject>/__CMake_build" directory
to include directories.
Fixes #12351
|
|
Since dmd frontend version 2.111 integer debug and version statements
error during parsing:
https://dlang.org/changelog/2.111.0.html#dmd.deprecation-version-debug-number
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Because rustc does not support extract_objects, QEMU creates a static library
with all the C objects. It then passes this static library as link_whole,
together with another static library containing general purpose utility
functions which is passed as link_with.
However, this is brittle because the two have a circular dependency and
they cannot be merged because of the link_whole/link_with difference.
While lld seems to have the --start-group/--end-group semantics
automatically, ld.bfd can fail if these options are needed. This can
cause difference between distros depending on how Rust is packaged
(e.g. Ubuntu 22.04 and Debian bookworm seem to use ld.bfd).
The simplest solution is for Meson to implement "objects:" properly
for Rust. Then QEMU can use the same internal dependency objects that it
already has in place for C programs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow reusing it for Rust targets.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
This is required to resolve ambiguous LINK_LIBRARIES passed as bare
names.
|
|
This was broken twice, so check that it does not regress.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Move building the -std option to the new get_option_std_args method,
special casing CUDA to never include the option from the host compiler.
This fixes again #8523, which was broken by the option refactoring
(unsurprisingly, since the fix was ripped out unceremoniously without
a replacement).
Fixes: #14365
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow CUDA to completely override the -std arguments but not the rest.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The white text previously used (inadvertently) doesn't show up well
against the blue color used as the background for Note boxes.
|
|
Since the comment saying we need a generic way to do this is a little
outdated.
|
|
We already test for custom_targets and configure_file, but we should
test a generator too
|
|
This splits the scanner into two discrete steps, one that scans the
source files, and one that that reads in the dependency information and
produces a dyndep.
The scanner uses the JSON format from
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html,
which is the same format the MSVC and Clang use for C++ modules
scanning. This will allow us to more easily move to using MSVC and
clang-scan-deps when possible.
As an added bonus, this correctly tracks dependencies across TU and
Target boundaries, unlike the previous implementation, which assumed
that if it couldn't find a provider that everything was good, but could
run into issues. Because of that limitation Fortran code had to fully
depend on all of it's dependencies, transitive or not. Now, when using
the dep scanner, we can remove that restriction, allowing more
parallelism.
|
|
This requires that every Fortran target that uses modules have a full
dependency on the scan target of it's dependencies. This means that for
a three step target `A -> B -> C`, we cannot start compiling any of B
until all of A is linked, and cannot start compiling any of C until
all of A and B is linked.
This fixes various kinds of races, but it serializes the build and makes
it slow. This is the best we can do though, since we don't have any sort
of portable format for telling C what is in A and B, so C can't know
what sources to wait on for it's modules to be fulfilled.
|
|
It is not sufficient to have an order dependency on generated sources.
If any of those sources change we need to rescan, otherwise we may not
notice changes to modules.
|
|
Otherwise they won't be able to find their module outputs.
This requires a new method to look at dependencies, as the existing ones
wont find static libraries that were linked statically into previous
targets (this links with A which link_whole's B). We still need to have
B in that case because we need it's BMI outputs.
|
|
Because we use this dependency to ensure that any binary module files
are generated, we must have a full dependency. Otherwise, if a new
module is added to a dependent target, and used in our target, we race
the generation of the binary module definition.
|
|
Because we don't set the appropriate dependencies
|
|
|
|
But we really expect it to be a string once the initializer is done.
Therefore, let's set it to `''` just like we do with the scratchdir in
the case that it's set to None in the initializer.
|
|
Windows toolchains append `.exe` to executables. When cross-compiling on
Linux, attempting to run `./rusttest` will not execute the generated
`rusttest.exe`.
Fix this by always appending `.exe`, which is a valid filename on all
supported platforms. This is what the `CLikeCompiler` class does too.
While reviewing `rust.py`, there are opportunities for improvements and
better unification with the rest of the Meson code. However, this commit
focuses on fixing cross-compilation with minimal changes.
Fixes: #14374
|
|
|
|
sort_files has always defaulted to true.
Fixes: 2b37101998c8 ("meson format command")
|
|
--wrapper and --gdb are mutually exclusive per run(), so make get_wrapper
reflect this (which would've saved me some time earlier with trying to
make the two work together for something else, when it turns out that's
impossible).
As suggested by Eli.
|
|
We currently suggest that users run `meson test --wrapper valgrind`, but
this doesn't do what one might expect: Valgrind doesn't error out on
violations/issues it detects.
In the past, we had special handling for Valgrind in tests, see
1f76b76a84cb635f764ecbd2b77aaba1d375d72b but it was later dropped in
951262d7590343ffa9730666c427ad9d708a9fb6.
This is similar to what we do for {A,UB,M}SAN_OPTIONS to give sensible
behaviour that users expect out-of-the-box.
Only do this if we see 'valgrind' in the wrapper command to avoid
polluting logs. We may want to do that for the sanitizers variables
in future too.
Note that we're not adding --exit-on-first-error=yes here, as there
may be several issues in an application, or a test may be rather slow,
and so on. But --error-exitcode=1 to simply make Valgrind's exit status
reflect whether an error was found is uncontroversial.
Bug: https://github.com/mesonbuild/meson/issues/4727
Bug: https://github.com/mesonbuild/meson/issues/1105
Bug: https://github.com/mesonbuild/meson/issues/1175
Bug: https://github.com/mesonbuild/meson/issues/13745
|
|
When doing a host == build configuration. This allows us to remove the
ignore in check_unused_options, which was papering over this bug.
|
|
Because it makes machine files more generically useful (ie, you can use
a file as both a cross and native file) we allow all options to be
defined in native files, even when those options are not per machine. It
makes more sense to filter invalid options at Environment setup time
then to wait and have them filtered when the initializing the project
call.
|