Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: pylib/gyp/common.py

Issue 1365163002: Make the ninja generator handle symlinked paths correctly. (Closed) Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Added 'chdir=outdir' per Nico's suggestion on the last CL. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | pylib/gyp/generator/ninja.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/common.py
diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
index b6875e43efcbc40a14eb6a258626455e7ed91054..4480ca9fac5a163a688767af46bbc118f74be008 100644
--- a/pylib/gyp/common.py
+++ b/pylib/gyp/common.py
@@ -131,13 +131,16 @@ def QualifiedTarget(build_file, target, toolset):
@memoize
-def RelativePath(path, relative_to):
+def RelativePath(path, relative_to, follow_path_symlink=True):
scottmg 2015/09/24 21:30:51 could you add some explanation for this arg here?
lindleyf 2015/09/24 21:47:14 I've added a comment here and at the point of use.
# Assuming both |path| and |relative_to| are relative to the current
# directory, returns a relative path that identifies path relative to
# relative_to.
# Convert to normalized (and therefore absolute paths).
- path = os.path.realpath(path)
+ if follow_path_symlink:
+ path = os.path.realpath(path)
+ else:
+ path = os.path.abspath(path)
relative_to = os.path.realpath(relative_to)
# On Windows, we can't create a relative path to a different drive, so just
« no previous file with comments | « no previous file | pylib/gyp/generator/ninja.py » ('j') | pylib/gyp/generator/ninja.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698