Index: tools/gn/commands.cc |
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc |
index 3778d5bb6445574e563e4f6788e3280b4b99bda1..ed7a009d6af2c6f7a866d7d82e753b701d07760e 100644 |
--- a/tools/gn/commands.cc |
+++ b/tools/gn/commands.cc |
@@ -323,8 +323,6 @@ void PrintTargetsAsOutputs(bool indent, |
const BuildSettings* build_settings = |
targets[0]->settings()->build_settings(); |
- SourceDir current_dir = SourceDirForCurrentDirectory( |
- build_settings->root_path()); |
for (const Target* target : targets) { |
// Use the link output file if there is one, otherwise fall back to the |
// dependency output file (for actions, for example). |
@@ -334,7 +332,8 @@ void PrintTargetsAsOutputs(bool indent, |
SourceFile output_as_source = |
output_file.AsSourceFile(build_settings); |
- std::string result = RebasePath(output_as_source.value(), current_dir, |
+ std::string result = RebasePath(output_as_source.value(), |
+ build_settings->build_dir(), |
build_settings->root_path_utf8()); |
if (indent) |
OutputString(" "); |