common/autoconf/toolchain.m4
changeset 23429 fe4f0848a307
parent 23428 3c8a05bf4656
child 24911 a039e17f8896
--- a/common/autoconf/toolchain.m4	Fri Mar 28 14:59:56 2014 +0100
+++ b/common/autoconf/toolchain.m4	Mon Mar 31 22:30:11 2014 +0200
@@ -189,6 +189,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