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

copy the list to avoid changing the original lists in DEFAULT_TARGETS_MAP for Clang and LLVM #2556

Merged
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
6 changes: 3 additions & 3 deletions easybuild/easyblocks/c/clang.py
Original file line number Diff line number Diff line change
@@ -193,14 +193,14 @@ def prepare_step(self, *args, **kwargs):
build_targets = self.cfg['build_targets']
if build_targets is None:
arch = get_cpu_architecture()
default_targets = DEFAULT_TARGETS_MAP.get(arch, None)
boegel marked this conversation as resolved.
Show resolved Hide resolved
if default_targets:
try:
default_targets = DEFAULT_TARGETS_MAP[arch][:]
# If CUDA is included as a dep, add NVPTX as a target (could also support AMDGPU if we knew how)
if get_software_root("CUDA"):
default_targets += ["NVPTX"]
self.cfg['build_targets'] = build_targets = default_targets
self.log.debug("Using %s as default build targets for CPU/GPU architecture %s.", default_targets, arch)
else:
except KeyError:
raise EasyBuildError("No default build targets defined for CPU architecture %s.", arch)

# carry on with empty list from this point forward if no build targets are specified
6 changes: 3 additions & 3 deletions easybuild/easyblocks/l/llvm.py
Original file line number Diff line number Diff line change
@@ -65,11 +65,11 @@ def configure_step(self):
build_targets = self.cfg['build_targets']
if build_targets is None:
arch = get_cpu_architecture()
default_targets = DEFAULT_TARGETS_MAP.get(arch, None)
if default_targets:
try:
default_targets = DEFAULT_TARGETS_MAP[arch][:]
self.cfg['build_targets'] = build_targets = default_targets
self.log.debug("Using %s as default build targets for CPU architecture %s.", default_targets, arch)
else:
except KeyError:
raise EasyBuildError("No default build targets defined for CPU architecture %s.", arch)

unknown_targets = [target for target in build_targets if target not in CLANG_TARGETS]