calculate make_jobs in ninja (#32384)
This is in case ninja's setup_dependent_package is called before its module is initialized by build_environment
This commit is contained in:
parent
b31cd189a7
commit
a2f0588004
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from spack.build_environment import MakeExecutable
|
from spack.build_environment import MakeExecutable, determine_number_of_jobs
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.executable import which_string
|
from spack.util.executable import which_string
|
||||||
|
|
||||||
@ -74,6 +74,8 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
def setup_dependent_package(self, module, dspec):
|
def setup_dependent_package(self, module, dspec):
|
||||||
name = "ninja"
|
name = "ninja"
|
||||||
|
|
||||||
module.ninja = MakeExecutable(
|
module.ninja = MakeExecutable(
|
||||||
which_string(name, path=[self.spec.prefix.bin], required=True), module.make_jobs
|
which_string(name, path=[self.spec.prefix.bin], required=True),
|
||||||
|
determine_number_of_jobs(parallel=self.parallel),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user