aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-04-22 09:13:44 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-09-19 13:54:49 -0400
commitdbf081c9ce7c145908d96eb9fa664b8b5b1f5896 (patch)
treea076182cf4c465f81dc50c8096e72fc34c7277b7 /mesonbuild/interpreter
parent7321f01678d6dc286a4616a843f835cb6b949520 (diff)
downloadmeson-dbf081c9ce7c145908d96eb9fa664b8b5b1f5896.zip
meson-dbf081c9ce7c145908d96eb9fa664b8b5b1f5896.tar.gz
meson-dbf081c9ce7c145908d96eb9fa664b8b5b1f5896.tar.bz2
Rust: Fix both_libraries() case
Rustc does not produce object files we can reuse to build both libraries. Ideally this should be done with a single target that has both `--crate-type` arguments instead of having 2 different build rules. As temporary workaround, build twice and ensure they don't get conflicts in intermediary files created by rustc by passing target's private directory as --out-dir. See https://github.com/rust-lang/rust/issues/111083.
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 464ebea..a5c8a5a 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -3206,6 +3206,10 @@ class Interpreter(InterpreterBase, HoldableObject):
# Feel free to submit patches to get this fixed if it is an
# issue for you.
reuse_object_files = False
+ elif shared_lib.uses_rust():
+ # FIXME: rustc supports generating both libraries in a single invocation,
+ # but for now compile twice.
+ reuse_object_files = False
else:
reuse_object_files = static_lib.pic