From: Mikko Rasa Date: Sat, 16 Sep 2023 11:18:08 +0000 (+0300) Subject: Change how library modes are retrieved for binaries again X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=c722432c2fa02967c2d288abb518560ebe7842a3;p=builder.git Change how library modes are retrieved for binaries again The change in 6280e72 turned out to be incorrect after all, and I can't remember of find any bug that it fixed. --- diff --git a/source/lib/binary.cpp b/source/lib/binary.cpp index ff8d658..5cdf867 100644 --- a/source/lib/binary.cpp +++ b/source/lib/binary.cpp @@ -76,7 +76,9 @@ void Binary::find_dependencies(Target *tgt, vector &static_libs, vecto if(l.size()>10 && !l.compare(l.size()-10, 10, ".framework")) continue; - BuildInfo::LibraryMode libmode = binfo.get_libmode_for(l); + /* Get libmode from the final target's build info to allow setting modes + for transitive libraries. */ + BuildInfo::LibraryMode libmode = component->get_build_info().get_libmode_for(l); Target *lib = builder.get_vfs().find_library(l, binfo.libpath, libmode); if(lib) {