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

Unified Diff: build/vs_toolchain.py

Issue 1827663002: Strip trailing backslashes from vcvarsall results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/vs_toolchain.py
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index 2977159b02f18a5fbc1216dccbd3e19ff26afdcf..4d0380e38d4fef6eb98aa0f6d1d65154a9ff532b 100755
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -331,6 +331,12 @@ def Update(force=False):
return 0
+def NormalizePath(path):
+ while path.endswith("\\"):
+ path = path[:-1]
+ return path
+
+
def GetToolchainDir():
"""Gets location information about the current toolchain (must have been
previously updated by 'update'). This is used for the GN build."""
@@ -348,10 +354,10 @@ vs_version = "%s"
wdk_dir = "%s"
runtime_dirs = "%s"
''' % (
- os.environ['GYP_MSVS_OVERRIDE_PATH'],
- os.environ['WINDOWSSDKDIR'],
+ NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH']),
+ NormalizePath(os.environ['WINDOWSSDKDIR']),
GetVisualStudioVersion(),
- os.environ.get('WDK_DIR', ''),
+ NormalizePath(os.environ.get('WDK_DIR', '')),
os.path.pathsep.join(runtime_dll_dirs or ['None']))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698