New patch, minor updates to copyright year and de-duplicating the macro code a 
bit.

Thanks,

-Andrew

-----Original Message-----
From: build-dev <[email protected]> On Behalf Of Andrew Luo
Sent: Friday, January 4, 2019 8:41 PM
To: [email protected]
Subject: [PATCH] Fix hotspot-ide-project target on WSL

Subject line is self-explanatory, and patch is attached :)

Basically, I changed the makefiles to add support for wslpath to convert paths 
(when in WSL, of course.  Otherwise it's cygpath).  For executables we call 
%windir%\Sysnative\wsl.exe ... (We have to use Sysnative because of WoW64 
redirection of System32).

Thanks,

-Andrew
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, 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
@@ -729,6 +729,7 @@
 RC:=@FIXPATH@ @RC@
 DUMPBIN:=@FIXPATH@ @DUMPBIN@
 CYGPATH:=@CYGPATH@
+WSLPATH:=@WSLPATH@
 LDD:=@LDD@
 OTOOL:=@OTOOL@
 READELF:=@READELF@
diff --git a/make/hotspot/ide/CreateVSProject.gmk 
b/make/hotspot/ide/CreateVSProject.gmk
--- a/make/hotspot/ide/CreateVSProject.gmk
+++ b/make/hotspot/ide/CreateVSProject.gmk
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, 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
@@ -46,8 +46,17 @@
 
   # Helper macro to convert a unix path to a Windows path, suitable for
   # inclusion in a command line.
-  FixPath = \
-    $(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
+  ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
+    FixPath = \
+      $(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
+    FixLinuxExecutable = \
+      $(call FixPath, $1)
+  else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.wsl)
+    FixPath = \
+      $(strip $(subst \,\\,$(shell $(WSLPATH) -w $1)))
+    FixLinuxExecutable = \
+      "%windir%\Sysnative\wsl.exe $1"
+  endif
 
   JVM_DEFINES_client := $(patsubst -D%,%, $(filter -D%, $(JVM_CFLAGS)))
   EXTRACTED_DEFINES_client := $(addprefix -define , $(JVM_DEFINES_client))
@@ -121,7 +130,7 @@
       -platformName x64 \
       -buildBase $(call FixPath, $(IDE_OUTPUTDIR)/vs-output) \
       -buildSpace $(call FixPath, $(IDE_OUTPUTDIR)) \
-      -makeBinary $(call FixPath, $(MAKE)) \
+      -makeBinary $(call FixLinuxExecutable, $(MAKE)) \
       -makeOutput $(call FixPath, $(JDK_OUTPUTDIR)/bin/server) \
       -absoluteInclude $(call FixPath, 
$(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \
       -absoluteSrcInclude $(call FixPath, 
$(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \

Reply via email to