[packages/meson] use new orig_for_machine in rust proc-macro patch; rel 3
atler
atler at pld-linux.org
Wed Dec 2 18:19:14 CET 2026
commit c750d465a36f7ea0cb99f74f2c265df5d3f9c22c
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Dec 2 17:52:28 2026 +0100
use new orig_for_machine in rust proc-macro patch; rel 3
orig_for_machine is what for_machine used to be. currently targets for
build machine are remapped to be for host machine if no
cross-compilation is used:
machine map:
https://github.com/mesonbuild/meson/blob/1.12.1/mesonbuild/environment.py#L156-L159
remapping logic used in build_target():
https://github.com/mesonbuild/meson/blob/1.12.1/mesonbuild/interpreter/interpreter.py#L387-L398
overriding machine map so that build machine always means build machine
and host machine means host machine is not an option because it magically
enforces cross build now and shit starts to flow all over the place then:
https://github.com/mesonbuild/meson/blob/1.12.1/mesonbuild/environment.py#L468-L469
meson.spec | 2 +-
rust-proc-macro-filter-out-target.patch | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.spec b/meson.spec
index 924688c..e88de3e 100644
--- a/meson.spec
+++ b/meson.spec
@@ -2,7 +2,7 @@ Summary: High productivity build system
Summary(pl.UTF-8): System budowania o dużej produktywności
Name: meson
Version: 1.12.1
-Release: 2
+Release: 3
License: Apache v2.0
Group: Development/Tools
#Source0Download: https://github.com/mesonbuild/meson/releases/
diff --git a/rust-proc-macro-filter-out-target.patch b/rust-proc-macro-filter-out-target.patch
index a76b8ef..07521fb 100644
--- a/rust-proc-macro-filter-out-target.patch
+++ b/rust-proc-macro-filter-out-target.patch
@@ -29,7 +29,7 @@ diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
priv_dir = self.get_target_private_dir(lt)
commands += compiler.get_include_args(priv_dir, False)
+ # filter out --target arguments for host only proc-macro crate
-+ if compiler.language == 'rust' and (hasattr(target, 'for_machine') and target.for_machine == MachineChoice.BUILD or hasattr(target, 'rust_crate_type') and target.rust_crate_type == 'proc-macro'):
++ if compiler.language == 'rust' and hasattr(target, 'orig_for_machine') and target.orig_for_machine == MachineChoice.BUILD:
+ target_commands = []
+ target_arg = False
+ for (i, v) in enumerate(commands):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/meson.git/commitdiff/c750d465a36f7ea0cb99f74f2c265df5d3f9c22c
More information about the pld-cvs-commit
mailing list