Skip to content

Commit

Permalink
thirdparty/harfbuzz 5.1.0 (#1510)
Browse files Browse the repository at this point in the history
https://github.com/harfbuzz/harfbuzz/releases/tag/5.1.0

Also adds CONSTRAINED_PARALLEL_JOBS for CircleCI.
  • Loading branch information
Frenzie authored Aug 3, 2022
1 parent 4e6caef commit 7fb47e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 10 additions & 0 deletions thirdparty/cmake_modules/koreader_thirdparty_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ if(NOT DEFINED PARALLEL_JOBS)
math(EXPR PARALLEL_JOBS "${PROCESSOR_COUNT}+1")
endif()

if(NOT DEFINED CONSTRAINED_PARALLEL_JOBS)
# Default to ${PROCESSOR_COUNT} instead of ${PROCESSOR_COUNT}+1
set(CONSTRAINED_PARALLEL_JOBS ${PROCESSOR_COUNT})

# Some compilations (like harfbuzz) are known to OOM on memory-constrained CI.
if($ENV{CIRCLECI})
set(CONSTRAINED_PARALLEL_JOBS 1)
endif()
endif()

# $(MAKE) is for recursive make invocations, but evidently when using another
# generator there's no recursion. For us that other generator is ninja, but
# maybe one day also Visual Studio or Xcode…
Expand Down
6 changes: 2 additions & 4 deletions thirdparty/harfbuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if($ENV{ANDROID})
set(CFG_CMD "${CFG_CMD} && ${ISED} 's|soname_spec=.*|soname_spec=\"\\\\\$libname\\\\\$release\\\\\$shared_ext\\\\\$major\"|' libtool")
endif()

set(HB_VER 5.0.1)
set(HB_VER 5.1.0)

ko_write_gitclone_script(
GIT_CLONE_SCRIPT_FILENAME
Expand All @@ -60,8 +60,6 @@ ExternalProject_Add(
BUILD_IN_SOURCE 1
PATCH_COMMAND COMMAND ${PATCH_CMD} COMMAND ${AUTOGEN_CMD}
CONFIGURE_COMMAND ${CFG_CMD}
# Normally we would use -j${PARALLEL_JOBS}, which is ${PROCESSOR_COUNT} + 1.
# But on CircleCI that means 3 instead of 2 and a risk of OOM.
BUILD_COMMAND ${KO_MAKE_RECURSIVE} -j${PROCESSOR_COUNT}
BUILD_COMMAND ${KO_MAKE_RECURSIVE} -j${CONSTRAINED_PARALLEL_JOBS}
INSTALL_COMMAND ${KO_MAKE_RECURSIVE} -j${PARALLEL_JOBS} install
)

0 comments on commit 7fb47e4

Please sign in to comment.