Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package meson for openSUSE:Factory checked 
in at 2026-01-22 15:11:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/meson (Old)
 and      /work/SRC/openSUSE:Factory/.meson.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "meson"

Thu Jan 22 15:11:44 2026 rev:137 rq:1328047 version:1.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/meson/meson.changes      2025-12-31 
10:45:59.194942827 +0100
+++ /work/SRC/openSUSE:Factory/.meson.new.1928/meson.changes    2026-01-22 
15:11:47.800288517 +0100
@@ -1,0 +2,15 @@
+Mon Jan 19 07:23:47 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Update to version 1.10.1:
+  + rust: use the linker exe for the linker and not the rustc command list
+  + compilers/detect: Update the build machine information for ASM
+  + gnome: look up g-ir-scanner as a host tool
+  + compilers: add link always args if CompileCheckMode.LINK
+  + compilers: clike: Deduplicate compile and link args from actually used arg 
list
+  + compilers: Error out on unknown files in compiler checks for MSVC
+  + options: canonicalize to host options anything that is not per-machine
+  + coredata: lookup options for the correct machine
+  + interpreter: listify the values when a dict is passed for the env kwarg
+  + cmake: Fix version kwarg being added to static_library targets
+
+-------------------------------------------------------------------

Old:
----
  meson-1.10.0.tar.gz
  meson-1.10.0.tar.gz.asc

New:
----
  meson-1.10.1.tar.gz
  meson-1.10.1.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ meson.spec ++++++
--- /var/tmp/diff_new_pack.v8VRa9/_old  2026-01-22 15:11:48.564320275 +0100
+++ /var/tmp/diff_new_pack.v8VRa9/_new  2026-01-22 15:11:48.564320275 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package meson
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 # Copyright (c) 2024 Andreas Stieger <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -35,7 +35,7 @@
 %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
 %bcond_without  mono
 Name:           meson%{name_ext}
-Version:        1.10.0
+Version:        1.10.1
 Release:        0
 Summary:        Python-based build system
 License:        Apache-2.0

++++++ meson-1.10.0.tar.gz -> meson-1.10.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/PKG-INFO new/meson-1.10.1/PKG-INFO
--- old/meson-1.10.0/PKG-INFO   2025-12-08 17:48:54.516362400 +0100
+++ new/meson-1.10.1/PKG-INFO   2026-01-18 14:06:48.262324300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: meson
-Version: 1.10.0
+Version: 1.10.1
 Summary: A high performance build system
 Home-page: https://mesonbuild.com
 Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/man/meson.1 new/meson-1.10.1/man/meson.1
--- old/meson-1.10.0/man/meson.1        2025-12-08 17:48:52.000000000 +0100
+++ new/meson-1.10.1/man/meson.1        2026-01-18 14:06:46.000000000 +0100
@@ -1,4 +1,4 @@
-.TH MESON "1" "December 2025" "meson 1.10.0" "User Commands"
+.TH MESON "1" "January 2026" "meson 1.10.1" "User Commands"
 .SH NAME
 meson - a high productivity build system
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/meson.egg-info/PKG-INFO 
new/meson-1.10.1/meson.egg-info/PKG-INFO
--- old/meson-1.10.0/meson.egg-info/PKG-INFO    2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/meson.egg-info/PKG-INFO    2026-01-18 14:06:47.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: meson
-Version: 1.10.0
+Version: 1.10.1
 Summary: A high performance build system
 Home-page: https://mesonbuild.com
 Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/meson.egg-info/SOURCES.txt 
new/meson-1.10.1/meson.egg-info/SOURCES.txt
--- old/meson-1.10.0/meson.egg-info/SOURCES.txt 2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/meson.egg-info/SOURCES.txt 2026-01-18 14:06:47.000000000 
+0100
@@ -1645,6 +1645,11 @@
 test cases/common/285 atomic/meson.build
 test cases/common/286 importstd/meson.build
 test cases/common/286 importstd/useistd.cpp
+test cases/common/288 multiple provides/meson.build
+test cases/common/288 multiple provides/subprojects/test.wrap
+test cases/common/288 multiple provides/subprojects/libfoobar/meson.build
+test cases/common/288 multiple provides/subprojects/subproject/meson.build
+test cases/common/288 multiple 
provides/subprojects/subproject/subprojects/test-subproject.wrap
 test cases/common/29 compiler id/meson.build
 test cases/common/3 static/lib3.c
 test cases/common/3 static/libfile.c
@@ -3989,6 +3994,7 @@
 test cases/unit/131 vala internal glib/meson.build
 test cases/unit/131 vala internal glib/meson.options
 test cases/unit/132 custom target index test/meson.build
+test cases/unit/133 nasm language only/meson.build
 test cases/unit/14 testsetup selection/main.c
 test cases/unit/14 testsetup selection/meson.build
 test cases/unit/14 testsetup selection/subprojects/bar/bar.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/backend/backends.py 
new/meson-1.10.1/mesonbuild/backend/backends.py
--- old/meson-1.10.0/mesonbuild/backend/backends.py     2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/backend/backends.py     2026-01-18 
14:06:46.000000000 +0100
@@ -494,7 +494,7 @@
         for obj in objects:
             if isinstance(obj, str):
                 o = os.path.join(proj_dir_to_build_root,
-                                 self.build_to_src, target.get_builddir(), obj)
+                                 self.build_to_src, target.get_subdir(), obj)
                 obj_list.append(o)
             elif isinstance(obj, mesonlib.File):
                 if obj.is_built:
@@ -1458,9 +1458,9 @@
                     deps.append(i.rel_to_builddir(self.build_to_src))
             else:
                 if absolute_paths:
-                    
deps.append(os.path.join(self.environment.get_source_dir(), target.subdir, i))
+                    
deps.append(os.path.join(self.environment.get_source_dir(), 
target.get_subdir(), i))
                 else:
-                    deps.append(os.path.join(self.build_to_src, target.subdir, 
i))
+                    deps.append(os.path.join(self.build_to_src, 
target.get_subdir(), i))
         return deps
 
     def get_custom_target_output_dir(self, target: build.AnyTargetType) -> str:
@@ -1540,7 +1540,7 @@
                 if '@BUILD_ROOT@' in i:
                     i = i.replace('@BUILD_ROOT@', build_root)
                 if '@CURRENT_SOURCE_DIR@' in i:
