-
Notifications
You must be signed in to change notification settings - Fork 2.4k
languages that have compilers hard-coded #954
Description
Despite this chunk of Compiler from compiler.py, there are, in fact, compiled languages other than c, c++ and fortran77/90...
class Compiler(object):
"""This class encapsulates a Spack "compiler", which includes C,
C++, and Fortran compilers. Subclasses should implement
support for specific compilers, their possible names, arguments,
and how to identify the particular type of compiler."""
# Subclasses use possible names of C compiler
cc_names = []
# Subclasses use possible names of C++ compiler
cxx_names = []
# Subclasses use possible names of Fortran 77 compiler
f77_names = []
# Subclasses use possible names of Fortran 90 compiler
fc_names = []It would be good if there were a way to register a new language group, rather than having only hard-coded languages. Specifically I would want to add support for go, rust, maybe objective c, probably haskell at some point, almost all of which support multiple compiler implementations, some of which may be available externally. Golang is actually the perfect example, the "go" package needs a go compiler to bootstrap, but can support either gccgo or the plan-9 descendant compilers. The only way to make this work right now is to have go depend on the gcc package, which will probably have to grow a golang variant at some point.