Legion: add Rust-based profiler to install (#43408)
* legion: add missing license * legion: add rust-based profiler to install
This commit is contained in:
parent
6c3fed351f
commit
5d8f36d667
@ -25,6 +25,8 @@ class Legion(CMakePackage, ROCmPackage):
|
|||||||
homepage = "https://legion.stanford.edu/"
|
homepage = "https://legion.stanford.edu/"
|
||||||
git = "https://github.com/StanfordLegion/legion.git"
|
git = "https://github.com/StanfordLegion/legion.git"
|
||||||
|
|
||||||
|
license("Apache-2.0")
|
||||||
|
|
||||||
maintainers("pmccormick", "streichler", "elliottslaughter")
|
maintainers("pmccormick", "streichler", "elliottslaughter")
|
||||||
tags = ["e4s"]
|
tags = ["e4s"]
|
||||||
version("24.03.0", tag="legion-24.03.0", commit="c61071541218747e35767317f6f89b83f374f264")
|
version("24.03.0", tag="legion-24.03.0", commit="c61071541218747e35767317f6f89b83f374f264")
|
||||||
@ -277,6 +279,9 @@ def validate_gasnet_root(value):
|
|||||||
default=1024,
|
default=1024,
|
||||||
description="Maximum number of nodes supported by Legion.",
|
description="Maximum number of nodes supported by Legion.",
|
||||||
)
|
)
|
||||||
|
variant("prof", default=False, description="Install Rust Legion prof")
|
||||||
|
|
||||||
|
depends_on("rust@1.74:", type="build", when="+prof")
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
@ -438,6 +443,19 @@ def cmake_args(self):
|
|||||||
options.append("-DBUILD_MARCH:STRING=")
|
options.append("-DBUILD_MARCH:STRING=")
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
def build(self, spec, prefix):
|
||||||
|
super().build(spec, prefix)
|
||||||
|
if spec.satisfies("+prof"):
|
||||||
|
with working_dir(join_path(self.stage.source_path, "tools", "legion_prof_rs")):
|
||||||
|
cargo = which("cargo")
|
||||||
|
cargo("install", "--root", "out", "--path", ".", "--all-features", "--locked")
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
super().install(spec, prefix)
|
||||||
|
if spec.satisfies("+prof"):
|
||||||
|
with working_dir(join_path(self.stage.source_path, "tools", "legion_prof_rs")):
|
||||||
|
install_tree("out", prefix)
|
||||||
|
|
||||||
@run_after("install")
|
@run_after("install")
|
||||||
def cache_test_sources(self):
|
def cache_test_sources(self):
|
||||||
"""Copy the example source files after the package is installed to an
|
"""Copy the example source files after the package is installed to an
|
||||||
|
Loading…
Reference in New Issue
Block a user