Skip to content

Commit 8317581

Browse files
Andrew Leonardpull[bot]
Andrew Leonard
authored andcommitted
8317601: Windows build on WSL broken after JDK-8317340
Reviewed-by: djelinski, erikj
1 parent 91aac10 commit 8317581

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,15 +844,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
844844
]
845845
)
846846
if test "x$FILE_MACRO_CFLAGS" != x; then
847-
# Add -pathmap for all VS system include paths using Windows
848-
# full Long path name that is generated by the compiler
847+
# Add -pathmap for all VS system include paths using Windows
848+
# full Long path name that is generated by the compiler
849+
# Not enabled under WSL as there is no easy way to obtain the
850+
# Windows full long paths, thus reproducible WSL builds will
851+
# depend on building with the same VS toolchain install location.
852+
if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1" && test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl2"; then
849853
for ipath in ${$3SYSROOT_CFLAGS}; do
850854
if test "x${ipath:0:2}" == "x-I"; then
851855
ipath_path=${ipath#"-I"}
852856
UTIL_FIXUP_WIN_LONG_PATH(ipath_path)
853857
FILE_MACRO_CFLAGS="$FILE_MACRO_CFLAGS -pathmap:\"$ipath_path\"=vsi"
854858
fi
855859
done
860+
fi
856861
fi
857862
fi
858863

make/autoconf/util_paths.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
120120

121121
##############################################################################
122122
# Fixup path to be a Windows full long path
123+
# Note: Only supported with cygwin/msys2 (cygpath tool)
123124
AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
124125
[
125126
# Only process if variable expands to non-empty

0 commit comments

Comments
 (0)