This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new b9f60a6 Build binaries for Windows using static hybrid CRT strategy
by default
b9f60a6 is described below
commit b9f60a6e3cdc1b003da80330875ca522cfd4d572
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Dec 11 11:13:39 2025 +0000
Build binaries for Windows using static hybrid CRT strategy by default
---
src/changes/changes.xml | 4 ++++
src/native/windows/README.txt | 9 +++++----
src/native/windows/include/Makefile.inc | 6 +++---
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 772eaa3..7c8573e 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -41,7 +41,11 @@
</properties>
<body>
<release version="1.5.1" date="TBD" description="Bug fix release">
+ <!-- FIX -->
<action type="fix" dev="markt">jsvc. Fix compilation warnings.</action>
+ <!-- ADD -->
+ <action type="add" dev="markt">Procun. Build binaries for Windows using
the static hybrid CRT strategy by default.</action>
+ <!-- UPDATE -->
</release>
<release version="1.5.0" date="2025-11-26" description="This is a
maintenance release. Java 8 or later is required.">
<!-- FIX -->
diff --git a/src/native/windows/README.txt b/src/native/windows/README.txt
index 13a6dc7..33eadac 100644
--- a/src/native/windows/README.txt
+++ b/src/native/windows/README.txt
@@ -38,16 +38,17 @@ places the binary in the correct location for a release
build):
nmake CPU=X86 PREFIX=c:\desired\path\of\daemon install
-Use the 'Hybrid CRT' technique so the resulting binaries work on a clean
Windows
-installation with no additional dependencies:
+To disable the 'Static Hybrid CRT' build strategy and prevent the the resulting
+binaries from working on a clean Windows installation with no additional
+dependencies:
- nmake CPU=X86 STATIC_CRT=Hybrid
+ nmake CPU=X86 NO_STATIC_CRT=true
Release Builds
==============
-Release builds must use STATIC_CRT=Hybrid.
+Release builds must not disable the static hybrid CRT build strategy.
It is not necessary to build a 64-bit version of prunmgr since the 32-bit
version works with both 32-bit and 64-bit services.
diff --git a/src/native/windows/include/Makefile.inc
b/src/native/windows/include/Makefile.inc
index 875bb4e..0ccd0b8 100644
--- a/src/native/windows/include/Makefile.inc
+++ b/src/native/windows/include/Makefile.inc
@@ -42,7 +42,7 @@
# EXTRA_LIBS Added to the common LIBS
# EXTRA_LFLAGS Added to the common LFLAGS
# EXTRA_RCFLAGS Added to the common RCFLAGS
-# STATIC_CRT Enables a hybrid CRT technique
+# NO_STATIC_CRT Disables the static hybrid CRT build strategy
#
# Compiler tools environment variables:
# CC C compiler (defaults to cl.exe)
@@ -185,7 +185,7 @@ OPT_CFLAGS = -O2 -Ob2 -Zi -DNDEBUG -guard:cf
OPT_CFLAGS = -Od -Zi -DDEBUG -D_DEBUG
!ENDIF
-!IF DEFINED(STATIC_CRT)
+!IF !DEFINED(NO_STATIC_CRT)
CRT_CFLAGS = -D_MT -MT
!ELSE
CRT_CFLAGS = -D_MT -MD
@@ -228,7 +228,7 @@ COMMON_LFLAGS = /NOLOGO
OPT_LFLAGS = /INCREMENTAL:NO /DEBUG
!IF "$(BUILD)" == "RELEASE"
OPT_LFLAGS = $(OPT_LFLAGS) /OPT:REF /guard:cf
-!IF DEFINED(STATIC_CRT) && "$(STATIC_CRT)" == "Hybrid"
+!IF !DEFINED(NO_STATIC_CRT)
OPT_LFLAGS = $(OPT_LFLAGS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
!ENDIF
!ENDIF