| Age | Commit message (Collapse) | Author |
|
Add a clippy-json target to the ninja script.
This is useful for rust-analyzer, which requires an "external check
command" to function when not using cargo.
This also changes the --emit option in the clippy script to "emit",
without this, clippy will fail with errors about missing
libraries. These would normally be created with the normal compilation
target, but we can't rely on that, because if it fails, clippy-json
never runs, and you won't get error messages to the LSP.
|
|
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
|
|
|
|
|
|
|
|
There now exists a Windows Vulkan SDK for ARM64, and the latest Vulkan
SDKs for x64 Windows also provides ARM64 libraries and binaries for
cross-builds (and vice-versa).
So, now we have the following in the Vulkan SDKs:
* Bin-ARM64 and Lib-ARM64 in x64 Windows SDKs that contains ARM64
Vulkan binaries and libraries.
* Bin-X64 and Lib-X64 in ARM64 Windows SDKs that contains x64 Vulkan
binaries and libraries
* SDKs after 1.4.x (or so) no longer ships 32-bit Windows binaries and
libraries.
This updates the Vulkan detection logic to account for these differences
so that the correct library is picked up upon linking on Windows,
especially when cross-compiling ARM64 binaries on x64 Windows, and vice
versa, while maintaining compatibility with native and 32-bit builds.
|
|
Current behaviour is to loop over 'sys_args' list which contains both
included and ignored compiler arguments.
This could produce unexpected results when argument is both ignored and
deduplicated.
With the following changes, 'cleaned_sys_args' is used to ensure only
included args are deduplicated.
Example:
CFLAGS (or 'c_args' as Meson option) has '-I${includedir} -L${libdir}'
and LDFLAGS ('c_link_args') has '-L${libdir}'.
Given CFLAGS value is wrong: -L entry belongs to LDFLAGS and thus should
not be included in compiler argument list.
Since we have -L in 'sys_args' list this entry will not be included as
linker flag too!
This is definitely not our goal: wrong entry should just be ignored.
Some debug prints from Meson:
C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib']
LINKER_ARGS: ['-L/opt/x64-compile/lib']
RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64']
RESULT_LDARGS: []
(this is captured during compiler.find_library() call)
And this is what we see after applying patch:
C_ARGS: ['-I/opt/x64-compile/include', '-L/opt/x64-compile/lib']
LINKER_ARGS: ['-L/opt/x64-compile/lib']
RESULT_CARGS: ['-I/opt/x64-compile/include', '-D_FILE_OFFSET_BITS=64']
RESULT_LDARGS: ['-L/opt/x64-compile/lib']
|
|
If qt.compile_moc dependencies contain targets.
The generated build does not exibit this dependency ie it is possible
that the dependency build is run concurrently with MOC.
Tell the generator that the MOC calls depends on targets in dependencies to
be generated.
|
|
|
|
|
|
This avoids creating a dictionary every time an arithmetic operator
is evaluated.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Tuples are inefficient, require the ability to use hash table lookup
via either a frozenset or a dictionary.
This also allows using accept_any with COMPARISON_MAP.
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Identifiers are more common than strings, check against 'id'
first.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Match single-character tokens a separate dictionary lookup.
As pointed out by dcbaker, this is even faster than str.index
and gives the syntax error check for free (via KeyError).
It also enables splitting the special-case "if" in two parts, one
for long tokens and one for short tokens, thus providing further
speedup.
This shaves about 2/3rds of the time spent in lex().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Many crates that have a build.rs will usually require an overlay
with the translated meson/meson.build file. To avoid having to
create a .wrap file, when parsing Cargo.lock autodetect a directory
in subproject/packagefiles/ and add it as the patch_directory.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: 6c88d9992192379511c4777c526786cbacf06167
Fixes: d3542ff690d0be723cfd3ebfaaac99290517837f
Fixes: ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Even thought 12.8 and 12.9 do. So don't add then when we have 13
|
|
Currently, you can call `meson.get_compiler('c')`, if you haven't
initialized 'c' for your project, but a super-project has initialized
it. This happens because we check the wrong set of compilers (the global
list vs the per-subproject one).
Because of how fragile this is, we can mark it as broken an move on.
|
|
This includes adding Blackwell support, as well as the deprecation of
many older architectures in 12.9 and 13.0
|
|
There is currently no Windows versions for 13.0.x
I've marked with comments versions where a new release has the same
version as the previous release. This should help reduce the number of
list iterations, but also make easier to keep this list up to date.
|
|
This makes use of a small class to simplify the implementation
|
|
Rustdoc does not yet support the --env-set parameter, change the
environment directly instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Filtering out this flag causes the rustdoc script to fail when
building docs for proc-macro crates.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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.
|
|
|