Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: tools/gn/output_file.cc

Issue 937003002: Enhance GN introspection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/label_pattern.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/output_file.cc
diff --git a/tools/gn/output_file.cc b/tools/gn/output_file.cc
index cc6dc9851bf9a097e2ed01e6c873ccd24f222622..1b6db62298bebcac2c7f33fb88cb4a56e7293d08 100644
--- a/tools/gn/output_file.cc
+++ b/tools/gn/output_file.cc
@@ -27,7 +27,11 @@ OutputFile::~OutputFile() {
SourceFile OutputFile::AsSourceFile(const BuildSettings* build_settings) const {
DCHECK(!value_.empty());
DCHECK(value_[value_.size() - 1] != '/');
- return SourceFile(build_settings->build_dir().value() + value_);
+
+ std::string path = build_settings->build_dir().value();
+ path.append(value_);
+ NormalizePath(&path);
+ return SourceFile(path);
}
SourceDir OutputFile::AsSourceDir(const BuildSettings* build_settings) const {
@@ -36,5 +40,8 @@ SourceDir OutputFile::AsSourceDir(const BuildSettings* build_settings) const {
// slash.
DCHECK(value_[value_.size() - 1] == '/');
}
- return SourceDir(build_settings->build_dir().value() + value_);
+ std::string path = build_settings->build_dir().value();
+ path.append(value_);
+ NormalizePath(&path);
+ return SourceDir(path);
}
« no previous file with comments | « tools/gn/label_pattern.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698