-                    i = i.replace('@CURRENT_SOURCE_DIR@', 
os.path.join(source_root, target.subdir))
+                    i = i.replace('@CURRENT_SOURCE_DIR@', 
os.path.join(source_root, target.get_subdir()))
                 if '@DEPFILE@' in i:
                     if target.depfile is None:
                         msg = f'Custom target {target.name!r} has @DEPFILE@ 
but no depfile ' \
@@ -1601,7 +1601,7 @@
         if target.default_env:
             env.set('MESON_SOURCE_ROOT', [self.environment.get_source_dir()])
             env.set('MESON_BUILD_ROOT', [self.environment.get_build_dir()])
-            env.set('MESON_SUBDIR', [target.subdir])
+            env.set('MESON_SUBDIR', [target.get_subdir()])
             env.set('MESONINTROSPECT', [self.get_introspect_command()])
         return env
 
@@ -1938,7 +1938,7 @@
                 elif isinstance(j, str):
                     source_list += [os.path.join(self.source_dir, j)]
                 elif isinstance(j, (build.CustomTarget, build.BuildTarget)):
-                    source_list += [os.path.join(self.build_dir, 
j.get_subdir(), o) for o in j.get_outputs()]
+                    source_list += [os.path.join(self.build_dir, 
j.get_builddir(), o) for o in j.get_outputs()]
             source_list = [os.path.normpath(s) for s in source_list]
 
             compiler: T.List[str] = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/backend/ninjabackend.py 
new/meson-1.10.1/mesonbuild/backend/ninjabackend.py
--- old/meson-1.10.0/mesonbuild/backend/ninjabackend.py 2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/backend/ninjabackend.py 2026-01-18 
14:06:46.000000000 +0100
@@ -1866,7 +1866,7 @@
                 if isinstance(gen, GeneratedList):
                     ssrc = os.path.join(self.get_target_private_dir(target), 
ssrc)
                 else:
-                    ssrc = os.path.join(gen.get_subdir(), ssrc)
+                    ssrc = os.path.join(gen.get_builddir(), ssrc)
                 if ssrc.endswith('.pyx'):
                     output = os.path.join(self.get_target_private_dir(target), 
f'{ssrc}.{ext}')
                     element = NinjaBuildElement(
@@ -1879,7 +1879,7 @@
                     # TODO: introspection?
                     cython_sources.append(output)
                 else:
-                    generated_sources[ssrc] = 
mesonlib.File.from_built_file(gen.get_subdir(), ssrc)
+                    generated_sources[ssrc] = 
mesonlib.File.from_built_file(gen.get_builddir(), ssrc)
                     # Following logic in L883-900 where we determine whether 
to add generated source
                     # as a header(order-only) dep to the .so compilation rule
                     if not compilers.is_source(ssrc) and \
@@ -2001,7 +2001,7 @@
                     else:
                         for h in g.get_outputs():
                             if h.endswith('.rs'):
-                                main_rust_file = os.path.join(g.get_subdir(), 
h)
+                                main_rust_file = 
os.path.join(g.get_builddir(), h)
                                 break
                     if main_rust_file is not None:
                         break
@@ -2025,7 +2025,7 @@
                 if isinstance(g, GeneratedList):
                     fname = os.path.join(self.get_target_private_dir(target), 
i)
                 else:
-                    fname = os.path.join(g.get_subdir(), i)
+                    fname = os.path.join(g.get_builddir(), i)
                 if main_rust_file is None and fname.endswith('.rs'):
                     main_rust_file = fname
                 orderdeps.append(fname)
@@ -3415,10 +3415,10 @@
         if pch[1] is None:
             # Auto generate PCH.
             source = self.create_msvc_pch_implementation(target, 
compiler.get_language(), pch[0])
-            pch_header_dir = os.path.dirname(os.path.join(self.build_to_src, 
target.get_source_subdir(), header))
+            pch_header_dir = os.path.dirname(os.path.join(self.build_to_src, 
target.get_subdir(), header))
             commands += compiler.get_include_args(pch_header_dir, False)
         else:
-            source = os.path.join(self.build_to_src, 
target.get_source_subdir(), pch[1])
+            source = os.path.join(self.build_to_src, target.get_subdir(), 
pch[1])
 
         just_name = os.path.basename(header)
         (objname, pch_args) = compiler.gen_pch_args(just_name, source, dst)
@@ -3459,16 +3459,16 @@
             compiler: Compiler = target.compilers[lang]
             if compiler.get_argument_syntax() == 'msvc':
                 (commands, dep, dst, objs, src) = 
self.generate_msvc_pch_command(target, compiler, pch)
-                extradep = os.path.join(self.build_to_src, 
target.get_source_subdir(), pch[0])
+                extradep = os.path.join(self.build_to_src, 
target.get_subdir(), pch[0])
             elif compiler.id == 'intel':
                 # Intel generates on target generation
                 continue
             elif 'mwcc' in compiler.id:
-                src = os.path.join(self.build_to_src, 
target.get_source_subdir(), pch[0])
+                src = os.path.join(self.build_to_src, target.get_subdir(), 
pch[0])
                 (commands, dep, dst, objs) = 
self.generate_mwcc_pch_command(target, compiler, pch[0])
                 extradep = None
             else:
-                src = os.path.join(self.build_to_src, 
target.get_source_subdir(), pch[0])
+                src = os.path.join(self.build_to_src, target.get_subdir(), 
pch[0])
                 (commands, dep, dst, objs) = 
self.generate_gcc_pch_command(target, compiler, pch[0])
                 extradep = None
             pch_objects += objs
@@ -4062,6 +4062,11 @@
                         t.get_outputs()[0] = 
linker.get_archive_name(t.get_outputs()[0])
                 targetlist.append(os.path.join(self.get_target_dir(t), 
t.get_outputs()[0]))
 
+                # Add an import library if shared library in OS/2 for build all
+                if isinstance(t, build.SharedLibrary):
+                    if self.environment.machines[t.for_machine].is_os2():
+                        targetlist.append(os.path.join(self.get_target_dir(t), 
t.import_filename))
+
             elem = NinjaBuildElement(self.all_outputs, targ, 'phony', 
targetlist)
             self.add_build(elem)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/backend/vs2010backend.py 
new/meson-1.10.1/mesonbuild/backend/vs2010backend.py
--- old/meson-1.10.0/mesonbuild/backend/vs2010backend.py        2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/backend/vs2010backend.py        2026-01-18 
14:06:46.000000000 +0100
@@ -1787,7 +1787,7 @@
                         self.add_additional_options(lang, inc_cl, file_args)
                         self.add_preprocessor_defines(lang, inc_cl, 
file_defines)
                         self.add_include_dirs(lang, inc_cl, file_inc_dirs)
-                        s = File.from_built_file(target.get_subdir(), s)
+                        s = File.from_built_file(target.get_builddir(), s)
                         ET.SubElement(inc_cl, 'ObjectFileName').text = 
"$(IntDir)" + \
                             self.object_filename_from_source(target, compiler, 
s)
             for lang, headers in pch_sources.items():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/backend/xcodebackend.py 
new/meson-1.10.1/mesonbuild/backend/xcodebackend.py
--- old/meson-1.10.0/mesonbuild/backend/xcodebackend.py 2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/backend/xcodebackend.py 2026-01-18 
14:06:46.000000000 +0100
@@ -1813,7 +1813,7 @@
             settings_dict.add_item('GCC_SYMBOLS_PRIVATE_EXTERN', 'NO')
             unquoted_headers = [self.get_target_private_dir_abs(target)]
             if target.implicit_include_directories:
-                
unquoted_headers.append(os.path.join(self.environment.get_build_dir(), 
target.get_subdir()))
+                
unquoted_headers.append(os.path.join(self.environment.get_build_dir(), 
target.get_builddir()))
                 
unquoted_headers.append(os.path.join(self.environment.get_source_dir(), 
target.get_subdir()))
             unquoted_headers += headerdirs
             settings_dict.add_item('HEADER_SEARCH_PATHS', 
self.normalize_header_search_paths(unquoted_headers))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/build.py 
new/meson-1.10.1/mesonbuild/build.py
--- old/meson-1.10.0/mesonbuild/build.py        2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/build.py        2026-01-18 14:06:46.000000000 
+0100
@@ -1130,7 +1130,7 @@
                 self.link_depends.append(s)
             elif isinstance(s, str):
                 self.link_depends.append(
-                    File.from_source_file(self.environment.source_dir, 
self.subdir, s))
+                    File.from_source_file(self.environment.source_dir, 
self.get_subdir(), s))
             else:
                 self.link_depends.append(s)
 
