[cfe-commits] [RFC and PATCH] Fortran
Douglas Gregor
dgregor at apple.com
Fri May 4 10:48:53 PDT 2012
On May 4, 2012, at 4:27 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> On Thu, 03 May 2012 18:08:20 -0700
> Chris Lattner <clattner at apple.com> wrote:
>
>>
>> On May 3, 2012, at 1:55 PM, Hal Finkel wrote:
>>
>>> Hello,
>>>
>>> In order to support our users who have Fortran codes, I would like
>>> to start working on adding Fortran support into clang. While at
>>> first this may seem like an odd fit, I think that it should work
>>> well for two reasons:
>>
>> FWIW, I don't think that this makes sense from a community standpoint.
>>
>> If you're serious about building a fortran frontend (which would be
>> really really cool). I think we should start it as another LLVM
>> subproject. It can certainly build off and use the Clang "liblex" to
>> get the preprocessor etc, and taking changes to support Fortran into
>> the clang tree would be perfectly fine.
>
> Alright cool, let's do that then. Based on the feedback I've received,
> it seems like it makes the most sense to add Fortran support directly
> into the driver and lexer, and keep everything else as a separate
> subproject. This subproject will have its own Parser, Sema, AST,
> CodeGen, etc. subdirectories. If we set this up kind of like clang is
> setup, then the build system will detect whether there is a fortran
> subdirectory in clang, and if so, will build (defining
> CLANG_HAS_FORTRAN or something like that) and link the extra components.
I think this subproject should exist at the top level (llvm/tools/<project>) rather than being inside the Clang build. It can still depend on Clang libraries, of course.
> If we're on the same page, then I'll update my driver/lexer patch to
> reflect this upcoming configuration.
I agree that this is the right way to go.
- Doug
More information about the cfe-commits
mailing list