| Age | Commit message (Collapse) | Author |
|
The underlying Python implementation throws in this case, and I'm not
sure what the correct result here would be if we allowed it. Convert to
None and don't split? Split every character?
I've gone with throwing InvalidArguments, which maintains the current
behavior of "doesn't work" but with a nicer output. Any other change
would require a FeatureNew anyway, and can wait till 1.11.
Fixes: #15335
|
|
Attempting to use LTO on e.g. a procedural macro crate fails with
error: lto cannot be used for proc-macro crate type without -Zdylib-lto
Do not return -Clto for such crate types.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Include the real crate name, with "_" instead of "-" and without
the Meson-specific "+foo" suffix.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
I missed this in 9104bb616766bd9a05f0b2f280359463d32e227d as we were only
testing whitelisted languages for source file discovery.
Tests now handle all of these by using the map we have in compilers, as
we need to know the suffix to use for the invalid source files we inject.
Note that for tests, we mix explicit --lang in some cases and not others,
which we could probably do better with. For these 'must fail' tests, I've
stuck with explicit `--lang` to make sure we're testing what we want,
but the others are perhaps up for debate.
Bug: https://github.com/mesonbuild/meson/issues/15286
|
|
* In 1.7.1, the behaviour of --executable was to just ignore it.
* After my recent 9104bb616766bd9a05f0b2f280359463d32e227d, the behaviour
was that we'd require, for --executable xyz, xyz.c to exist or we'd
fail to generate.
Neither are good! Instead, create the sample source file w/ the project
name, but call the executable whatever the user passed with `--executable`.
Bug: https://github.com/mesonbuild/meson/issues/15286
|
|
Allows version selector to open the correct IDE.
|
|
This reverts commit 632115ecff3bd7f9cb519098e04e0467b0cfd3a1.
|
|
That's how it is done in the other two places and without that one
argument too many is passed to the filter function:
```
[...]
File "/usr/lib/python3.14/site-packages/mesonbuild/wrap/wrap.py", line 607, in _get_file
shutil.unpack_archive(path, extract_dir)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/shutil.py", line 1432, in unpack_archive
func(filename, extract_dir, **kwargs)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/shutil.py", line 1349, in _unpack_tarfile
tarobj.extractall(extract_dir, filter=filter)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/tarfile.py", line 2409, in extractall
tarinfo, unfiltered = self._get_extract_tarinfo(
~~~~~~~~~~~~~~~~~~~~~~~~~^
member, filter_function, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.14/tarfile.py", line 2496, in _get_extract_tarinfo
filtered = filter_function(unfiltered, path)
TypeError: fully_trusted_filter() takes 2 positional arguments but 3 were given
```
|
|
|
|
|
|
This can come in handy for instance when a custom target creates both
headers and sources. Slicing the output of a `to_list()` call provides
convenient access to just the headers or just the sources.
|
|
|
|
This is safer than parsing env from stdout
|
|
Add error checks for cases in which the write target is unknown
and ensure all error cases indeed abort the execution to avoid
internal crash.
Resolves #13502.
Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
|
|
|
|
This adds support for DEF files to rust and removes
some hasattr duck typing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
.def files are a linker concept, and they should not be shoehorned
into the Compiler.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Respect collected sources for `meson init` as well as --executable. This
regressed in 9f0ac314ba0c54cc18c2499845324efc14c1849e (part of
https://github.com/mesonbuild/meson/pull/14086, it's easier to see how with
the whole PR).
Also, add subtests (distinguishing between empty directories and those with some
file(s) within). We already had some of these but they weren't marked
as such.
Test `meson init` with a broken source file in the source directory as
we should fail with that, not ignore the file.
It's easier to test with a broken file than a working one as we can assert
the build should fail, it'll pass with just the 1 example file we generate.
Closes: https://github.com/mesonbuild/meson/issues/15286
|
|
|
|
|
|
The reason it is a string array is that this allows us to add more
values than true/false should it be needed. For an example see
`b_lto`.
|
|
Global objects are treated as UnknownValue(), but unlike other variables
their object is created on every call to get_cur_value_if_defined()
instead of coming from a dictionary. This causes the dataflow DAG
to have multiple objects from the same object. Fix this by building
the UnknownValues at interpreter construction time.
Fixes: #15261
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This adds a second stage initialization, which allows us to use options
for setting attributes on the compiler. This is called during the detect
phase, so the Compiler is never used in a partially initialized state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLikeCompiler._get_basic_compiler_args
|
|
|
|
|
|
It's not used outside of the compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compiler.symbols_have_underscore_prefix
|
|
|
|
|
|
|
|
|
|
|
|
|