diff --git a/src/nouveau/compiler/acorn/lib.rs b/src/compiler/rust/acorn/lib.rs similarity index 100% rename from src/nouveau/compiler/acorn/lib.rs rename to src/compiler/rust/acorn/lib.rs diff --git a/src/compiler/rust/meson.build b/src/compiler/rust/meson.build index afb63c2d184..d19ec161e1a 100644 --- a/src/compiler/rust/meson.build +++ b/src/compiler/rust/meson.build @@ -172,6 +172,18 @@ if with_tests and get_option('b_sanitize') == 'none' ) endif +_libacorn_rs = static_library( + 'acorn', + files('acorn/lib.rs'), + gnu_symbol_visibility : 'hidden', + rust_abi : 'rust', + rust_args : _compiler_rust_args, +) + +idep_acorn_rs = declare_dependency( + link_with : _libacorn_rs, +) + idep_compiler_rs = declare_dependency( link_with : _libcompiler_rs, ) diff --git a/src/nouveau/compiler/meson.build b/src/nouveau/compiler/meson.build index 4bf076240bd..df192993e9e 100644 --- a/src/nouveau/compiler/meson.build +++ b/src/nouveau/compiler/meson.build @@ -33,18 +33,6 @@ libnak_c_files = files( 'nak_nir_rematerialize_load_const.c', ) -_libacorn_rs = static_library( - 'acorn', - files('acorn/lib.rs'), - gnu_symbol_visibility : 'hidden', - rust_abi : 'rust', - rust_args : nouveau_rust_args, -) - -idep_acorn_rs = declare_dependency( - link_with : _libacorn_rs, -) - libnak_deps = [ idep_mesautil, idep_nir_headers, @@ -147,13 +135,11 @@ if with_tests and get_option('b_sanitize') == 'none' and not with_platform_andro idep_compiler.partial_dependency(link_args : true, links : true), idep_mesautil.partial_dependency(link_args : true, links : true), idep_nv_push_rs, + idep_acorn_rs, ], # This is needed to ensure we link against glibc # See also https://gitlab.freedesktop.org/mesa/mesa/-/issues/11632 rust_args: ['-C', 'default-linker-libraries'], - link_with: [ - _libacorn_rs, - ], ) endif