From 313c7386c4ede8a3df7f698df49fde81367731a0 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:26:50 -0800 Subject: [PATCH] go: set GOMAXPROCS to limit number of build processes (#35703) --- var/spack/repos/builtin/packages/go/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 8f3647c06f..9d798a7d8c 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -116,6 +116,7 @@ def setup_build_environment(self, env): # internal Spack wrappers and fail. env.set("CC_FOR_TARGET", self.compiler.cc) env.set("CXX_FOR_TARGET", self.compiler.cxx) + env.set("GOMAXPROCS", make_jobs) def setup_dependent_package(self, module, dependent_spec): """Called before go modules' install() methods.