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

commit 212700b78818c0bd670f6366dc5c6a7461080f97
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon May 13 17:26:21 2024 +0100

    Enable hybrid CRT build
---
 src/changes/changes.xml                 | 3 +++
 src/native/windows/include/Makefile.inc | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9c203cb..8445ffa 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,9 @@
         [StepSecurity] ci: Harden GitHub Actions #95.
       </action>
       <!-- Add -->
+      <action type="add" dev="markt">
+        Add support for hybrid CRT builds.
+      </action>
       <!-- Updates -->
       <action type="update" dev="ggregory" due-to="Dependabot">
         Bump commons-parent from 57 to 69 #155.
diff --git a/src/native/windows/include/Makefile.inc 
b/src/native/windows/include/Makefile.inc
index addca0f..1e7ebc0 100644
--- a/src/native/windows/include/Makefile.inc
+++ b/src/native/windows/include/Makefile.inc
@@ -42,6 +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
 #
 # Compiler tools environment variables:
 #                 CC        C compiler  (defaults to cl.exe)
@@ -227,6 +228,9 @@ COMMON_LFLAGS = /NOLOGO
 OPT_LFLAGS = /INCREMENTAL:NO /DEBUG
 !IF "$(BUILD)" == "RELEASE"
 OPT_LFLAGS = $(OPT_LFLAGS) /OPT:REF
+!IF DEFINED(STATIC_CRT) && "$(STATIC_CRT)" == "Hybrid"
+OPT_LFLAGS = $(OPT_LFLAGS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
+!ENDIF
 !ENDIF
 
 !IF "$(TARGET)" == "EXE"

Reply via email to