| 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 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "tools/gn/config_values_extractors.h" | 10 #include "tools/gn/config_values_extractors.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 EscapeOptions flag_options = GetFlagOptions(); | 255 EscapeOptions flag_options = GetFlagOptions(); |
| 256 RecursiveTargetConfigStringsToStream(target_, &ConfigValues::ldflags, | 256 RecursiveTargetConfigStringsToStream(target_, &ConfigValues::ldflags, |
| 257 flag_options, out_); | 257 flag_options, out_); |
| 258 | 258 |
| 259 // Followed by library search paths that have been recursively pushed | 259 // Followed by library search paths that have been recursively pushed |
| 260 // through the dependency tree. | 260 // through the dependency tree. |
| 261 const OrderedSet<SourceDir> all_lib_dirs = target_->all_lib_dirs(); | 261 const OrderedSet<SourceDir> all_lib_dirs = target_->all_lib_dirs(); |
| 262 if (!all_lib_dirs.empty()) { | 262 if (!all_lib_dirs.empty()) { |
| 263 // Since we're passing these on the command line to the linker and not | 263 // Since we're passing these on the command line to the linker and not |
| 264 // to Ninja, we need to do shell escaping. | 264 // to Ninja, we need to do shell escaping. |
| 265 PathOutput lib_path_output(path_output_.current_dir(), ESCAPE_NINJA_SHELL, | 265 PathOutput lib_path_output( |
| 266 true); | 266 path_output_.current_dir(), ESCAPE_NINJA_SHELL, false); |
| 267 for (size_t i = 0; i < all_lib_dirs.size(); i++) { | 267 for (size_t i = 0; i < all_lib_dirs.size(); i++) { |
| 268 out_ << " " << tool.lib_dir_prefix; | 268 out_ << " " << tool.lib_dir_prefix; |
| 269 lib_path_output.WriteDir(out_, all_lib_dirs[i], | 269 lib_path_output.WriteDir(out_, all_lib_dirs[i], |
| 270 PathOutput::DIR_NO_LAST_SLASH); | 270 PathOutput::DIR_NO_LAST_SLASH); |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 // Append manifest flag on Windows to reference our file. | 274 // Append manifest flag on Windows to reference our file. |
| 275 // HACK ERASEME BRETTW FIXME | 275 // HACK ERASEME BRETTW FIXME |
| 276 if (settings_->IsWin()) { | 276 if (settings_->IsWin()) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Data files. | 463 // Data files. |
| 464 const std::vector<SourceFile>& data = target_->data(); | 464 const std::vector<SourceFile>& data = target_->data(); |
| 465 for (size_t i = 0; i < data.size(); i++) { | 465 for (size_t i = 0; i < data.size(); i++) { |
| 466 out_ << " "; | 466 out_ << " "; |
| 467 path_output_.WriteFile(out_, data[i]); | 467 path_output_.WriteFile(out_, data[i]); |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 } | 470 } |
| OLD | NEW |