You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, ...)
The text was updated successfully, but these errors were encountered:
The Rust cc crate also has a cc::Tool class. The biggest difference is the compiler is configured via the build.rs build script. It makes sense that Fortran compiler integration must be closer (configuration is passed internally).
In general I like the proposal. Given the multitude of Fortran compilers, a good separation layer would be useful. In the spack compiler command, I see one can embed flags directly in the compiler configuration file. How would those interact with the compiler flag profiles (#498) in the user project manifest?
A second question is what if fpm were to be used as a spack build system in the future. Would the spack configurations be translated to fpm configurations (or vice-versa)?
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 thePATH
are not correctly considered in our toolchain.Here is a proposal for creating an
fpm compiler
command inspired byspack compiler
:PATH
for standard names (done automatically on first invocation)~/.config/fpm/toolchain/*.toml
or~/.config/fpm/toolchain.toml
(individual files might be easier to share/reuse)~/.config/fpm/config.toml
--compiler
,--c-compiler
, ... are passed tofpm compiler
internally (create new toolchain on demand)The text was updated successfully, but these errors were encountered: