summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml50
-rw-r--r--win/makefile.vc37
-rw-r--r--win/rules.vc15
3 files changed, 73 insertions, 29 deletions
diff --git a/.travis.yml b/.travis.yml
index 30a7bf0..9fa6f1f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -175,7 +175,7 @@ matrix:
- gcc-multilib
env:
- BUILD_DIR=win
- - CFGOPT="--host=i686-w64-mingw32"
+ - CFGOPT=--host=i686-w64-mingw32
script: *crosstest
# Test on Windows with MSVC native
- name: "Windows/MSVC/Shared"
@@ -189,8 +189,17 @@ matrix:
- cd ${BUILD_DIR}
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=msvcrt -f makefile.vc all tcltest'
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=msvcrt -f makefile.vc test'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc test'
+ - name: "Windows/MSVC/Shared: UTF_MAX=4"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=utfmax -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=utfmax -f makefile.vc test'
- name: "Windows/MSVC/Static"
os: windows
compiler: cl
@@ -207,8 +216,8 @@ matrix:
before_install: *vcpreinst
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,msvcrt -f makefile.vc all tcltest'
- - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,msvcrt -f makefile.vc test'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc test'
# Test on Windows with MSVC native (32-bit)
- name: "Windows/MSVC-x86/Shared"
os: windows
@@ -217,8 +226,17 @@ matrix:
before_install: *vcpreinst
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=msvcrt -f makefile.vc all tcltest'
- - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=msvcrt -f makefile.vc test'
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake -f makefile.vc test'
+ - name: "Windows/MSVC-x86/Shared: UTF_MAX=4"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=utfmax -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=utfmax -f makefile.vc test'
- name: "Windows/MSVC-x86/Static"
os: windows
compiler: cl
@@ -235,8 +253,8 @@ matrix:
before_install: *vcpreinst
install: []
script:
- - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols,msvcrt -f makefile.vc all tcltest'
- - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols,msvcrt -f makefile.vc test'
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols -f makefile.vc test'
# Test on Windows with GCC native
- name: "Windows/GCC/Shared"
os: windows
@@ -247,6 +265,13 @@ matrix:
before_install: &makepreinst
- choco install make
- cd ${BUILD_DIR}
+ - name: "Windows/GCC/Shared: UTF_MAX=4"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=4"
+ before_install: *makepreinst
- name: "Windows/GCC/Static"
os: windows
compiler: gcc
@@ -268,6 +293,13 @@ matrix:
env:
- BUILD_DIR=win
before_install: *makepreinst
+ - name: "Windows/GCC-x86/Shared: UTF_MAX=4"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="CFLAGS=-DTCL_UTF_MAX=4"
+ before_install: *makepreinst
- name: "Windows/GCC-x86/Static"
os: windows
compiler: gcc
diff --git a/win/makefile.vc b/win/makefile.vc
index 26f7da3..e337569 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -52,29 +52,32 @@
# turn on the 64-bit compiler, if your SDK has it.
#
# Basic macros and options usable on the commandline (see rules.vc for more info):
-# OPTS=msvcrt,static,staticpkg,symbols,nothreads,profile,unchecked,time64bit,none
+# OPTS=msvcrt,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,time64bit,unchecked,utfmax,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.
#
-# msvcrt = Affects the static option only to switch it from
-# using libcmt(d) as the C runtime [by default] to
-# msvcrt(d). This is useful for static embedding
-# support.
-# static = Builds a static library of the core instead of a
-# dll. The shell will be static (and large), as well.
-# staticpkg= Affects the static option only to switch
-# tclshXX.exe to have the dde and reg extension linked
-# inside it.
-# nothreads = Turns off full multithreading support (default on).
+# msvcrt = Affects the static option only to switch it from
+# using libcmt(d) as the C runtime [by default] to
+# msvcrt(d). This is useful for static embedding
+# support.
+# nothreads = Turns off full multithreading support (default on).
+# pbds = Produce separate debug symbol files.
+# profile = Adds profiling hooks. Map file is assumed.
+# static = Builds a static library of the core instead of a
+# dll. The shell will be static (and large), as well.
+# staticpkg = Affects the static option only to switch
+# tclshXX.exe to have the dde and reg extension linked
+# inside it.
+# symbols = Adds symbols for step debugging.
# thrdalloc = Use the thread allocator (shared global free pool).
-# symbols = Adds symbols for step debugging.
-# profile = Adds profiling hooks. Map file is assumed.
-# unchecked = Allows a symbols build to not use the debug
-# enabled runtime (msvcrt.dll not msvcrtd.dll
-# or libcmt.lib not libcmtd.lib).
# time64bit = Forces a build using 64-bit time_t for 32-bit build
-# (CRT library should support this).
+# (CRT library should support this).
+# unchecked = Allows a symbols build to not use the debug
+# enabled runtime (msvcrt.dll not msvcrtd.dll
+# or libcmt.lib not libcmtd.lib).
+# utfmax = Forces a build allowing 4-byte UTF-8 sequences
+# internally.
#
# STATS=compdbg,memdbg,none
# Sets optional memory and bytecode compiler debugging code added
diff --git a/win/rules.vc b/win/rules.vc
index 8050ed3..c0deb2a 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -686,6 +686,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# configuration (ignored for Tcl itself)
# _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
# (CRT library should support this)
+# TCL_UTF_MAX=4 - forces a build allowing 4-byte UTF-8 sequences internally.
# Further, LINKERFLAGS are modified based on above.
# Default values for all the above
@@ -750,7 +751,7 @@ TCL_USE_STATIC_PACKAGES = 0
TCL_THREADS = 0
USE_THREAD_ALLOC= 0
!else
-TCL_THREADS = 1
+TCL_THREADS = 1
USE_THREAD_ALLOC= 1
!endif
@@ -759,6 +760,11 @@ USE_THREAD_ALLOC= 1
_USE_64BIT_TIME_T = 1
!endif
+!if [nmakehlp -f $(OPTS) "utfmax"]
+!message *** Force allowing 4-byte UTF-8 sequences internally
+TCL_UTF_MAX = 4
+!endif
+
# Yes, it's weird that the "symbols" option controls DEBUG and
# the "pdbs" option controls SYMBOLS. That's historical.
!if [nmakehlp -f $(OPTS) "symbols"]
@@ -1346,11 +1352,14 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_PROFILED
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
!endif
!if $(VCVERSION) < 1300
-OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64
+OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64=1
!endif
!if "$(_USE_64BIT_TIME_T)" == "1"
-OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T
+OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
+!endif
+!if "$(TCL_UTF_MAX)" == "4"
+OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=4
!endif
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP