RFR: JDK-8035725 Must keep microsoft VS_PATH on PATH after toolchain detection

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Feb 25 11:32:54 UTC 2014

After the toolchain rewrite, we could fail in various ways on Windows 
builds, e.g. like this:
configure: Rewriting OBJDUMP to "/usr/bin/objdump"
configure: error: Target CPU mismatch. We are building for x86 but CL is 
for "directory"; expected "80x86".
configure exiting with result code 1

The reason for this is that we save the PATH, set it to the Visual 
Studio special PATH (and other special PATH tricks on other platforms), 
do the toolchain checking, and then restore the PATH.

However, on Windows, the compiler (for x86 at least) needs to have that 
special PATH at all times, since it is used for dll resolution. So 
without that path, subsequent calls to the compiler will fail.

This fix makes sure we set up the Visual Studio path "permanently" for 
the rest of the configure run, so that we can always run the compiler 
after it has been detected.

This was the behavior before the toolchain cleanup. And, if you're 
curious, we do setup the proper PATH in spec.gmk so that we can run the 
compiler correctly when building. :-)

Bug: https://bugs.openjdk.java.net/browse/JDK-8035725

More information about the build-dev mailing list