gn should not generate ninja files that have absolute path names in them |
||
Issue descriptionIf you move your src directory (or mount it with a different absolute path inside a VM or chroot), running ninja will fail with an error like: dev/chromium_official/src/buildtools/linux64/gn: No such file or directory I did a string replace in build.ninja and toolchain.ninja to change all of the absolute paths to relative ones like ../../buildtools/linux64/gn (there were only a few replacements) and now the build works on all of my different mount points. gn should be using relative paths by default.
,
Dec 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6713d85d1567baaa3def753ed8e9bf8ee29185e2 commit 6713d85d1567baaa3def753ed8e9bf8ee29185e2 Author: Tom Anderson <thomasanderson@chromium.org> Date: Fri Dec 01 19:24:05 2017 Generate relative paths for build.ninja and build.ninja.d BUG= 787223 R=dpranke@chromium.org Change-Id: I1c3aada842bba899c20d5e2c1b0dceb818f118d2 Reviewed-on: https://chromium-review.googlesource.com/784093 Reviewed-by: Brett Wilson <brettw@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#521012} [modify] https://crrev.com/6713d85d1567baaa3def753ed8e9bf8ee29185e2/tools/gn/filesystem_utils.cc [modify] https://crrev.com/6713d85d1567baaa3def753ed8e9bf8ee29185e2/tools/gn/filesystem_utils.h [modify] https://crrev.com/6713d85d1567baaa3def753ed8e9bf8ee29185e2/tools/gn/filesystem_utils_unittest.cc [modify] https://crrev.com/6713d85d1567baaa3def753ed8e9bf8ee29185e2/tools/gn/ninja_build_writer.cc
,
Dec 1 2017
Should be fixed when gn rolls. I think we should consider getting rid of single argument rebase_path() as it was a source of the issues fixed by the CL in c#1. AFAICT, nothing really needs to pass an absolute path to scripts etc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Nov 28 2017