|
gn: Support build directories outside the source tree.
The main use-case is to support using a fast SSD or ramdisk for the
build directory, but a slower persistent disk for the source code.
The general idea behind this change is modifying
- RebaseSourceAbsolutePath()
- SourceDir::ResolveRelativeFile()
- SourceDir::ResolveRelativeDir()
- GetOutputDirForSourceDirAsOutputFile()
- PathOutput
to work with paths reaching out of the source directory.
Thanks to jam@ for the Windows-fixes.
BUG= 343728
TEST=New unit tests + Unit tests pass.
TEST=`gn gen /ssd/out/Debug && ninja -C /ssd/out/Debug` work as expected.
Committed: https://crrev.com/6f9c6456a4358ec6ccb7b1c9d4e64a796633faae
Cr-Commit-Position: refs/heads/master@{#303719}
Total comments: 2
Total comments: 5
Total comments: 12
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+443 lines, -190 lines) |
Patch |
 |
M |
tools/gn/action_target_generator.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/build_settings.h
|
View
|
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/build_settings.cc
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/command_format.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/filesystem_utils.h
|
View
|
1
2
3
|
2 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
 |
M |
tools/gn/filesystem_utils.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+66 lines, -31 lines |
0 comments
|
Download
|
 |
M |
tools/gn/filesystem_utils_unittest.cc
|
View
|
1
2
3
|
3 chunks |
+101 lines, -44 lines |
0 comments
|
Download
|
 |
M |
tools/gn/function_exec_script.cc
|
View
|
1
2
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/function_get_path_info.cc
|
View
|
1
2
|
2 chunks |
+18 lines, -9 lines |
0 comments
|
Download
|
 |
M |
tools/gn/function_read_file.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/function_rebase_path.cc
|
View
|
1
2
3
|
4 chunks |
+20 lines, -19 lines |
0 comments
|
Download
|
 |
M |
tools/gn/function_rebase_path_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+53 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/function_write_file.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/functions.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/item.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/ninja_action_target_writer.cc
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/ninja_binary_target_writer.cc
|
View
|
1
2
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/ninja_build_writer.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/ninja_target_writer.cc
|
View
|
1
2
3
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tools/gn/ninja_toolchain_writer.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/output_file.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/path_output.h
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/path_output.cc
|
View
|
1
2
3
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/path_output_unittest.cc
|
View
|
1
2
|
8 chunks |
+15 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/setup.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/source_dir.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/source_dir_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+57 lines, -17 lines |
0 comments
|
Download
|
 |
M |
tools/gn/source_file.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+16 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tools/gn/substitution_writer.cc
|
View
|
1
2
3
|
3 chunks |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/value_extractors.cc
|
View
|
1
2
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
Total messages: 39 (8 generated)
|