aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ninjabackend.py3
-rw-r--r--test cases/common/3 static/meson.build3
2 files changed, 4 insertions, 2 deletions
diff --git a/ninjabackend.py b/ninjabackend.py
index d2791a5..7696f15 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -1450,7 +1450,8 @@ rule FORTRAN_DEP_HACK
for d in target.external_deps:
if d.need_threads():
commands += linker.thread_link_flags()
- commands += target.link_args
+ if not isinstance(target, build.StaticLibrary):
+ commands += target.link_args
# External deps must be last because target link libraries may depend on them.
if not(isinstance(target, build.StaticLibrary)):
for dep in target.get_external_deps():
diff --git a/test cases/common/3 static/meson.build b/test cases/common/3 static/meson.build
index fd33e1c..3dee93b 100644
--- a/test cases/common/3 static/meson.build
+++ b/test cases/common/3 static/meson.build
@@ -1,2 +1,3 @@
project('static library test', 'c')
-lib = static_library('mylib', 'libfile.c')
+lib = static_library('mylib', 'libfile.c',
+ link_args : '-THISMUSTNOBEUSED') # Static linker needs to ignore all link args.