diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-20 14:14:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-20 14:14:56 (GMT) |
commit | 3d7f0e8d7cfffce49958bacc775d06908a769dd6 (patch) | |
tree | 83ef73c694d672de3a86e1ded41abace94724f73 /win/makefile.vc | |
parent | 4660929af627a46789752dc4856f013ed2b5653a (diff) | |
parent | 1fd576b1cecb84450f2ae58edd48d66fe871c773 (diff) | |
download | tk-3d7f0e8d7cfffce49958bacc775d06908a769dd6.zip tk-3d7f0e8d7cfffce49958bacc775d06908a769dd6.tar.gz tk-3d7f0e8d7cfffce49958bacc775d06908a769dd6.tar.bz2 |
Fix [http://core.tcl.tk/tcl/info/00189c4afcb9e2586301d711f71383e48817a72d|00189c4afc]: Allow semi-static UCRT build on Windows with VC 14.0
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index b8a05f8..1a80dbc 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -76,7 +76,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,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,none
+# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,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.
@@ -105,6 +105,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
@@ -460,7 +465,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
@@ -500,6 +511,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
@@ -526,6 +541,11 @@ 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
+
guilibs = $(baselibs) gdi32.lib
|