]> git.tdb.fi Git - builder.git/commitdiff
Change how library modes are retrieved for binaries again
authorMikko Rasa <tdb@tdb.fi>
Sat, 16 Sep 2023 11:18:08 +0000 (14:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 16 Sep 2023 11:18:08 +0000 (14:18 +0300)
The change in 6280e72 turned out to be incorrect after all, and I can't
remember of find any bug that it fixed.

source/lib/binary.cpp

index ff8d658b13e9781e1640d2401564ae8578b1745c..5cdf867a607782875fee333f5299838b1ce180b4 100644 (file)
@@ -76,7 +76,9 @@ void Binary::find_dependencies(Target *tgt, vector<Target *> &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)
                {