Skip to content
Snippets Groups Projects
Commit e7c86259 authored by Greg Becker's avatar Greg Becker Committed by Harmen Stoppels
Browse files

bugfix: external detection for compilers with os but not target (#44156)


avoid calling `spec.target` when None.

When an external compiler package has an `os` set but no `target` set, Spack
currently falls into a codepath that calls `spec.target` (which itself calls
`spec.architecture.target.Microarchitecture`) when `spec.architecture.target`
is None, throwing an error.

e.g.

```
packages:
  gcc:
    externals:
    - spec: gcc@12.3.1 os=rhel7
      prefix: /usr
```

---------

Co-authored-by: default avatarTodd Gamblin <tgamblin@llnl.gov>
parent 2605aeb0
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment