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/ninja_binary_target_writer.h" | 5 #include "tools/gn/ninja_binary_target_writer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 | 229 |
230 // All linkable deps should have a link output file. | 230 // All linkable deps should have a link output file. |
231 DCHECK(!cur->link_output_file().value().empty()) | 231 DCHECK(!cur->link_output_file().value().empty()) |
232 << "No link output file for " | 232 << "No link output file for " |
233 << target_->label().GetUserVisibleName(false); | 233 << target_->label().GetUserVisibleName(false); |
234 | 234 |
235 if (cur->dependency_output_file().value() != | 235 if (cur->dependency_output_file().value() != |
236 cur->link_output_file().value()) { | 236 cur->link_output_file().value()) { |
237 // This is a shared library with separate link and deps files. Save for | 237 // This is a shared library with separate link and deps files. Save for |
238 // later. | 238 // later. |
239 implicit_deps.push_back(cur->link_output_file()); | |
ckocagil
2014/09/21 02:05:05
We should implicitly depend on both the dll and th
| |
239 implicit_deps.push_back(cur->dependency_output_file()); | 240 implicit_deps.push_back(cur->dependency_output_file()); |
240 solibs.push_back(cur->link_output_file()); | 241 solibs.push_back(cur->dependency_output_file()); |
ckocagil
2014/09/21 02:05:05
We should output the .lib here, so it can be linke
brettw
2014/09/21 02:55:00
I *think* both of these lines were correct before.
ckocagil
2014/09/21 11:47:27
Done.
| |
241 } else { | 242 } else { |
242 // Normal case, just link to this target. | 243 // Normal case, just link to this target. |
243 out_ << " "; | 244 out_ << " "; |
244 path_output_.WriteFile(out_, cur->link_output_file()); | 245 path_output_.WriteFile(out_, cur->link_output_file()); |
245 } | 246 } |
246 } | 247 } |
247 | 248 |
248 // Append implicit dependencies collected above. | 249 // Append implicit dependencies collected above. |
249 if (!implicit_deps.empty()) { | 250 if (!implicit_deps.empty()) { |
250 out_ << " |"; | 251 out_ << " |"; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 return false; // No tool for this file (it's a header file or something). | 478 return false; // No tool for this file (it's a header file or something). |
478 const Tool* tool = target->toolchain()->GetTool(*computed_tool_type); | 479 const Tool* tool = target->toolchain()->GetTool(*computed_tool_type); |
479 if (!tool) | 480 if (!tool) |
480 return false; // Tool does not apply for this toolchain.file. | 481 return false; // Tool does not apply for this toolchain.file. |
481 | 482 |
482 // Figure out what output(s) this compiler produces. | 483 // Figure out what output(s) this compiler produces. |
483 SubstitutionWriter::ApplyListToCompilerAsOutputFile( | 484 SubstitutionWriter::ApplyListToCompilerAsOutputFile( |
484 target, source, tool->outputs(), outputs); | 485 target, source, tool->outputs(), outputs); |
485 return !outputs->empty(); | 486 return !outputs->empty(); |
486 } | 487 } |
OLD | NEW |