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

Unified Diff: tools/gn/filesystem_utils.h

Issue 80463004: GN generator for GYP actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/file_template.cc ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/filesystem_utils.h
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h
index 9899cae4eacfdcc22612a2e06f360ea3fec06c42..152851d971cc4a1e167254eae66ae38a76f9842b 100644
--- a/tools/gn/filesystem_utils.h
+++ b/tools/gn/filesystem_utils.h
@@ -138,4 +138,25 @@ std::string PathToSystem(const std::string& path);
std::string RebaseSourceAbsolutePath(const std::string& input,
const SourceDir& dest_dir);
+// Returns the given directory with no terminating slash at the end, such that
+// appending a slash and more stuff will produce a valid path.
+//
+// If the directory refers to either the source or system root, we'll append
+// a "." so this remains valid.
+std::string DirectoryWithNoLastSlash(const SourceDir& dir);
+
+// -----------------------------------------------------------------------------
+
+// These functions return the various flavors of output and gen directories.
+SourceDir GetToolchainOutputDir(const Settings* settings);
+SourceDir GetToolchainGenDir(const Settings* settings);
+SourceDir GetOutputDirForSourceDir(const Settings* settings,
+ const SourceDir& source_dir);
+SourceDir GetGenDirForSourceDir(const Settings* settings,
+ const SourceDir& source_dir);
+SourceDir GetTargetOutputDir(const Target* target);
+SourceDir GetTargetGenDir(const Target* target);
+SourceDir GetCurrentOutputDir(const Scope* scope);
+SourceDir GetCurrentGenDir(const Scope* scope);
+
#endif // TOOLS_GN_FILESYSTEM_UTILS_H_
« no previous file with comments | « tools/gn/file_template.cc ('k') | tools/gn/filesystem_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698