@@ -1242,7 +1242,7 @@
         result: OrderedSet[str] = OrderedSet()
         for i in self.link_targets:
             if not isinstance(i, StaticLibrary):
-                result.add(i.get_subdir())
+                result.add(i.get_builddir())
             result.update(i.get_link_dep_subdirs())
         return result
 
@@ -1402,9 +1402,6 @@
         for t in self.link_whole_targets:
             t.get_dependencies_recurse(result, include_internals, 
include_proc_macros)
 
-    def get_source_subdir(self):
-        return self.subdir
-
     def get_sources(self) -> T.List[File]:
         return self.sources
 
@@ -1793,7 +1790,7 @@
             self.vs_module_defs = path
         else:
             # When passing output of a Custom Target
-            self.vs_module_defs = File.from_built_file(path.get_subdir(), 
path.get_filename())
+            self.vs_module_defs = File.from_built_file(path.get_builddir(), 
path.get_filename())
         self.process_link_depends([path])
 
     def extract_targets_as_list(self, kwargs: BuildTargetKeywordArguments, 
key: T.Literal['link_with', 'link_whole']) -> T.List[LibTypes]:
@@ -2038,7 +2035,7 @@
         for e in files:
             if isinstance(e, (CustomTarget, CustomTargetIndex)):
                 output.depends.add(e)
-                fs = [File.from_built_file(e.get_subdir(), f) for f in 
e.get_outputs()]
+                fs = [File.from_built_file(e.get_builddir(), f) for f in 
e.get_outputs()]
             elif isinstance(e, GeneratedList):
                 if preserve_path_from:
                     raise InvalidArguments("generator.process: 
'preserve_path_from' is not allowed if one input is a 'generated_list'.")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/cmake/interpreter.py 
new/meson-1.10.1/mesonbuild/cmake/interpreter.py
--- old/meson-1.10.0/mesonbuild/cmake/interpreter.py    2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/cmake/interpreter.py    2026-01-18 
14:06:46.000000000 +0100
@@ -1182,11 +1182,12 @@
                 'objects': [method(x, 'extract_all_objects') for x in 
objec_libs],
             }
 
-            # Only set version if we know it
-            if tgt.version:
-                tgt_kwargs['version'] = tgt.version
-            if tgt.soversion:
-                tgt_kwargs['soversion'] = tgt.soversion
+            # Only set version if we know it and this is not a static lib
+            if tgt_func != 'static_library':
+                if tgt.version:
+                    tgt_kwargs['version'] = tgt.version
+                if tgt.soversion:
+                    tgt_kwargs['soversion'] = tgt.soversion
 
             # Only set if installed and only override if it is set
             if install_tgt and tgt.install_dir:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/compilers/asm.py 
new/meson-1.10.1/mesonbuild/compilers/asm.py
--- old/meson-1.10.0/mesonbuild/compilers/asm.py        2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/compilers/asm.py        2026-01-18 
14:06:46.000000000 +0100
@@ -79,6 +79,14 @@
         elif self.info.is_darwin():
             plat = 'macho'
             define = 'MACHO'
+        elif self.info.is_os2():
+            cpu = ''
+            if 
self.environment.coredata.optstore.get_value_for(OptionKey('os2_emxomf')):
+                plat = 'obj2'
+                define = 'OBJ2'
+            else:
+                plat = 'aout'
+                define = 'AOUT'
         else:
             plat = 'elf'
             define = 'ELF'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/compilers/compilers.py 
new/meson-1.10.1/mesonbuild/compilers/compilers.py
--- old/meson-1.10.0/mesonbuild/compilers/compilers.py  2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/compilers/compilers.py  2026-01-18 
14:06:46.000000000 +0100
@@ -69,6 +69,10 @@
     'masm': ('masm',),
     'linearasm': ('sa',),
 }
+# Some compilers only recognize files with specific suffixes.
+compiler_suffixes: T.Mapping[str, T.Tuple[str, ...]] = {
+    'msvc': ('c', 'cxx', 'cpp', 'obj', 'lib', 'def'),
+}
 all_languages = lang_suffixes.keys()
 c_cpp_suffixes = {'h'}
 cpp_suffixes = set(lang_suffixes['cpp']) | c_cpp_suffixes
@@ -613,7 +617,7 @@
         return self.linker.get_accepts_rsp()
 
     def get_linker_always_args(self) -> T.List[str]:
-        return self.linker.get_always_args()
+        return self.linker.get_always_args() if self.linker else []
 
     def get_linker_lib_prefix(self) -> str:
         return self.linker.get_lib_prefix()
@@ -815,6 +819,7 @@
             args += self.get_preprocess_only_args()
         else:
             assert mode is CompileCheckMode.LINK
+            args += self.get_linker_always_args()
         return args
 
     def compiler_args(self, args: T.Optional[T.Iterable[str]] = None) -> 
CompilerArgs:
@@ -850,6 +855,16 @@
                 srcname = code.fname
                 code_debug = f'Source file: {srcname}'
 
+            compiler_id = self.get_id()
+            suffixes = compiler_suffixes.get(compiler_id)
+            if suffixes:
+                suffix = os.path.splitext(srcname)[1]
+                if suffix and suffix[1:] not in suffixes:
+                    err = f'Unrecognized filename suffix for "{srcname}", will 
be ignored by {compiler_id}'
+                    mlog.error(err)
+                    yield CompileResult('', err, [], 1, srcname)
+                    return
+
             # Construct the compiler command-line
             commands = self.compiler_args()
             commands.append(srcname)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/compilers/detect.py 
new/meson-1.10.1/mesonbuild/compilers/detect.py
--- old/meson-1.10.0/mesonbuild/compilers/detect.py     2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/compilers/detect.py     2026-01-18 
14:06:46.000000000 +0100
@@ -8,7 +8,7 @@
     search_version, is_windows, Popen_safe, Popen_safe_logged, 
version_compare, windows_proof_rm,
 )
 from ..programs import ExternalProgram
-from ..envconfig import BinaryTable, detect_cpu_family, detect_machine_info
+from ..envconfig import BinaryTable, detect_cpu_family
 from .. import mlog
 
 from ..linkers import guess_win_linker, guess_nix_linker
@@ -701,7 +701,7 @@
         cls = CudaCompiler
         env.add_lang_args(cls.language, cls, for_machine)
         key = OptionKey('cuda_link_args', machine=for_machine)
-        if env.is_cross_build(for_machine):
+        if not env.is_cross_build(for_machine):
             key = key.as_host()
         if key in env.options:
             # To fix LDFLAGS issue
@@ -1148,7 +1148,7 @@
                         exelist=cc.linker.exelist, version=cc.linker.version,
                         **extra_args)  # type: ignore
                 else:
