diff options
author | Richard Berger <rberger@lanl.gov> | 2024-03-27 22:25:54 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 22:25:54 -0600 |
commit | 5d8f36d6675a7c48049fb84e710e6f18a23fb294 (patch) | |
tree | a4ea8d41f87ab2971a9abeba98499fe310b8dc9a /var | |
parent | 6c3fed351f7432f09c4d8b5217f33220f197dfcd (diff) | |
download | spack-5d8f36d6675a7c48049fb84e710e6f18a23fb294.tar.gz spack-5d8f36d6675a7c48049fb84e710e6f18a23fb294.tar.bz2 spack-5d8f36d6675a7c48049fb84e710e6f18a23fb294.tar.xz spack-5d8f36d6675a7c48049fb84e710e6f18a23fb294.zip |
Legion: add Rust-based profiler to install (#43408)
* legion: add missing license
* legion: add rust-based profiler to install
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/legion/package.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 2437a8c1f0..b6dd29a5cf 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -25,6 +25,8 @@ class Legion(CMakePackage, ROCmPackage): homepage = "https://legion.stanford.edu/" git = "https://github.com/StanfordLegion/legion.git" + license("Apache-2.0") + maintainers("pmccormick", "streichler", "elliottslaughter") tags = ["e4s"] version("24.03.0", tag="legion-24.03.0", commit="c61071541218747e35767317f6f89b83f374f264") @@ -277,6 +279,9 @@ class Legion(CMakePackage, ROCmPackage): default=1024, 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): spec = self.spec @@ -438,6 +443,19 @@ class Legion(CMakePackage, ROCmPackage): options.append("-DBUILD_MARCH:STRING=") 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") def cache_test_sources(self): """Copy the example source files after the package is installed to an |