Skip to content
Permalink
Browse files
8277370: configure script cannot distinguish WSL version
Reviewed-by: erikj
  • Loading branch information
YaSuenag committed Nov 19, 2021
1 parent a3406a1 commit 2d4af2255feb2eaeca533424f8cba3ec0945d757
Showing 1 changed file with 5 additions and 4 deletions.
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -34,9 +34,10 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
OPENJDK_BUILD_OS_ENV=windows.wsl1
else
# This test is not guaranteed, but there is no documented way of
# distinguishing between WSL1 and WSL2. Assume only WSL2 has WSL_INTEROP
# in /run/WSL
if test -d "/run/WSL" ; then
# distinguishing between WSL1 and WSL2.
# Check whether "Hyper-V" appears in /proc/interrupts because WSL2 runs on Hyper-V.
$GREP -q Hyper-V /proc/interrupts
if test $? -eq 0; then
OPENJDK_BUILD_OS_ENV=windows.wsl2
else
OPENJDK_BUILD_OS_ENV=windows.wsl1

1 comment on commit 2d4af22

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 2d4af22 Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.