summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-07 17:35:50 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-14 16:43:45 +0200
commit65f385bb6ee8b6735d6555a396094577d44a5f82 (patch)
tree7b58080b64dbbdaff945f1429d68411f8c902268 /tools
parent4be6a15559b0dfb7c53b72e2480ce8e09326b3c1 (diff)
Fix the build on Windows due to backslashes
A gyp variable containing backslashes would be evaluated twice when passed through grit_action.gypi in src/core/chrome_qt.gyp. For some reason, gyp would end up reducing the escaping of backslashes once for each variable evaluation, which would completely remove backslashes from the value. Fix the issue by making sure that we pass paths to gyp with slashes instead of backslashes. Python will know what to do with them regardless. Change-Id: Id38866fd63a2ba1524a8c998fe577f7f50fca059 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index 1bda49855..864506f8a 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -67,6 +67,11 @@ def additional_include_files(args=[]):
return result
+def purifyGypVarPath(path):
+ # Backslash escapings are somehow reduced once every time a variable is resolved
+ # Python is able to understand mixed slash paths anyway, so don't use backslashes.
+ return path.replace('\\', '/')
+
if __name__ == '__main__':
output_dir = sys.argv[1]
if not os.path.isdir(output_dir):
@@ -125,11 +130,11 @@ if __name__ == '__main__':
toplevel= os.path.commonprefix([root_dir, chrome_src])
if not os.path.exists(toplevel):
toplevel = os.path.join(toplevel, os.pardir)
- args.extend(["--toplevel-dir=" + toplevel])
+ args.extend(["--toplevel-dir=" + purifyGypVarPath(toplevel)])
# Chromium specific Hack: for Chromium to build, the depth has to be set to the chromium src dir.
- args.extend(["--depth=" + chrome_src])
- args.extend(['-D', 'qtwebengine_root=' + qtwebengine_root])
- args.extend(['-D', 'chromium_src_dir=' + chrome_src])
+ args.extend(["--depth=" + purifyGypVarPath(chrome_src)])
+ args.extend(['-D', 'qtwebengine_root=' + purifyGypVarPath(qtwebengine_root)])
+ args.extend(['-D', 'chromium_src_dir=' + purifyGypVarPath(chrome_src)])
# linux_use_bundled_gold currently relies on a hardcoded relative path from chromium/src/out/(Release|Debug)
# Disable it along with the -Wl,--threads flag just in case gold isn't installed on the system.