Do not use linker arguments on static libraries.
This commit is contained in:
parent
4522a3a9a5
commit
c75b75d487
|
@ -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():
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue