App.get_libname(): Don't use get_proj_refs()
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m16s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m17s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m18s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m16s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m17s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m18s
CI / Packaging test (push) Successful in 0s
App.get_projects_refs() is a versatile tool, but what it does isn't obvious. Use the simpler method .get_value() instead for get_libname(), and return None if a project doesn't provide a linkable library.
This is similar to fix
aadcdfb5f.Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c538447cc5
commit
3f47abb29a
2 changed files with 14 additions and 19 deletions
|
|
@ -45,8 +45,8 @@ class CmdLdflags(Cmd): # export
|
|||
for m in deps:
|
||||
if m in exclude:
|
||||
continue
|
||||
libname = self.app.get_libname([m])
|
||||
if not len(libname):
|
||||
libname = self.app.get_libname(m)
|
||||
if libname is None:
|
||||
continue
|
||||
path = self.app.find_dir(m, ['/lib'])
|
||||
if not path:
|
||||
|
|
@ -69,9 +69,10 @@ class CmdLdflags(Cmd): # export
|
|||
for m in reversed(deps):
|
||||
if m in args.exclude:
|
||||
continue
|
||||
libname = self.app.get_libname([m])
|
||||
if len(libname):
|
||||
out.append('-l' + libname)
|
||||
libname = self.app.get_libname(m)
|
||||
if libname is None:
|
||||
continue
|
||||
out.append('-l' + libname)
|
||||
if not out:
|
||||
return
|
||||
ldpathflags = self.__get_ldpathflags(args.module, args.exclude)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue