Skip to content

Commit

Permalink
Filter out more shared/exe deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Apr 9, 2020
1 parent b4bdd89 commit f06a999
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/sw/driver/target/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2689,6 +2689,19 @@ void NativeCompiledTarget::prepare_pass3_3()
}
for (auto &d : all_deps_normal)
{
if (auto t = d->getTarget().as<const NativeCompiledTarget *>())
{
if (!t->isStaticOrHeaderOnlyLibrary())
continue;
}
else if (auto t = d->getTarget().as<const PredefinedTarget *>())
{
auto &ts = t->getInterfaceSettings();
if (!::sw::isStaticOrHeaderOnlyLibrary(ts))
continue;
}
else
throw SW_RUNTIME_ERROR("missing target code");
auto copy = std::make_shared<Dependency>(*d);
copy->LinkLibrariesOnly = true; // force
auto [_, inserted] = deps.emplace(copy, InheritanceType::Public); // use public inh
Expand Down

0 comments on commit f06a999

Please sign in to comment.