mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-11-13 06:12:41 +00:00
python3-grpcio(-tools): fix build concurrency issue
Set GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS to limit spawned compiler processes. Without this it uses all available CPUs (via multiprocessing.cpu_count()) and can exhaust build host since there are lot of files to compile (e.g. with 128 cores it manages to spawn 128 gcc processes) Note that this is a general problem for all setuptools based builds with build_ext compilation which can either compile with 1 thread or cpu_count threads. grpcio hot-patches setuptools and allows to set specific build concurrency value. Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
1 parent
59dacb6d4d
commit
fe582374d3
2 files changed
+8
No files matched your search
@@ -29,6 +29,10 @@ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = "1"
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_RE2 = "1"
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB = "1"
|
||||
|
||||
do_compile:prepend() {
|
||||
export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="${@oe.utils.parallel_make(d, False)}"
|
||||
}
|
||||
|
||||
GRPC_CFLAGS ?= ""
|
||||
GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions"
|
||||
export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}"
|
||||
|
||||
Reference in new issue
Block a user