Skip to content

minimize preferred compilers better#51313

Closed
haampie wants to merge 1 commit intodevelopfrom
hs/fix/preferred-compilers
Closed

minimize preferred compilers better#51313
haampie wants to merge 1 commit intodevelopfrom
hs/fix/preferred-compilers

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Sep 17, 2025

Submitting this as a PR to share what is needed to make

spack:
  specs:
  - "fftw~mpi %c,fortran=llvm"
  packages:
    c:
      prefer: [gcc]
    cxx:
      prefer: [gcc]
    fortran:
      prefer: [gcc]

pick gmake %c=gcc instead of gmake %c=llvm.

The changes in this PR are the minimum needed to make "preferred compilers" the tie-breaker.

But these change make existing tests fail (e.g. foo %clang is expected to set %clang on deps too), so, that suggests that the penalty from requirements (on providers) should be in terms of count of parent packages using them instead of count of providers existing.

Edit: Closed this as @alalazo has an implementation of the suggestion in the PR description.

@haampie haampie closed this Sep 17, 2025
@haampie haampie deleted the hs/fix/preferred-compilers branch April 1, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant