Skip to content

Commit 4368d5c

Browse files
committed
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)
1 parent 086eb87 commit 4368d5c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Make_mvc.mak

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,9 @@ LINK_PDB = /PDB:$(VIM).pdb -debug
11581158
# CFLAGS with /Fo$(OUTDIR)/
11591159
CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
11601160

1161-
conflags = /nologo /subsystem:$(SUBSYSTEM)
1161+
# Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
1162+
# added.
1163+
conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
11621164

11631165
PATHDEF_SRC = $(OUTDIR)\pathdef.c
11641166

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ static char *(features[]) =
766766

767767
static int included_patches[] =
768768
{ /* Add new patch number below this line */
769+
/**/
770+
1646,
769771
/**/
770772
1645,
771773
/**/

0 commit comments

Comments
 (0)