diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-13 12:57:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-13 12:57:10 (GMT) |
commit | f02bc0048ab115db023a8edef34848cce5f9db43 (patch) | |
tree | f9781177e5a9580181d74f5c1cb2acc4dc4af69d /win | |
parent | db5ec5064a67d11480089bba1753878dc27fbb74 (diff) | |
parent | 8fec7ca75fa3d96629661a474944b728440b97d9 (diff) | |
download | tcl-f02bc0048ab115db023a8edef34848cce5f9db43.zip tcl-f02bc0048ab115db023a8edef34848cce5f9db43.tar.gz tcl-f02bc0048ab115db023a8edef34848cce5f9db43.tar.bz2 |
Allows to compile direct from Visual Studio IDE (prevents throwing error "LNK1561: entry point must be defined" by testing linker). Patch by sebres
Diffstat (limited to 'win')
-rw-r--r-- | win/rules.vc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/win/rules.vc b/win/rules.vc index aa4ed1e..2edaa49 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -188,9 +188,14 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx !endif
!endif
+# Prevents "LNK1561: entry point must be defined" error compiling from VS-IDE:
+!ifndef LINKER_TESTFLAGS
+LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt
+!endif
+
!if "$(MACHINE)" == "IX86"
### test for -align:4096, when align:512 will do.
-!if [nmakehlp -l -opt:nowin98]
+!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)]
!message *** Linker has 'Win98 alignment problem'
ALIGN98_HACK = 1
!else
@@ -203,7 +208,7 @@ ALIGN98_HACK = 0 LINKERFLAGS =
-!if [nmakehlp -l -ltcg]
+!if [nmakehlp -l -ltcg $(LINKER_TESTFLAGS)]
LINKERFLAGS =-ltcg
!endif
@@ -412,7 +417,7 @@ TCL_NO_DEPRECATED = 0 !if [nmakehlp -f $(CHECKS) "fullwarn"]
!message *** Doing full warnings check
WARNINGS = -W4
-!if [nmakehlp -l -warn:3]
+!if [nmakehlp -l -warn:3 $(LINKER_TESTFLAGS)]
LINKERFLAGS = $(LINKERFLAGS) -warn:3
!endif
!else
@@ -425,7 +430,7 @@ WARNINGS = $(WARNINGS) -Wp64 !endif
!if $(PGO) > 1
-!if [nmakehlp -l -ltcg:pgoptimize]
+!if [nmakehlp -l -ltcg:pgoptimize $(LINKER_TESTFLAGS)]
LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize
!else
MSG=^
@@ -433,7 +438,7 @@ This compiler does not support profile guided optimization. !error $(MSG)
!endif
!elseif $(PGO) > 0
-!if [nmakehlp -l -ltcg:pginstrument]
+!if [nmakehlp -l -ltcg:pginstrument $(LINKER_TESTFLAGS)]
LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument
!else
MSG=^
|