summaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index a43709342..0ad679450 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2327,8 +2327,9 @@ class StaticLibrary(BuildTarget):
# and thus, machine_info kernel should be set to 'none'.
# In that case, native_static_libs list is empty.
rustc = self.compilers['rust']
- d = dependencies.InternalDependency('undefined', [], [],
- rustc.native_static_libs,
+ link_args = ['-L' + rustc.get_target_libdir() + '/self-contained']
+ link_args += rustc.native_static_libs
+ d = dependencies.InternalDependency('undefined', [], [], link_args,
[], [], [], [], [], {}, [], [], [],
'_rust_native_static_libs')
self.external_deps.append(d)