patch 8.0.1646: MS-Windows: executable contains unreferenced functions
Problem: MS-Windows: executable contains unreferenced functions and data.
Solution: Add /opt:ref to the compiler command. (Ken Takata)
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index d5159ab..5ca5380 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -1158,7 +1158,9 @@
# CFLAGS with /Fo$(OUTDIR)/
CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
-conflags = /nologo /subsystem:$(SUBSYSTEM)
+# Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
+# added.
+conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
PATHDEF_SRC = $(OUTDIR)\pathdef.c