| Index: tools/gn/target.cc
|
| diff --git a/tools/gn/target.cc b/tools/gn/target.cc
|
| index 4430512877d033109fb9afaef859fb3b8fad1e8a..759d7bff14493e59663830c67f2259562eb28f11 100644
|
| --- a/tools/gn/target.cc
|
| +++ b/tools/gn/target.cc
|
| @@ -352,8 +352,10 @@ bool Target::OnResolved(Err* err) {
|
| // private deps. This step re-exports them as public configs for targets that
|
| // depend on this one.
|
| for (const auto& dep : public_deps_) {
|
| - public_configs_.Append(dep.ptr->public_configs().begin(),
|
| - dep.ptr->public_configs().end());
|
| + if (dep.ptr->toolchain() == toolchain()) {
|
| + public_configs_.Append(dep.ptr->public_configs().begin(),
|
| + dep.ptr->public_configs().end());
|
| + }
|
| }
|
|
|
| // Copy our own libs and lib_dirs to the final set. This will be from our
|
| @@ -502,10 +504,17 @@ bool Target::GetOutputFilesForSource(const SourceFile& source,
|
| }
|
|
|
| void Target::PullDependentTargetConfigs() {
|
| - for (const auto& pair : GetDeps(DEPS_LINKED))
|
| - MergeAllDependentConfigsFrom(pair.ptr, &configs_, &all_dependent_configs_);
|
| - for (const auto& pair : GetDeps(DEPS_LINKED))
|
| - MergePublicConfigsFrom(pair.ptr, &configs_);
|
| + for (const auto& pair : GetDeps(DEPS_LINKED)) {
|
| + if (pair.ptr->toolchain() == toolchain()) {
|
| + MergeAllDependentConfigsFrom(pair.ptr, &configs_,
|
| + &all_dependent_configs_);
|
| + }
|
| + }
|
| + for (const auto& pair : GetDeps(DEPS_LINKED)) {
|
| + if (pair.ptr->toolchain() == toolchain()) {
|
| + MergePublicConfigsFrom(pair.ptr, &configs_);
|
| + }
|
| + }
|
| }
|
|
|
| void Target::PullDependentTargetLibsFrom(const Target* dep, bool is_public) {
|
|
|