From eba46fc12ea53534f0e68f92c3ffd7f7e5ff90f0 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Wed, 19 Dec 2018 21:50:35 +0000 Subject: [PATCH] Improve error message when a toolchain can't be found When non-Googlers try to build Chromium for the first time they get an error saying: Please follow the instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md However those instructions are quite long and it's not obvious to some users which part of the instructions they have forgotten. The most likely is that they didn't set DEPOT_TOOLS_WIN_TOOLCHAIN=0, so this changes the error message to suggest that directly. Auto-detecting the correct state for DEPOT_TOOLS_WIN_TOOLCHAIN was tried in crrev.com/c/1374833 but deemed impractical. Bug: 907300, angleproject:2712 Change-Id: I45a9f59babe90bbe2137d49c555884d7bbbcf170 Reviewed-on: https://chromium-review.googlesource.com/c/1382942 Reviewed-by: Dirk Pranke Commit-Queue: Bruce Dawson --- win_toolchain/get_toolchain_if_necessary.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py index 4d10840c0..b3365e6fe 100755 --- a/win_toolchain/get_toolchain_if_necessary.py +++ b/win_toolchain/get_toolchain_if_necessary.py @@ -509,10 +509,15 @@ def main(): if sys.platform not in ('win32', 'cygwin'): doc = 'https://chromium.googlesource.com/chromium/src/+/master/docs/' \ 'win_cross.md' + print('\n\n\nPlease follow the instructions at %s\n\n' % doc) else: doc = 'https://chromium.googlesource.com/chromium/src/+/master/docs/' \ 'windows_build_instructions.md' - print('\n\n\nPlease follow the instructions at %s\n\n' % doc) + print('\n\n\nNo downloadable toolchain found. In order to use your ' + 'locally installed version of Visual Studio to build Chrome ' + 'please set DEPOT_TOOLS_WIN_TOOLCHAIN=0.\n' + 'For details search for DEPOT_TOOLS_WIN_TOOLCHAIN in the ' + 'instructions at %s\n\n' % doc) return 1 print('Windows toolchain out of date or doesn\'t exist, updating (Pro)...') print(' current_hashes: %s' % ', '.join(current_hashes))