Index: tools/gn/runtime_deps.cc |
diff --git a/tools/gn/runtime_deps.cc b/tools/gn/runtime_deps.cc |
index e905d7ca45d54227be4e12fcd928883857d2ccf0..f6441e8cd113b4ddd9ac96ec12e40904a782ba36 100644 |
--- a/tools/gn/runtime_deps.cc |
+++ b/tools/gn/runtime_deps.cc |
@@ -241,12 +241,10 @@ bool WriteRuntimeDepsFilesIfNecessary(const Builder& builder, Err* err) { |
} |
load_trace.Done(); |
- std::vector<std::string> lines; |
- base::SplitString(list_contents, '\n', &lines); |
- |
SourceDir root_dir("//"); |
Label default_toolchain_label = builder.loader()->GetDefaultToolchain(); |
- for (const auto& line : lines) { |
+ for (const auto& line : base::SplitString( |
+ list_contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { |
if (line.empty()) |
continue; |
Label label = Label::Resolve(root_dir, default_toolchain_label, |