From c722432c2fa02967c2d288abb518560ebe7842a3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 16 Sep 2023 14:18:08 +0300 Subject: [PATCH] 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. --- source/lib/binary.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.45.2