diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-02-16 14:42:51 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-02-20 09:50:44 -0800 |
| commit | 47acce8ec93ae73b5a95f3b21e35abb4b3c21f6a (patch) | |
| tree | d051aba078165364befbab0c9ab53aa6aadc6914 | |
| parent | b290a8254122f53d6477b7ba24366d81cfc5e99c (diff) | |
| download | meson-47acce8ec93ae73b5a95f3b21e35abb4b3c21f6a.tar.gz | |
Provide a better error message when mixing host and build machines
Since we don't get a location for these errors, we can at least tell you
which targets you happen to be mixing together that produce this
problem.
Ran into while trying to debug a target mixing bug.
| -rw-r--r-- | mesonbuild/build.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 934e7c1f0..066e6aa85 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1482,7 +1482,7 @@ class BuildTarget(Target): if not self.uses_rust() and links_with_rust_abi: raise InvalidArguments(f'Try to link Rust ABI library {t.name!r} with a non-Rust target {self.name!r}') if self.for_machine is not t.for_machine and (not links_with_rust_abi or t.rust_crate_type != 'proc-macro'): - msg = f'Tried to mix libraries for machines {self.for_machine} and {t.for_machine} in target {self.name!r}' + msg = f'Tried to tied to mix a {t.for_machine} library ("{t.name}") with a {self.for_machine} target "{self.name}"' if self.environment.is_cross_build(): raise InvalidArguments(msg + ' This is not possible in a cross build.') else: |
