diff -r ddf2d8bf87c0 -r feba63b3fa36 common/autoconf/toolchain.m4 --- a/common/autoconf/toolchain.m4 Thu Apr 05 08:14:51 2018 -0700 +++ b/common/autoconf/toolchain.m4 Fri Apr 06 04:13:09 2018 -0700 @@ -223,6 +223,12 @@ # it for DLL resolution in runtime. if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV + # Reset path to VS_PATH. It will include everything that was on PATH at the time we + # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV. + PATH="$VS_PATH" + # The microsoft toolchain also requires INCLUDE and LIB to be set. + export INCLUDE="$VS_INCLUDE" + export LIB="$VS_LIB" fi # autoconf magic only relies on PATH, so update it if tools dir is specified