Fix gn gen after vcvarsall.bat
If you are using a locally installed toolchain
(DEPOT_TOOLS_WIN_TOOLCHAIN=0) then the behavior of gn gen depended on
whether you had run vcvarsall.bat before running gn gen. That is because
vcvarsall.bat appends to several environment variables, these appended
values are captured by setup_toolchain.py, so running vcvarsall.bat
affects the command line of commands generated by gn gen.
This fixes that by clearing INCLUDE, LIB, and LIBPATH so that gn gen is
hermetic. This was tested with VS 2019.
Commit-Queue: Dirk Pranke <firstname.lastname@example.org>
Auto-Submit: Bruce Dawson <email@example.com>
Reviewed-by: Dirk Pranke <firstname.lastname@example.org>
1 file changed