Skip to content

Commit b9f60a6

Browse files
committed
Build binaries for Windows using static hybrid CRT strategy by default
1 parent 40d38a2 commit b9f60a6

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/changes/changes.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
</properties>
4242
<body>
4343
<release version="1.5.1" date="TBD" description="Bug fix release">
44+
<!-- FIX -->
4445
<action type="fix" dev="markt">jsvc. Fix compilation warnings.</action>
46+
<!-- ADD -->
47+
<action type="add" dev="markt">Procun. Build binaries for Windows using the static hybrid CRT strategy by default.</action>
48+
<!-- UPDATE -->
4549
</release>
4650
<release version="1.5.0" date="2025-11-26" description="This is a maintenance release. Java 8 or later is required.">
4751
<!-- FIX -->

src/native/windows/README.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@ places the binary in the correct location for a release build):
3838

3939
nmake CPU=X86 PREFIX=c:\desired\path\of\daemon install
4040

41-
Use the 'Hybrid CRT' technique so the resulting binaries work on a clean Windows
42-
installation with no additional dependencies:
41+
To disable the 'Static Hybrid CRT' build strategy and prevent the the resulting
42+
binaries from working on a clean Windows installation with no additional
43+
dependencies:
4344

44-
nmake CPU=X86 STATIC_CRT=Hybrid
45+
nmake CPU=X86 NO_STATIC_CRT=true
4546

4647

4748
Release Builds
4849
==============
4950

50-
Release builds must use STATIC_CRT=Hybrid.
51+
Release builds must not disable the static hybrid CRT build strategy.
5152

5253
It is not necessary to build a 64-bit version of prunmgr since the 32-bit
5354
version works with both 32-bit and 64-bit services.

src/native/windows/include/Makefile.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# EXTRA_LIBS Added to the common LIBS
4343
# EXTRA_LFLAGS Added to the common LFLAGS
4444
# EXTRA_RCFLAGS Added to the common RCFLAGS
45-
# STATIC_CRT Enables a hybrid CRT technique
45+
# NO_STATIC_CRT Disables the static hybrid CRT build strategy
4646
#
4747
# Compiler tools environment variables:
4848
# CC C compiler (defaults to cl.exe)
@@ -185,7 +185,7 @@ OPT_CFLAGS = -O2 -Ob2 -Zi -DNDEBUG -guard:cf
185185
OPT_CFLAGS = -Od -Zi -DDEBUG -D_DEBUG
186186
!ENDIF
187187

188-
!IF DEFINED(STATIC_CRT)
188+
!IF !DEFINED(NO_STATIC_CRT)
189189
CRT_CFLAGS = -D_MT -MT
190190
!ELSE
191191
CRT_CFLAGS = -D_MT -MD
@@ -228,7 +228,7 @@ COMMON_LFLAGS = /NOLOGO
228228
OPT_LFLAGS = /INCREMENTAL:NO /DEBUG
229229
!IF "$(BUILD)" == "RELEASE"
230230
OPT_LFLAGS = $(OPT_LFLAGS) /OPT:REF /guard:cf
231-
!IF DEFINED(STATIC_CRT) && "$(STATIC_CRT)" == "Hybrid"
231+
!IF !DEFINED(NO_STATIC_CRT)
232232
OPT_LFLAGS = $(OPT_LFLAGS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
233233
!ENDIF
234234
!ENDIF

0 commit comments

Comments
 (0)