diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-02-28 21:57:10 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-02-28 18:48:26 -0800 |
| commit | fe582374d3ba474164005942799eb2bddc52a080 (patch) | |
| tree | c6bed0dc4914e382fee50d1b9233c11765b8d2d4 /meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb | |
| parent | 59dacb6d4d89304f1e6c8f707c463b33b6092018 (diff) | |
| download | meta-openembedded-fe582374d3ba474164005942799eb2bddc52a080.tar.gz | |
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>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb index 5af05ca2c9..b858a3b050 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb +++ b/meta-python/recipes-devtools/python/python3-grpcio_1.70.0.bb | |||
| @@ -29,6 +29,10 @@ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = "1" | |||
| 29 | export GRPC_PYTHON_BUILD_SYSTEM_RE2 = "1" | 29 | export GRPC_PYTHON_BUILD_SYSTEM_RE2 = "1" |
| 30 | export GRPC_PYTHON_BUILD_SYSTEM_ZLIB = "1" | 30 | export GRPC_PYTHON_BUILD_SYSTEM_ZLIB = "1" |
| 31 | 31 | ||
| 32 | do_compile:prepend() { | ||
| 33 | export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="${@oe.utils.parallel_make(d, False)}" | ||
| 34 | } | ||
| 35 | |||
| 32 | GRPC_CFLAGS ?= "" | 36 | GRPC_CFLAGS ?= "" |
| 33 | GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" | 37 | GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" |
| 34 | export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" | 38 | export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" |
