[Fuchsia] Clean up path usage in GN templates
- Paths intererpreted by GN such as paths in inputs, sources, lib_dirs, etc should either be relative to BUILD.gn, or GN-absolute (relative to source root and start with "//"). They should not be rebased as system-absolute paths; those are only needed for paths that are actually outside the source tree. If paths are used in multiple contexts, rebasing should be deferred until they are used in a context where rebased paths are required. - Paths passed as arguments to scripts should be rebased on root_build_dir, which is the current working directory of the build. They should not be rebased on root_out_dir, as that is only the current working directory for the default toolchain. Using root_out_dir in place of root_build_dir breaks cross compilation. They should also not be resolved to system-absolute paths, as that introduces an undesired dependency on the location of the source tree. - The 3rd argument to rebase_path has no effect for GN-absolute paths, which includes all paths built by appending to predefined variables such as root_out_dir. Change-Id: I54ff2d9fed0daadacf5bd1bd8fdadc561c3a2882 Reviewed-on: https://chromium-review.googlesource.com/c/1448694 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by:Kevin Marshall <kmarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#629579}
Showing
Please register or sign in to comment