diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-12 11:49:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-12 11:49:53 (GMT) |
commit | fcdb9b937d46cb127318a77be883fb3f6844d643 (patch) | |
tree | e552b4ab20131487703663e50fb31f1b85822ff9 /win | |
parent | 740a200b9184c6f999d0dfdc8e78e8009c01bd7c (diff) | |
parent | d80bd759964215327fa921af3dcc3da894d2ecb3 (diff) | |
download | tcl-fcdb9b937d46cb127318a77be883fb3f6844d643.zip tcl-fcdb9b937d46cb127318a77be883fb3f6844d643.tar.gz tcl-fcdb9b937d46cb127318a77be883fb3f6844d643.tar.bz2 |
Merge 8.6
Diffstat (limited to 'win')
-rw-r--r-- | win/README | 7 | ||||
-rw-r--r-- | win/rules.vc | 11 |
2 files changed, 15 insertions, 3 deletions
@@ -56,6 +56,13 @@ using it, are in the comments of "makefile.vc". A quick example would be: There is also a Developer Studio workspace and project file, too, if you would like to use them. +If you want to Cross-compile with Visual Studio (e.g. for X86 or ARM64 +targets, but running on AMD64), first set up the environment for +your host machine and compile nmakehlp.exe: + C:\tcl_source\win\>nmake -f makefile.vc nmakehlp +Then go to your cross-compile environment and run the nmake +command again for whatever you want to build. + If you are building with Linux, Cygwin or Msys, you can use the configure script that lives in the win subdirectory. The Linux/Cygwin/Msys based configure/build process works just like the UNIX one, so you will want diff --git a/win/rules.vc b/win/rules.vc index 2f01de0..b68b6b4 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -548,10 +548,15 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c !endif # NMAKEHLPC
+nmakehlp:
+ $(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console
+
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
+!if "$(MACHINE)" == "$(NATIVE_ARCH)"
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
+!endif
################################################################
# 5. Test for compiler features
@@ -1379,7 +1384,7 @@ OPTDEFINES = $(OPTDEFINES) /DUSE_THREAD_ALLOC=1 OPTDEFINES = $(OPTDEFINES) /DSTATIC_BUILD
!elseif $(TCL_VERSION) > 86
OPTDEFINES = $(OPTDEFINES) /DTCL_WITH_EXTERNAL_TOMMATH
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
OPTDEFINES = $(OPTDEFINES) /DMP_64BIT
!endif
!endif
@@ -1407,7 +1412,7 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_OPTIMIZED !if $(PROFILE)
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_PROFILED
!endif
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
!endif
!if $(VCVERSION) < 1300
@@ -1469,7 +1474,7 @@ cdebug = $(cdebug) -Zi # cwarn includes default warning levels.
cwarn = $(WARNINGS)
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
# Disable pointer<->int warnings related to cast between different sizes
# There are a gadzillion of these due to use of ClientData and
# clutter up compiler
|