| 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 #ifndef TOOLS_GN_FILESYSTEM_UTILS_H_ | 5 #ifndef TOOLS_GN_FILESYSTEM_UTILS_H_ |
| 6 #define TOOLS_GN_FILESYSTEM_UTILS_H_ | 6 #define TOOLS_GN_FILESYSTEM_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // given source_root, a source-relative directory will be returned (e.g. | 159 // given source_root, a source-relative directory will be returned (e.g. |
| 160 // "//foo/bar.cc". If it's outside of the source root, a system-absolute | 160 // "//foo/bar.cc". If it's outside of the source root, a system-absolute |
| 161 // directory will be returned. | 161 // directory will be returned. |
| 162 SourceDir SourceDirForPath(const base::FilePath& source_root, | 162 SourceDir SourceDirForPath(const base::FilePath& source_root, |
| 163 const base::FilePath& path); | 163 const base::FilePath& path); |
| 164 | 164 |
| 165 // Like SourceDirForPath but returns the SourceDir representing the current | 165 // Like SourceDirForPath but returns the SourceDir representing the current |
| 166 // directory. | 166 // directory. |
| 167 SourceDir SourceDirForCurrentDirectory(const base::FilePath& source_root); | 167 SourceDir SourceDirForCurrentDirectory(const base::FilePath& source_root); |
| 168 | 168 |
| 169 // Given the label of a toolchain and whether that toolchain is the default |
| 170 // toolchain, returns the name of the subdirectory for that toolchain's |
| 171 // output. This will be the empty string to indicate that the toolchain outputs |
| 172 // go in the root build directory. Otherwise, the result will end in a slash. |
| 173 std::string GetOutputSubdirName(const Label& toolchain_label, bool is_default); |
| 174 |
| 169 // ----------------------------------------------------------------------------- | 175 // ----------------------------------------------------------------------------- |
| 170 | 176 |
| 171 // These functions return the various flavors of output and gen directories. | 177 // These functions return the various flavors of output and gen directories. |
| 172 SourceDir GetToolchainOutputDir(const Settings* settings); | 178 SourceDir GetToolchainOutputDir(const Settings* settings); |
| 179 SourceDir GetToolchainOutputDir(const BuildSettings* build_settings, |
| 180 const Label& label, bool is_default); |
| 173 SourceDir GetToolchainGenDir(const Settings* settings); | 181 SourceDir GetToolchainGenDir(const Settings* settings); |
| 182 SourceDir GetToolchainGenDir(const BuildSettings* build_settings, |
| 183 const Label& toolchain_label, bool is_default); |
| 174 SourceDir GetOutputDirForSourceDir(const Settings* settings, | 184 SourceDir GetOutputDirForSourceDir(const Settings* settings, |
| 175 const SourceDir& source_dir); | 185 const SourceDir& source_dir); |
| 176 SourceDir GetGenDirForSourceDir(const Settings* settings, | 186 SourceDir GetGenDirForSourceDir(const Settings* settings, |
| 177 const SourceDir& source_dir); | 187 const SourceDir& source_dir); |
| 178 SourceDir GetTargetOutputDir(const Target* target); | 188 SourceDir GetTargetOutputDir(const Target* target); |
| 179 SourceDir GetTargetGenDir(const Target* target); | 189 SourceDir GetTargetGenDir(const Target* target); |
| 180 SourceDir GetCurrentOutputDir(const Scope* scope); | 190 SourceDir GetCurrentOutputDir(const Scope* scope); |
| 181 SourceDir GetCurrentGenDir(const Scope* scope); | 191 SourceDir GetCurrentGenDir(const Scope* scope); |
| 182 | 192 |
| 183 #endif // TOOLS_GN_FILESYSTEM_UTILS_H_ | 193 #endif // TOOLS_GN_FILESYSTEM_UTILS_H_ |
| OLD | NEW |