make/CreateJmods.gmk
changeset 50149 d93ae85b18c1
parent 50142 f348e5d4769b
parent 50073 35b22ca681d1
child 52804 28094715ae71
--- a/make/CreateJmods.gmk	Tue May 15 18:03:31 2018 +0530
+++ b/make/CreateJmods.gmk	Tue May 15 10:13:52 2018 -0700
@@ -121,11 +121,21 @@
   ifeq ($(OPENJDK_TARGET_OS), windows)
     # Only java.base needs to include the MSVC*_DLLs. Make sure no other module
     # tries to include them (typically imported ones).
-    ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCR_DLL))), )
-      JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
+    ifneq ($(MSVCR_DLL), )
+      ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCR_DLL))), )
+        JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
+      endif
     endif
-    ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
-      JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
+    ifneq ($(MSVCP_DLL), )
+      ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
+        JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
+      endif
+    endif
+    ifneq ($(UCRT_DLL_DIR), )
+      UCRT_DLL_FILES := $(notdir $(wildcard $(UCRT_DLL_DIR)/*.dll))
+      ifneq ($(wildcard $(LIBS_DIR)/$(firstword $(UCRT_DLL_FILES))), )
+        JMOD_FLAGS += $(patsubst %, --exclude '%', $(UCRT_DLL_FILES))
+      endif
     endif
   endif
 endif