diff src/Make_mvc.mak @ 13545:88c8fc800bcc v8.0.1646

patch 8.0.1646: MS-Windows: executable contains unreferenced functions commit https://github.com/vim/vim/commit/4368d5ce8a2fa16826d76eeb32347bbbb4fad2bc Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 26 20:55:10 2018 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Mon, 26 Mar 2018 21:00:10 +0200
parents 539436dcb134
children 352c2832d17f
line wrap: on
line diff
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -1158,7 +1158,9 @@ LINK_PDB = /PDB:$(VIM).pdb -debug
 # 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