blob: 5316c96fdcf2aca377735a6bffb7258ab38d4200 [file] [log] [blame]
Re-enable symlink resolution when determining relative paths to use for writing
ninja files. cros_workon_make relies on symlinking platform2 into the build
environment; that is, a build path like /build/.../cryptohome-9999/platform2/ is
symlinked to /mnt/host/source/src/platform2. uses the source path (in /mnt/host/source) as the source root, but
the particular .gyp file being generated uses the build path (in /build).
Without symlink resolution, the relative path is incorrect, causing ninja
generation to fail.
Note that simply changing to pass the /build path to the platform2
directory as --toplevel-dir (instead of the /mnt/host/source path) would not
solve this as gyp unconditionally resolves that symlink. Thus, take the simpler
approach of changing back to resolving both symlinks.
This effectively reverts
--- pylib/gyp/generator/
+++ pylib/gyp/generator/
@@ -2377,7 +2377,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
# it could point to a path above toplevel_dir, and we cannot correctly deal
# with that case at the moment.
build_file = gyp.common.RelativePath(build_file, options.toplevel_dir,
- False)
+ True)
qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,