Skip to content

Creating compiler toolchainsΒ #638

@awvwgk

Description

@awvwgk

We currently detect our compiler toolchain by identifying it from the Fortran compiler, with the default being gfortran. This is somewhat suboptimal since it doesn't account for the C compiler and because changes in the PATH are not correctly considered in our toolchain.

Here is a proposal for creating an fpm compiler command inspired by spack compiler:

  • allow to find installed compilers by searching the PATH for standard names (done automatically on first invocation)
  • inspection/modification of existing compiler toolchains possible (checksum?)
  • available toolchains are user settings in ~/.config/fpm/toolchain/*.toml or ~/.config/fpm/toolchain.toml (individual files might be easier to share/reuse)
  • specify the default toolchain in ~/.config/fpm/config.toml
  • the commands for --compiler, --c-compiler, ... are passed to fpm compiler internally (create new toolchain on demand)
  • toolchain name is used to prefix build output directory (maybe include a digest/slug?)
  • possibility to perform an integrity check of toolchain (in case of system upgrade, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions