summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-19 15:25:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-19 15:25:35 (GMT)
commitc5a232b9f953492bfdbce26efb16fa279335a7e5 (patch)
tree6287b83fb2da815ba2a085c6a55fde74e896ca52 /win/makefile.vc
parente98db3a11856540e4e8e222fdb2fb6a0d16e8480 (diff)
parent74cd974b89d05dd8159d85d730e6aadaa34b3e27 (diff)
downloadtcl-c5a232b9f953492bfdbce26efb16fa279335a7e5.zip
tcl-c5a232b9f953492bfdbce26efb16fa279335a7e5.tar.gz
tcl-c5a232b9f953492bfdbce26efb16fa279335a7e5.tar.bz2
Fix [00189c4afcb9e2586301d711f71383e48817a72d|00189c4afc]: Allow semi-static UCRT build on Windows with VC 14.0
Diffstat (limited to 'win/makefile.vc')
-rw-r--r--win/makefile.vc22
1 files changed, 20 insertions, 2 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index be05e73..4a19d89 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -71,7 +71,7 @@ the build instructions.
# Sets where to install Tcl from the built binaries.
# C:\Progra~1\Tcl is assumed when not specified.
#
-# OPTS=loimpact,msvcrt,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,tclalloc,unchecked,none
+# OPTS=loimpact,msvcrt,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,tclalloc,unchecked,ucrt,none
# Sets special options for the core. The default is for none.
# Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
@@ -102,6 +102,11 @@ the build instructions.
# unchecked= Allows a symbols build to not use the debug
# enabled runtime (msvcrt.dll not msvcrtd.dll
# or libcmt.lib not libcmtd.lib).
+# ucrt= Uses ucrt.lib and libvcruntime.lib, which
+# ensures Tcl will run on machines with only the subset
+# of the C runtime that is part of the operating system.
+# If omitted, builds with VC 14.0 or later will require
+# the full C runtime redistributable.
#
# STATS=compdbg,memdbg,none
# Sets optional memory and bytecode compiler debugging code added
@@ -488,7 +493,13 @@ cdebug = -Zi -WX $(DEBUGFLAGS)
cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
-!if $(MSVCRT)
+!if $(UCRT)
+!if $(DEBUG) && !$(UNCHECKED)
+crt = -MDd
+!else
+crt = -MT
+!endif
+!elseif $(MSVCRT)
!if $(DEBUG) && !$(UNCHECKED)
crt = -MDd
!else
@@ -530,6 +541,10 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
lflags = $(lflags) -profile
!endif
+!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED))
+lflags = $(lflags) -nodefaultlib:libucrt.lib
+!endif
+
!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
### Align sections for PE size savings.
lflags = $(lflags) -opt:nowin98
@@ -554,6 +569,9 @@ baselibs = netapi32.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib
baselibs = $(baselibs) bufferoverflowU.lib
!endif
!endif
+!if $(UCRT) && !($(DEBUG) && !$(UNCHECKED))
+baselibs = $(baselibs) ucrt.lib
+!endif
#---------------------------------------------------------------------
# TclTest flags