make/autoconf/toolchain.m4
branchJDK-8215445-branch
changeset 57082 dc3a6c647672
parent 57075 168830ded68a
--- a/make/autoconf/toolchain.m4	Wed Dec 19 00:50:05 2018 -0800
+++ b/make/autoconf/toolchain.m4	Wed Dec 19 03:35:40 2018 -0800
@@ -331,15 +331,15 @@
       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
     TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
-      # Append VS_PATH
+      # Append VS_PATH. In WSL, VS_PATH will not contain the WSL env path needed
+      # for using basic Unix tools, so need to keep the original PATH.
       BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
       BASIC_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
       export WSLENV
     else
       # Reset path to VS_PATH. It will include everything that was on PATH at the time we
       # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
-      BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
-      AC_MSG_NOTICE(PATH $PATH)
+      PATH="$VS_PATH"
     fi
     # The microsoft toolchain also requires INCLUDE and LIB to be set.
     export INCLUDE="$VS_INCLUDE"