| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/target.h" | 5 #include "tools/gn/target.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "tools/gn/config_values_extractors.h" | 10 #include "tools/gn/config_values_extractors.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // library boundaries. | 270 // library boundaries. |
| 271 // | 271 // |
| 272 // In this case: | 272 // In this case: |
| 273 // EXE -> INTERMEDIATE_SHLIB --[public]--> FINAL_SHLIB | 273 // EXE -> INTERMEDIATE_SHLIB --[public]--> FINAL_SHLIB |
| 274 // The EXE will also link to to FINAL_SHLIB. The public dependeny means | 274 // The EXE will also link to to FINAL_SHLIB. The public dependeny means |
| 275 // that the EXE can use the headers in FINAL_SHLIB so the FINAL_SHLIB | 275 // that the EXE can use the headers in FINAL_SHLIB so the FINAL_SHLIB |
| 276 // will need to appear on EXE's link line. | 276 // will need to appear on EXE's link line. |
| 277 // | 277 // |
| 278 // However, if the dependency is private: | 278 // However, if the dependency is private: |
| 279 // EXE -> INTERMEDIATE_SHLIB --[private]--> FINAL_SHLIB | 279 // EXE -> INTERMEDIATE_SHLIB --[private]--> FINAL_SHLIB |
| 280 // the dependency will not be propogated because INTERMEDIATE_SHLIB is | 280 // the dependency will not be propagated because INTERMEDIATE_SHLIB is |
| 281 // not granting permission to call functiosn from FINAL_SHLIB. If EXE | 281 // not granting permission to call functiosn from FINAL_SHLIB. If EXE |
| 282 // wants to use functions (and link to) FINAL_SHLIB, it will need to do | 282 // wants to use functions (and link to) FINAL_SHLIB, it will need to do |
| 283 // so explicitly. | 283 // so explicitly. |
| 284 // | 284 // |
| 285 // Static libraries and source sets aren't inherited across shared | 285 // Static libraries and source sets aren't inherited across shared |
| 286 // library boundaries because they will be linked into the shared | 286 // library boundaries because they will be linked into the shared |
| 287 // library. | 287 // library. |
| 288 inherited_libraries_.AppendPublicSharedLibraries( | 288 inherited_libraries_.AppendPublicSharedLibraries( |
| 289 dep->inherited_libraries(), is_public); | 289 dep->inherited_libraries(), is_public); |
| 290 } else if (!dep->IsFinal()) { | 290 } else if (!dep->IsFinal()) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 return; // Not in output dir, this is OK. | 554 return; // Not in output dir, this is OK. |
| 555 | 555 |
| 556 // Tell the scheduler about unknown files. This will be noted for later so | 556 // Tell the scheduler about unknown files. This will be noted for later so |
| 557 // the list of files written by the GN build itself (often response files) | 557 // the list of files written by the GN build itself (often response files) |
| 558 // can be filtered out of this list. | 558 // can be filtered out of this list. |
| 559 OutputFile out_file(settings()->build_settings(), source); | 559 OutputFile out_file(settings()->build_settings(), source); |
| 560 std::set<const Target*> seen_targets; | 560 std::set<const Target*> seen_targets; |
| 561 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, &seen_targets)) | 561 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, &seen_targets)) |
| 562 g_scheduler->AddUnknownGeneratedInput(this, source); | 562 g_scheduler->AddUnknownGeneratedInput(this, source); |
| 563 } | 563 } |
| OLD | NEW |