diff --git a/patch/patch.cfg b/patch/patch.cfg index 8f8aeeae0..e78c331fb 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -381,4 +381,11 @@ patches = [ # https://bitbucket.org/chromiumembedded/cef/issues/2466 'name': 'linux_poll_2466', }, + { + # Fix tools/clang/scripts/update.py failure with custom VS toolchain on + # Windows. This needs to be done in DEPS because it executes during the + # `gclient runhooks` step. + # https://bugs.chromium.org/p/chromium/issues/detail?id=863130 + 'name': 'DEPS', + } ] diff --git a/patch/patches/DEPS.patch b/patch/patches/DEPS.patch new file mode 100644 index 000000000..6346fb3a3 --- /dev/null +++ b/patch/patches/DEPS.patch @@ -0,0 +1,16 @@ +diff --git tools/clang/scripts/update.py tools/clang/scripts/update.py +index 226c3981a3bb..560a58070883 100755 +--- tools/clang/scripts/update.py ++++ tools/clang/scripts/update.py +@@ -392,7 +392,10 @@ def GetWinSDKDir(): + if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))): + dia_path = os.path.join(win_sdk_dir, '..', 'DIA SDK', 'bin', 'amd64') + else: +- vs_path = vs_toolchain.DetectVisualStudioPath() ++ if 'GYP_MSVS_OVERRIDE_PATH' not in os.environ: ++ vs_path = vs_toolchain.DetectVisualStudioPath() ++ else: ++ vs_path = os.environ['GYP_MSVS_OVERRIDE_PATH'] + dia_path = os.path.join(vs_path, 'DIA SDK', 'bin', 'amd64') + + dia_dll = os.path.join(dia_path, DIA_DLL[msvs_version])