-                    linker = type(cc.linker)(compiler, env, for_machine, 
cc.LINKER_PREFIX,
+                    linker = type(cc.linker)(cc.linker.exelist, env, 
for_machine, cc.LINKER_PREFIX,
                                              always_args=always_args, 
system=cc.linker.system,
                                              version=cc.linker.version, 
**extra_args)
             elif 'link' in override[0]:
@@ -1329,6 +1329,8 @@
 
     # We need a C compiler to properly detect the machine info and linker
     cc = detect_c_compiler(env, for_machine)
+    if not env.is_cross_build(for_machine):
+        env.update_build_machine({'c': cc})
 
     popen_exceptions: T.Dict[str, Exception] = {}
     for comp in compilers:
@@ -1369,9 +1371,9 @@
     # We need a C compiler to properly detect the machine info and linker
     cc = detect_c_compiler(env, for_machine)
     if not env.is_cross_build(for_machine):
-        info = detect_machine_info({'c': cc})
-    else:
-        info = env.machines[for_machine]
+        env.update_build_machine({'c': cc})
+
+    info = env.machines[for_machine]
 
     from .asm import MasmCompiler, MasmARMCompiler
     comp_class: T.Type[ASMCompiler]
@@ -1411,6 +1413,8 @@
     comp_class: T.Type[ASMCompiler] = TILinearAsmCompiler
     arg = '-h'
     cc = detect_c_compiler(env, for_machine)
+    if not env.is_cross_build(for_machine):
+        env.update_build_machine({'c': cc})
 
     popen_exceptions: T.Dict[str, Exception] = {}
     try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/compilers/mixins/clike.py 
new/meson-1.10.1/mesonbuild/compilers/mixins/clike.py
--- old/meson-1.10.0/mesonbuild/compilers/mixins/clike.py       2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/compilers/mixins/clike.py       2026-01-18 
14:06:46.000000000 +0100
@@ -385,7 +385,7 @@
             sys_ld_args = 
self.environment.coredata.get_external_link_args(self.for_machine, 
self.language)
             # CFLAGS and CXXFLAGS go to both linking and compiling, but we 
want them
             # to only appear on the command line once. Remove dupes.
-            largs += [x for x in sys_ld_args if x not in sys_args]
+            largs += [x for x in sys_ld_args if x not in cleaned_sys_args]
 
         cargs += self.get_compiler_args_for_mode(mode)
         return cargs, largs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/compilers/mixins/gnu.py 
new/meson-1.10.1/mesonbuild/compilers/mixins/gnu.py
--- old/meson-1.10.0/mesonbuild/compilers/mixins/gnu.py 2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/compilers/mixins/gnu.py 2026-01-18 
14:06:46.000000000 +0100
@@ -658,7 +658,7 @@
 
     def get_always_args(self) -> T.List[str]:
         args: T.List[str] = []
-        if self.info.is_os2() and self.get_linker_id() == 'emxomfld':
+        if self.info.is_os2() and 
self.environment.coredata.optstore.get_value_for(OptionKey('os2_emxomf')):
             args += ['-Zomf']
         return super().get_always_args() + args
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/coredata.py 
new/meson-1.10.1/mesonbuild/coredata.py
--- old/meson-1.10.0/mesonbuild/coredata.py     2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/coredata.py     2026-01-18 14:06:46.000000000 
+0100
@@ -44,7 +44,7 @@
 #
 # Pip requires that RCs are named like this: '0.1.0.rc1'
 # But the corresponding Git tag needs to be '0.1.0rc1'
-version = '1.10.0'
+version = '1.10.1'
 
 # The next stable version when we are in dev. This is used to allow projects to
 # require meson version >=1.2.0 when using 1.1.99. FeatureNew won't warn when
@@ -351,6 +351,8 @@
             # key and target have the same subproject for consistency.
             # Now just do this to get things going.
             newkey = newkey.evolve(subproject=target.subproject)
+        if self.is_cross_build():
+            newkey = newkey.evolve(machine=target.for_machine)
         option_object, value = self.optstore.get_option_and_value_for(newkey)
         override = target.get_override(newkey.name)
         if override is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/environment.py 
new/meson-1.10.1/mesonbuild/environment.py
--- old/meson-1.10.0/mesonbuild/environment.py  2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/environment.py  2026-01-18 14:06:46.000000000 
+0100
@@ -613,3 +613,14 @@
             # This is how autotools works, and the env vars feature is for
             # autotools compatibility.
             largs.extend_value(comp_options)
+
+    def update_build_machine(self, compilers: T.Optional[T.Dict[str, 
Compiler]] = None) -> None:
+        """Redetect the build machine and update the machine definitions
+
+        :compilers: An optional dictionary of compilers to use instead of the 
coredata dict.
+        """
+        compilers = compilers or self.coredata.compilers.build
+
+        machines = self.machines.miss_defaulting()
+        machines.build = detect_machine_info(compilers)
+        self.machines = machines.default_missing()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/interpreter/interpreter.py 
new/meson-1.10.1/mesonbuild/interpreter/interpreter.py
--- old/meson-1.10.0/mesonbuild/interpreter/interpreter.py      2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/interpreter/interpreter.py      2026-01-18 
14:06:46.000000000 +0100
@@ -309,12 +309,7 @@
         # Re-initialize machine descriptions. We can do a better job now 
because we
         # have the compilers needed to gain more knowledge, so wipe out old
         # inference and start over.
-        machines = self.build.environment.machines.miss_defaulting()
-        machines.build = 
envconfig.detect_machine_info(self.coredata.compilers.build)
-        self.build.environment.machines = machines.default_missing()
-        assert self.build.environment.machines.build.cpu is not None
-        assert self.build.environment.machines.host.cpu is not None
-        assert self.build.environment.machines.target.cpu is not None
+        self.build.environment.update_build_machine()
 
         self.builtin['build_machine'] = \
             OBJ.MachineHolder(self.build.environment.machines.build, self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/interpreter/type_checking.py 
new/meson-1.10.1/mesonbuild/interpreter/type_checking.py
--- old/meson-1.10.0/mesonbuild/interpreter/type_checking.py    2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/interpreter/type_checking.py    2026-01-18 
14:06:46.000000000 +0100
@@ -249,7 +249,7 @@
     elif isinstance(value, list):
         return EnvironmentVariables(dict(split_equal_string(v) for v in 
listify(value)), init_method, separator)
     elif isinstance(value, dict):
-        return EnvironmentVariables(value, init_method, separator)
+        return EnvironmentVariables({k: listify(dv) for k, dv in 
value.items()}, init_method, separator)
     elif value is None:
         return EnvironmentVariables()
     return value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/mintro.py 
new/meson-1.10.1/mesonbuild/mintro.py
--- old/meson-1.10.0/mesonbuild/mintro.py       2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/mintro.py       2026-01-18 14:06:46.000000000 
+0100
@@ -228,12 +228,12 @@
         if not isinstance(target, build.Target):
             raise RuntimeError('The target object in `builddata.get_targets()` 
is not of type `build.Target`. Please file a bug with this error message.')
 
-        outdir = get_target_dir(builddata.environment.coredata, target.subdir)
+        outdir = get_target_dir(builddata.environment.coredata, 
target.get_builddir())
         t = {
             'name': target.get_basename(),
             'id': idname,
             'type': target.get_typename(),
-            'defined_in': os.path.normpath(os.path.join(src_dir, 
target.subdir, environment.build_filename)),
+            'defined_in': os.path.normpath(os.path.join(src_dir, 
target.get_subdir(), environment.build_filename)),
             'filename': [os.path.join(build_dir, outdir, x) for x in 
target.get_outputs()],
             'build_by_default': target.build_by_default,
             'target_sources': backend.get_introspection_data(idname, target),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/modules/__init__.py 
new/meson-1.10.1/mesonbuild/modules/__init__.py
--- old/meson-1.10.0/mesonbuild/modules/__init__.py     2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/modules/__init__.py     2026-01-18 
14:06:46.000000000 +0100
@@ -82,7 +82,7 @@
                                                    wanted=wanted, 
silent=silent, for_machine=for_machine)
 
     def find_tool(self, name: str, depname: str, varname: str, required: bool 
= True,
-                  wanted: T.Optional[str] = None) -> 
T.Union[build.OverrideExecutable, ExternalProgram, 'OverrideProgram']:
+                  wanted: T.Optional[str] = None, native: bool = True) -> 
T.Union[build.OverrideExecutable, ExternalProgram, 'OverrideProgram']:
         # Look in overrides in case it's built as subproject
         progobj = self._interpreter.program_from_overrides([name], [])
         if progobj is not None:
@@ -94,7 +94,7 @@
             return ExternalProgram.from_entry(name, prog_list)
 
         # Check if pkgconfig has a variable
-        dep = self.dependency(depname, native=True, required=False, 
wanted=wanted)
+        dep = self.dependency(depname, native=native, required=False, 
wanted=wanted)
         if dep.found() and dep.type_name == 'pkgconfig':
             value = dep.get_variable(pkgconfig=varname)
             if value:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/modules/gnome.py 
new/meson-1.10.1/mesonbuild/modules/gnome.py
--- old/meson-1.10.0/mesonbuild/modules/gnome.py        2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/modules/gnome.py        2026-01-18 
14:06:46.000000000 +0100
@@ -322,7 +322,7 @@
         }
         depname = tool_map[tool]
         varname = tool.replace('-', '_')
-        return state.find_tool(tool, depname, varname)
+        return state.find_tool(tool, depname, varname, native=depname != 
"gobject-introspection-1.0")
 
     @typed_kwargs(
         'gnome.post_install',
@@ -829,8 +829,8 @@
             if isinstance(inc, str):
                 ret += [f'--include={inc}']
             elif isinstance(inc, GirTarget):
-                gir_inc_dirs 
.append(os.path.join(state.environment.get_build_dir(), inc.get_subdir()))
-                
ret.append(f"--include-uninstalled={os.path.join(inc.get_subdir(), 
inc.get_basename())}")
+                gir_inc_dirs 
.append(os.path.join(state.environment.get_build_dir(), inc.get_builddir()))
+                
ret.append(f"--include-uninstalled={os.path.join(inc.get_builddir(), 
inc.get_basename())}")
                 depends.append(inc)
 
         return ret, gir_inc_dirs, depends
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/modules/i18n.py 
new/meson-1.10.1/mesonbuild/modules/i18n.py
--- old/meson-1.10.0/mesonbuild/modules/i18n.py 2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/modules/i18n.py 2026-01-18 14:06:46.000000000 
+0100
@@ -485,7 +485,7 @@
 
         mo_fnames = []
         for target in mo_targets:
-            mo_fnames.append(path.join(target.get_subdir(), 
target.get_outputs()[0]))
+            mo_fnames.append(path.join(target.get_builddir(), 
target.get_outputs()[0]))
 
         command: T.List[T.Union[str, build.BuildTargetTypes, ExternalProgram, 
mesonlib.File]] = []
         command.extend(state.environment.get_build_command())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/options.py 
new/meson-1.10.1/mesonbuild/options.py
--- old/meson-1.10.0/mesonbuild/options.py      2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/options.py      2026-01-18 14:06:46.000000000 
+0100
@@ -289,15 +289,21 @@
 
     def as_root(self) -> OptionKey:
         """Convenience method for key.evolve(subproject='')."""
-        return self.evolve(subproject='')
+        if self.subproject != '':
+            return self.evolve(subproject='')
+        return self
 
     def as_build(self) -> OptionKey:
         """Convenience method for key.evolve(machine=MachineChoice.BUILD)."""
-        return self.evolve(machine=MachineChoice.BUILD)
+        if self.machine != MachineChoice.BUILD:
+            return self.evolve(machine=MachineChoice.BUILD)
+        return self
 
     def as_host(self) -> OptionKey:
         """Convenience method for key.evolve(machine=MachineChoice.HOST)."""
-        return self.evolve(machine=MachineChoice.HOST)
+        if self.machine != MachineChoice.HOST:
+            return self.evolve(machine=MachineChoice.HOST)
+        return self
 
     def has_module_prefix(self) -> bool:
         return '.' in self.name
@@ -835,7 +841,7 @@
         #
         # I did not do this yet, because it would make this MR even
         # more massive than it already is. Later then.
-        if not self.is_cross and key.machine == MachineChoice.BUILD:
+        if not (self.is_cross and self.is_per_machine_option(key)):
             key = key.as_host()
         return key
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/scripts/symbolextractor.py 
new/meson-1.10.1/mesonbuild/scripts/symbolextractor.py
--- old/meson-1.10.0/mesonbuild/scripts/symbolextractor.py      2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/scripts/symbolextractor.py      2026-01-18 
14:06:46.000000000 +0100
@@ -264,6 +264,25 @@
     result += symbols
     write_if_changed('\n'.join(result) + '\n', outfilename)
 
+def os2_syms(impfilename: str, outfilename: str) -> None:
+    # Get a list of all symbols exported with the name of the library
+    all_stderr = ''
+    # First try nm.exe for aout .a
+    output, e = call_tool_nowarn(get_tool('nm') + ['-P', impfilename])
+    if output:
+        result = [x for x in output.split('\n') if ' E ' in x]
+        write_if_changed('\n'.join(result) + '\n', outfilename)
+        return
+    all_stderr += e
+    # Next try listomf.exe for omf .lib
+    output, e = call_tool_nowarn(get_tool('listomf') + ['-d', impfilename])
+    if output:
+        result = [x for x in output.split('\n') if ' IMPDEF ' in x]
+        write_if_changed('\n'.join(result) + '\n', outfilename)
+        return
+    all_stderr += e
+    print_tool_warning(['nm', 'listomf'], 'do not work or were not found', 
all_stderr)
+
 def gen_symbols(libfilename: str, impfilename: str, outfilename: str, 
cross_host: str) -> None:
     if cross_host is not None:
         # In case of cross builds just always relink. In theory we could
@@ -273,7 +292,7 @@
             windows_syms(impfilename, outfilename)
         else:
             dummy_syms(outfilename)
-    elif mesonlib.is_linux() or mesonlib.is_hurd():
+    elif mesonlib.is_linux() or mesonlib.is_hurd() or mesonlib.is_haiku():
         gnu_syms(libfilename, outfilename)
     elif mesonlib.is_osx():
         osx_syms(libfilename, outfilename)
@@ -299,6 +318,13 @@
             dummy_syms(outfilename)
     elif mesonlib.is_sunos():
         solaris_syms(libfilename, outfilename)
