Skip to content

Propagate compilers with a %% sigil #49696

@alalazo

Description

@alalazo

Summary

Sometimes, when defining a spec string, it may be convenient for users to propagate some compiler choices down to dependencies. Right now, this needs to be done explicitly, and is quite verbose.

What we discussed in a few meetings offline is to add a new propagation syntax using %% for build dependencies:

$ spack install hdf5+mpi %%clang ^zlib-ng %gcc

The syntax above means to use %clang where not explicitly specified otherwise.

Rationale

The feature should reduce verbosity when pinning compilers to nodes, but having sparse exceptions in the DAG. With it, the default compiler can be specified only once at the root.

Description

There are already workarounds, or alternative solutions that may be useful depending on the use case. For instance, users can set appropriate requirements. This feature though, is much more flexible for one-off specs, than a full YAML configuration.

Additional information

--

General information

  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA feature is missing in Spack

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions