mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
[scripts|world rebuild] Retry 'make install' in non-parallel mode (#27105)
* Retry 'make install' in non-parallel mode * CI [skip actions]
This commit is contained in:
parent
1ece5ec4ad
commit
27b04e77aa
@ -51,6 +51,7 @@ function(vcpkg_build_make)
|
||||
string(REPLACE " " [[\ ]] vcpkg_package_prefix "${CURRENT_PACKAGES_DIR}")
|
||||
string(REGEX REPLACE [[([a-zA-Z]):/]] [[/\1/]] vcpkg_package_prefix "${vcpkg_package_prefix}")
|
||||
vcpkg_list(SET install_opts -j ${VCPKG_CONCURRENCY} --trace -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${vcpkg_package_prefix})
|
||||
vcpkg_list(SET no_parallel_install_opts -j 1 --trace -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${vcpkg_package_prefix})
|
||||
#TODO: optimize for install-data (release) and install-exec (release/debug)
|
||||
|
||||
else()
|
||||
@ -63,6 +64,7 @@ function(vcpkg_build_make)
|
||||
vcpkg_list(SET make_opts ${arg_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
|
||||
vcpkg_list(SET no_parallel_make_opts ${arg_MAKE_OPTIONS} V=1 -j 1 -f ${arg_MAKEFILE} ${arg_BUILD_TARGET})
|
||||
vcpkg_list(SET install_opts -j ${VCPKG_CONCURRENCY} -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR})
|
||||
vcpkg_list(SET no_parallel_install_opts -j 1 -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR})
|
||||
endif()
|
||||
|
||||
# Since includes are buildtype independent those are setup by vcpkg_configure_make
|
||||
@ -160,8 +162,10 @@ function(vcpkg_build_make)
|
||||
if (arg_ENABLE_INSTALL)
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}${short_buildtype}")
|
||||
vcpkg_list(SET make_cmd_line ${make_command} ${install_opts})
|
||||
vcpkg_list(SET no_parallel_make_cmd_line ${make_command} ${no_parallel_install_opts})
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND ${make_cmd_line}
|
||||
NO_PARALLEL_COMMAND ${no_parallel_make_cmd_line}
|
||||
WORKING_DIRECTORY "${working_directory}"
|
||||
LOGNAME "install-${TARGET_TRIPLET}${short_buildtype}"
|
||||
)
|
||||
|
@ -12,6 +12,8 @@ set(Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES
|
||||
"Cannot write file"
|
||||
# Multiple threads caused the wrong order of creating folders and creating files in folders
|
||||
"Can't open"
|
||||
# `make install` may stumble over concurrency, in particular with `mkdir` on osx.
|
||||
"mkdir [^:]*: File exists"
|
||||
)
|
||||
list(JOIN Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES "|" Z_VCPKG_EXECUTE_BUILD_PROCESS_RETRY_ERROR_MESSAGES)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user