+    elif mesonlib.is_os2():
+        if os.path.isfile(impfilename):
+            os2_syms(impfilename, outfilename)
+        else:
+            # No import library. Not sure how the DLL is being used, so just
+            # rebuild everything that links to it every time.
+            dummy_syms(outfilename)
     else:
         if not os.path.exists(TOOL_WARNING_FILE):
             mlog.warning('Symbol extracting has not been implemented for this '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/templates/sampleimpl.py 
new/meson-1.10.1/mesonbuild/templates/sampleimpl.py
--- old/meson-1.10.0/mesonbuild/templates/sampleimpl.py 2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/templates/sampleimpl.py 2026-01-18 
14:06:46.000000000 +0100
@@ -133,7 +133,7 @@
 
     def __init__(self, args: Arguments):
         super().__init__(args)
-        self.sources = args.srcfiles if args.srcfiles else 
[Path(f'{self.name}.{self.source_ext}')]
+        self.sources = args.srcfiles if args.srcfiles else 
[Path(f'{self.lowercase_token}.{self.source_ext}')]
 
     def create_executable(self) -> None:
         source_name = f'{self.lowercase_token}.{self.source_ext}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/utils/platform.py 
new/meson-1.10.1/mesonbuild/utils/platform.py
--- old/meson-1.10.0/mesonbuild/utils/platform.py       2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/mesonbuild/utils/platform.py       2026-01-18 
14:06:46.000000000 +0100
@@ -23,7 +23,7 @@
 
 class DirectoryLockBase:
 
-    lockfile: T.TextIO
+    lockfile: T.Optional[T.TextIO] = None
 
     def __init__(self, directory: str, lockfile: str, action: 
DirectoryLockAction, err: str,
                  optional: bool = False) -> None:
@@ -54,6 +54,7 @@
             except OSError:
                 if self.action == DirectoryLockAction.IGNORE or self.optional:
                     return
+                raise
 
             try:
                 mode = msvcrt.LK_LOCK
@@ -89,6 +90,7 @@
             except OSError:
                 if self.action == DirectoryLockAction.IGNORE or self.optional:
                     return
+                raise
 
             try:
                 flags = fcntl.LOCK_EX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/mesonbuild/wrap/wrap.py 
new/meson-1.10.1/mesonbuild/wrap/wrap.py
--- old/meson-1.10.0/mesonbuild/wrap/wrap.py    2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/mesonbuild/wrap/wrap.py    2026-01-18 14:06:46.000000000 
+0100
@@ -419,19 +419,21 @@
             self.add_wrap(wrap)
         self.loaded_dirs.add(self.subdir)
 
-    def add_wrap(self, wrap: PackageDefinition) -> None:
+    def add_wrap(self, wrap: PackageDefinition, ignore_dups: bool = False) -> 
None:
         for k in wrap.provided_deps.keys():
-            if k in self.provided_deps:
+            if k not in self.provided_deps:
+                self.provided_deps[k] = wrap
+            elif not ignore_dups:
                 prev_wrap = self.provided_deps[k]
                 m = f'Multiple wrap files provide {k!r} dependency: 
{wrap.name} and {prev_wrap.name}'
                 raise WrapException(m)
-            self.provided_deps[k] = wrap
         for k in wrap.provided_programs:
-            if k in self.provided_programs:
+            if k not in self.provided_programs:
+                self.provided_programs[k] = wrap
+            elif not ignore_dups:
                 prev_wrap = self.provided_programs[k]
                 m = f'Multiple wrap files provide {k!r} program: {wrap.name} 
and {prev_wrap.name}'
                 raise WrapException(m)
-            self.provided_programs[k] = wrap
 
     def load_wrapdb(self) -> None:
         try:
@@ -474,7 +476,9 @@
                 del self.provided_deps[v.directory.lower()]
             if k not in self.wraps:
                 self.wraps[k] = v
-                self.add_wrap(v)
+                # it's fine if a dependency or program is provided by a wrap
+                # from *another* project (including the superproject).
+                self.add_wrap(v, ignore_dups=True)
 
     def load_and_merge(self, subdir: str, subproject: SubProject) -> None:
         if self.wrap_mode != WrapMode.nopromote and subdir not in 
self.loaded_dirs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/cmake/2 
advanced/subprojects/cmMod/CMakeLists.txt" "new/meson-1.10.1/test cases/cmake/2 
advanced/subprojects/cmMod/CMakeLists.txt"
--- "old/meson-1.10.0/test cases/cmake/2 
advanced/subprojects/cmMod/CMakeLists.txt"     2025-12-08 17:48:52.000000000 
+0100
+++ "new/meson-1.10.1/test cases/cmake/2 
advanced/subprojects/cmMod/CMakeLists.txt"     2026-01-18 14:06:46.000000000 
+0100
@@ -12,6 +12,7 @@
 
 add_library(cmModLib       SHARED lib/cmMod.cpp)
 add_library(cmModLibStatic STATIC lib/cmMod.cpp)
+set_target_properties(cmModLibStatic PROPERTIES SOVERSION 1)
 include(GenerateExportHeader)
 generate_export_header(cmModLib)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/288 multiple 
provides/meson.build" "new/meson-1.10.1/test cases/common/288 multiple 
provides/meson.build"
--- "old/meson-1.10.0/test cases/common/288 multiple provides/meson.build"      
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/288 multiple provides/meson.build"      
2026-01-18 14:06:46.000000000 +0100
@@ -0,0 +1,3 @@
+project('wraptest')
+
+subproject('subproject')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/libfoobar/meson.build" "new/meson-1.10.1/test 
cases/common/288 multiple provides/subprojects/libfoobar/meson.build"
--- "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/libfoobar/meson.build"        1970-01-01 
01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/288 multiple 
provides/subprojects/libfoobar/meson.build"        2026-01-18 
14:06:46.000000000 +0100
@@ -0,0 +1,3 @@
+project('foobar')
+
+foobar_dep = declare_dependency()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/subproject/meson.build" "new/meson-1.10.1/test 
cases/common/288 multiple provides/subprojects/subproject/meson.build"
--- "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/subproject/meson.build"       1970-01-01 
01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/288 multiple 
provides/subprojects/subproject/meson.build"       2026-01-18 
14:06:46.000000000 +0100
@@ -0,0 +1,3 @@
+project('subproject')
+
+dependency('foobar')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/subproject/subprojects/test-subproject.wrap" 
"new/meson-1.10.1/test cases/common/288 multiple 
provides/subprojects/subproject/subprojects/test-subproject.wrap"
--- "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/subproject/subprojects/test-subproject.wrap"  1970-01-01 
01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/288 multiple 
provides/subprojects/subproject/subprojects/test-subproject.wrap"  2026-01-18 
14:06:46.000000000 +0100
@@ -0,0 +1,7 @@
+[wrap-file]
+directory = libfoobar
+source_filename = foobar-1.0.tar.gz
+
+[provide]
+dependency_names=foobar
+foobar=foobar_dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/test.wrap" "new/meson-1.10.1/test cases/common/288 
multiple provides/subprojects/test.wrap"
--- "old/meson-1.10.0/test cases/common/288 multiple 
provides/subprojects/test.wrap"    1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/288 multiple 
provides/subprojects/test.wrap"    2026-01-18 14:06:46.000000000 +0100
@@ -0,0 +1,7 @@
+[wrap-file]
+directory = libfoobar
+source_filename = foobar-1.0.tar.gz
+
+[provide]
+dependency_names=foobar
+foobar=foobar_dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/common/50 custom target 
chain/meson.build" "new/meson-1.10.1/test cases/common/50 custom target 
chain/meson.build"
--- "old/meson-1.10.0/test cases/common/50 custom target chain/meson.build"     
2025-12-08 17:48:52.000000000 +0100
+++ "new/meson-1.10.1/test cases/common/50 custom target chain/meson.build"     
2026-01-18 14:06:46.000000000 +0100
@@ -14,6 +14,7 @@
 mytarget = custom_target('bindat',
   output : 'data.dat',
   command : [python, comp, infile, '@OUTPUT@'],
+  env: {'SOME_ENV_VAR': ['garbage', ['in', 'garbage', 'out']]},
 )
 
 mytarget2 = custom_target('bindat2',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-1.10.0/test cases/unit/133 nasm language 
only/meson.build" "new/meson-1.10.1/test cases/unit/133 nasm language 
only/meson.build"
--- "old/meson-1.10.0/test cases/unit/133 nasm language only/meson.build"       
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-1.10.1/test cases/unit/133 nasm language only/meson.build"       
2026-01-18 14:06:46.000000000 +0100
@@ -0,0 +1,6 @@
+project(
+  'nasm only',
+  'nasm',
+  license : 'MIT',
+  meson_version : '>= 1.10',
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/unittests/optiontests.py 
new/meson-1.10.1/unittests/optiontests.py
--- old/meson-1.10.0/unittests/optiontests.py   2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/unittests/optiontests.py   2026-01-18 14:06:46.000000000 
+0100
@@ -495,3 +495,44 @@
         child_key = OptionKey(name, subproject_name)
         optstore.add_project_option(child_key, child_option)
         self.assertTrue(optstore.options[child_key].yielding)
+
+    def test_machine_canonicalization_cross(self):
+        """Test that BUILD machine options are handled correctly in cross 
compilation."""
+        optstore = OptionStore(True)
+
+        # Test that BUILD machine per-machine option is NOT canonicalized to 
HOST
+        host_pkg_config = OptionKey('pkg_config_path', 
machine=MachineChoice.HOST)
+        build_pkg_config = OptionKey('pkg_config_path', 
machine=MachineChoice.BUILD)
+        host_option_obj = UserStringArrayOption('pkg_config_path', 'Host 
pkg-config paths', ['/mingw/lib64/pkgconfig'])
+        build_option_obj = UserStringArrayOption('pkg_config_path', 'Build 
pkg-config paths', ['/usr/lib64/pkgconfig'])
+        optstore.add_system_option(host_pkg_config, host_option_obj)
+        optstore.add_system_option(build_pkg_config, build_option_obj)
+        option, value = optstore.get_option_and_value_for(build_pkg_config)
+        self.assertEqual(value, ['/usr/lib64/pkgconfig'])
+
+        # Test that non-per-machine BUILD option IS canonicalized to HOST
+        build_opt = OptionKey('optimization', machine=MachineChoice.BUILD)
+        host_opt = OptionKey('optimization', machine=MachineChoice.HOST)
+        common_option_obj = UserComboOption('optimization', 'Optimization 
level', '0',
+                                            choices=['plain', '0', 'g', '1', 
'2', '3', 's'])
+        optstore.add_system_option(host_opt, common_option_obj)
+        self.assertEqual(optstore.get_value_for(build_opt), '0')
+
+    def test_machine_canonicalization_native(self):
+        """Test that BUILD machine options are canonicalized to HOST when not 
cross compiling."""
+        optstore = OptionStore(False)
+
+        host_pkg_config = OptionKey('pkg_config_path', 
machine=MachineChoice.HOST)
+        build_pkg_config = OptionKey('pkg_config_path', 
machine=MachineChoice.BUILD)
+        host_option_obj = UserStringArrayOption('pkg_config_path', 'Host 
pkg-config paths', ['/mingw/lib64/pkgconfig'])
+        build_option_obj = UserStringArrayOption('pkg_config_path', 'Build 
pkg-config paths', ['/usr/lib64/pkgconfig'])
+
+        # Add per-machine option for HOST only (BUILD will be canonicalized)
+        optstore.add_system_option(host_pkg_config, host_option_obj)
+        option, value = optstore.get_option_and_value_for(build_pkg_config)
+        self.assertEqual(value, ['/mingw/lib64/pkgconfig'])
+
+        # Try again adding build option too, for completeness
+        optstore.add_system_option(build_pkg_config, build_option_obj)
+        option, value = optstore.get_option_and_value_for(build_pkg_config)
+        self.assertEqual(value, ['/mingw/lib64/pkgconfig'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/unittests/platformagnostictests.py 
new/meson-1.10.1/unittests/platformagnostictests.py
--- old/meson-1.10.0/unittests/platformagnostictests.py 2025-12-08 
17:48:52.000000000 +0100
+++ new/meson-1.10.1/unittests/platformagnostictests.py 2026-01-18 
14:06:46.000000000 +0100
@@ -565,3 +565,18 @@
         """Mixing unity and unity_size as long and short options should 
work."""
         testdir = self.copy_srcdir(os.path.join(self.common_test_dir, '1 
trivial'))
         self.init(testdir, extra_args=['-Dunity=on', '--unity-size=123'])
+
+    def test_readonly_sourcedir(self) -> None:
+        """Test building with read-only source directory."""
+        testdir = self.copy_srcdir(os.path.join(self.common_test_dir, '233 
wrap case'))
+
+        # Make the source directory and all its contents read-only recursively
+        # Keep execute permission on directories
+        for dir, _, files in os.walk(testdir):
+            os.chmod(dir, 0o555)
+            for file in files:
+                filepath = os.path.join(dir, file)
+                os.chmod(filepath, 0o444)
+
+        self.init(testdir)
+        self.build()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-1.10.0/unittests/rewritetests.py 
new/meson-1.10.1/unittests/rewritetests.py
--- old/meson-1.10.0/unittests/rewritetests.py  2025-12-08 17:48:52.000000000 
+0100
+++ new/meson-1.10.1/unittests/rewritetests.py  2026-01-18 14:06:46.000000000 
+0100
@@ -8,14 +8,17 @@
 from pathlib import Path
 import shutil
 import unittest
+import typing as T
 
 from mesonbuild.ast import IntrospectionInterpreter, AstIDGenerator
 from mesonbuild.ast.printer import RawPrinter
-from mesonbuild.mesonlib import windows_proof_rmtree
+from mesonbuild.mesonlib import windows_proof_rmtree, is_windows, is_linux
+
 from .baseplatformtests import BasePlatformTests
+from .helpers import skip_if_not_language
 
 class RewriterTests(BasePlatformTests):
-    def setUp(self):
+    def setUp(self) -> None:
         super().setUp()
         self.maxDiff = None
 
@@ -24,7 +27,7 @@
             windows_proof_rmtree(self.builddir)
         shutil.copytree(os.path.join(self.rewrite_test_dir, dirname), 
self.builddir)
 
-    def rewrite_raw(self, directory, args):
+    def rewrite_raw(self, directory: str, args: T.Sequence[str]) -> T.Dict:
         if isinstance(args, str):
             args = [args]
         command = self.rewrite_command + ['--verbose', '--skip', 
'--sourcedir', directory] + args
@@ -41,7 +44,7 @@
             return {}
         return json.loads(p.stdout)
 
-    def rewrite(self, directory, args):
+    def rewrite(self, directory: str, args: T.Sequence[str]) -> T.Dict:
         if isinstance(args, str):
             args = [args]
         return self.rewrite_raw(directory, ['command'] + args)
@@ -527,3 +530,9 @@
 
         expected = Path(test_path / 
"expected_dag.txt").read_text(encoding='utf-8').strip()
         self.assertEqual(dag_as_str.strip(), expected)
+
+    @skip_if_not_language('nasm')
+    def test_nasm(self) -> None:
+        srcdir = os.path.join(self.unit_test_dir, '133 nasm language only')
+        self.rewrite_raw(srcdir, ['kwargs', 'info', 'project', '/'])
+

Reply via email to