From f06a999a1673aa520e003df900b5bb328d7ec04b Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Thu, 9 Apr 2020 21:24:28 +0300 Subject: [PATCH] Filter out more shared/exe deps. --- src/sw/driver/target/native.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sw/driver/target/native.cpp b/src/sw/driver/target/native.cpp index 97deede21..4c4049bc8 100644 --- a/src/sw/driver/target/native.cpp +++ b/src/sw/driver/target/native.cpp @@ -2689,6 +2689,19 @@ void NativeCompiledTarget::prepare_pass3_3() } for (auto &d : all_deps_normal) { + if (auto t = d->getTarget().as()) + { + if (!t->isStaticOrHeaderOnlyLibrary()) + continue; + } + else if (auto t = d->getTarget().as()) + { + auto &ts = t->getInterfaceSettings(); + if (!::sw::isStaticOrHeaderOnlyLibrary(ts)) + continue; + } + else + throw SW_RUNTIME_ERROR("missing target code"); auto copy = std::make_shared(*d); copy->LinkLibrariesOnly = true; // force auto [_, inserted] = deps.emplace(copy, InheritanceType::Public); // use public inh