windows: use jom instead of nmake to build openssl if available

jom (https://wiki.qt.io/Jom) is a parallel version of nmake that
especially helps with building openssl since everything is compiled
individually/the compiler cannot use parallelism either.
Also in a LibreOffice build there's not much else that can be done in
parallel/other stuff requires openssl to be built to continue.

Change-Id: Ib16b0f947991a1d3255aeae7dc5d9bdee0b157a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177743
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier 2024-12-03 16:38:49 +01:00
parent 16b2cae80e
commit c3ed6e5a2c
3 changed files with 19 additions and 1 deletions

View file

@ -383,6 +383,7 @@ export JDK_FOR_BUILD=@JDK_FOR_BUILD@
export JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=@JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD@
export JFREEREPORT_JAR=@JFREEREPORT_JAR@
export JITC_PROCESSOR_TYPE=@JITC_PROCESSOR_TYPE@
JOM=@JOM@
export JQ=@JQ@
export JVM_ONE_PATH_CHECK=@JVM_ONE_PATH_CHECK@
export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@

View file

@ -15646,6 +15646,22 @@ else
fi
AC_SUBST(KEEP_AWAKE_CMD)
dnl =========================================
dnl Check for Jom (parallel nmake)
dnl =========================================
if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for jom (parallel nmake)])
AC_PATH_PROG([JOM], [jom.exe])
if test -z "$JOM"; then
AC_MSG_NOTICE([jom can help accelerate your build, but is completely optional. Get it from https://wiki.qt.io/Jom])
AC_MSG_NOTICE([and put it in PATH or add JOM=/unix/style/path/to/jom.exe to your autogen.input to use it])
else
PathFormat "$JOM"
JOM="$formatted_path"
fi
AC_SUBST(JOM)
fi
dnl ===================================================================
dnl Setting up the environment.
dnl ===================================================================

View file

@ -64,11 +64,12 @@ $(eval $(call gb_ExternalProject_use_nmake,openssl,build))
$(call gb_ExternalProject_get_state_target,openssl,build): export PERL:=$(if $(MSYSTEM),$(STRAWBERRY_PERL),$(shell cygpath -m $(PERL)))
# PARALLELISM_OPTION might be -j 16 -l 24, for jom ignore the load limit/only use the job limit
$(call gb_ExternalProject_get_state_target,openssl,build):
$(call gb_Trace_StartRange,openssl,EXTERNAL)
$(call gb_ExternalProject_run,build,\
CONFIGURE_INSIST=1 $(PERL) Configure $(OPENSSL_PLATFORM) no-tests no-multilib \
&& nmake -f makefile \
&& $(if $(JOM),$(JOM) $(wordlist 1,2,$(PARALLELISM_OPTION)),nmake) -f makefile \
$(if $(call gb_Module__symbols_enabled,openssl),DEBUG_FLAGS_VALUE="$(gb_DEBUGINFO_FLAGS)") \
)
$(call gb_Trace_EndRange,openssl,EXTERNAL)