Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

El Capitan system: always include GCC compiler #515

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions systems/llnl-elcapitan/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,30 @@ def external_pkg_configs(self):
elif self.spec.satisfies("compiler=gcc"):
selections.append(externals / "libsci" / "00-gcc-packages.yaml")

cmp_preference_path = self.next_adhoc_cfg()
with open(cmp_preference_path, "w") as f:
f.write(self.compiler_weighting_cfg())
selections.append(cmp_preference_path)

return selections

def compiler_weighting_cfg(self):
compiler = self.spec.variants["compiler"][0]

if compiler == "cce":
return """\
packages:
all:
require:
- one_of: ["%cce", "@:"]
"""
elif compiler == "gcc":
return """\
packages: {}
"""
else:
raise ValueError(f"Unexpected value for compiler: {compiler}")

def compiler_configs(self):
compilers = LlnlElcapitan.resource_location / "compilers"

Expand All @@ -118,8 +140,10 @@ def compiler_configs(self):
self.rocm_cce_compiler_cfg(self.spec.variants["rocm"][0], "16.0.0")
)
selections.append(compiler_cfg_path)
elif self.spec.satisfies("compiler=gcc"):
selections.append(compilers / "gcc" / "00-gcc-12-compilers.yaml")

# Note: this is always included for some low-level dependencies
# that shouldn't build with %cce
selections.append(compilers / "gcc" / "00-gcc-12-compilers.yaml")

return selections

Expand Down