diff -r 01cc48ed67f3 -r 20daa32eec6f common/autoconf/toolchain.m4 --- a/common/autoconf/toolchain.m4 Wed May 16 15:52:51 2018 -0700 +++ b/common/autoconf/toolchain.m4 Mon May 21 06:54:25 2018 -0700 @@ -217,11 +217,15 @@ ORG_CXXFLAGS="$CXXFLAGS" ORG_OBJCFLAGS="$OBJCFLAGS" + # autoconf magic only relies on PATH, so update it if tools dir is specified + OLD_PATH="$PATH" + # On Windows, we need to detect the visual studio installation first. # This will change the PATH, but we need to keep that new PATH even # after toolchain detection is done, since the compiler (on x86) uses # it for DLL resolution in runtime. - if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then + 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. @@ -231,9 +235,6 @@ export LIB="$VS_LIB" fi - # autoconf magic only relies on PATH, so update it if tools dir is specified - OLD_PATH="$PATH" - # Before we locate the compilers, we need to sanitize the Xcode build environment if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then # determine path to Xcode developer directory