RFR: JDK-8245033 Fixes for building in WSL
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu May 14 14:45:20 UTC 2020
Here's a bunch of minor fixes to improve developer experience when
building on WSL.
The fixes include:
* Now the FixPath macro works for WSL.
* TestImage.gmk tried to use FIXPATH for /bin/echo, does not work on WSL
* Use -t drvfs option to df to properly detect a suitable local disk
to build on on WSL
* UTIL_PATH_PROGS for cmd.exe had syntax errors and did not work properly
* Allow for tools to have a required .exe suffix (as for Windows-based
tools on WSL)
* The WSLENV=PATH/l conversion makes WSL produce noisy output at
times. Suppress this by clearing out the PATH when not needed before
calling Windows-based tools.
* Make the VC_VARS extraction less noisy by redirecting output to a
log file
* The "AR" tool (i.e. lib.exe on Windows) was not passed the ARFLAGS,
which included the /nologo. As a result, all calls to lib.exe produced a
large version banner.
* Fix JIB configuration to match the fact that "cross-compilation" on
WSL do not use the cross-compilation names for packages.
I have tested this on WSL1 and Cygwin (to verify that there is no
regressions). WSL2 is scheduled for public release later in May, and I
intend to make sure the build works as well with both WSL1 and WSL2 when
that happens. (For now, I have not opted to test pre-release versions on
my Windows machine.)
Bug: https://bugs.openjdk.java.net/browse/JDK-8245033
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8245033-fix-building-on-WSL/webrev.01
/Magnus
More information about the build-dev
mailing list