diff options
| author | Gurchetan Singh <gurchetansingh@google.com> | 2024-12-16 17:01:47 -0800 |
|---|---|---|
| committer | Marge Bot <marge-bot@fdo.invalid> | 2025-06-17 22:28:54 +0000 |
| commit | 043d503f9db37536fdff4dd240bda5c7738314eb (patch) | |
| tree | 5aeb697f247adf04e6d848b78481a25f356a9576 /subprojects | |
| parent | e04026addebb009030889b46852a1a1144dbed31 (diff) | |
subprojects: add rustix
Version 0.38.31 available:
- AOSP
- Fedora (https://bodhi.fedoraproject.org/updates/?packages=rust-rustix)
- Debian (https://tracker.debian.org/pkg/rust-rustix)
Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
Diffstat (limited to 'subprojects')
| -rw-r--r-- | subprojects/packagefiles/rustix/meson.build | 44 | ||||
| -rw-r--r-- | subprojects/rustix.wrap | 6 |
2 files changed, 50 insertions, 0 deletions
diff --git a/subprojects/packagefiles/rustix/meson.build b/subprojects/packagefiles/rustix/meson.build new file mode 100644 index 00000000000..9239c9c1038 --- /dev/null +++ b/subprojects/packagefiles/rustix/meson.build @@ -0,0 +1,44 @@ +# Copyright © 2025 Google +# SPDX-License-Identifier: MIT + +project( + 'rustix', + 'rust', + version : '0.38.31', + license : 'Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT', +) + +errno = subproject('errno').get_variable('lib') +libc = subproject('libc').get_variable('lib') +linux_raw_sys = subproject('linux-raw-sys').get_variable('lib') +bitflags = subproject('bitflags').get_variable('lib') + +rustix_args = [] +if host_machine.system() == 'linux' or host_machine.system() == 'android' + rustix_args += [ + '--cfg', 'linux_raw', + '--cfg', 'linux_kernel', + '--cfg', 'feature="std"', + '--cfg', 'feature="alloc"', + '--cfg', 'feature="event"', + '--cfg', 'feature="fs"', + '--cfg', 'feature="mm"', + '--cfg', 'feature="net"', + '--cfg', 'feature="param"', + '--cfg', 'feature="pipe"', +] +endif + +lib = static_library( + 'rustix', + 'src/lib.rs', + override_options : ['rust_std=2021', 'build.rust_std=2021'], + link_with : [errno, libc, linux_raw_sys, bitflags], + rust_abi : 'rust', + native : true, + rust_args: rustix_args, +) + +dep_rustix = declare_dependency( + link_with : [lib, errno, libc, linux_raw_sys, bitflags] +) diff --git a/subprojects/rustix.wrap b/subprojects/rustix.wrap new file mode 100644 index 00000000000..7c5086d1d0e --- /dev/null +++ b/subprojects/rustix.wrap @@ -0,0 +1,6 @@ +[wrap-file] +directory = rustix-0.38.31 +source_url = https://crates.io/api/v1/crates/rustix/0.38.31/download +source_filename = rustix-0.38.31.tar.gz +source_hash = 6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949 +patch_directory = rustix |