Page MenuHomePhabricator

[flang] Change the default module suffix from .mod to f18.mod
AbandonedPublic

Authored by awarzynski on Apr 28 2021, 7:31 AM.

Details

Summary

The flang/tools/f18/flang script sets the module suffix to
.f18.mod. With this change:

  • .f18.mod becomes the default suffix for module files in Flang
  • we no longer require a bash wrapper script for the old driver

Diff Detail

Event Timeline

awarzynski created this revision.Apr 28 2021, 7:31 AM
awarzynski requested review of this revision.Apr 28 2021, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 7:31 AM
awarzynski edited the summary of this revision. (Show Details)Apr 28 2021, 7:35 AM
awarzynski added a project: Restricted Project.
klausler requested changes to this revision.Apr 28 2021, 9:06 AM

This is a bad idea. The default module file name suffix should be ".mod"; the world is full of Makefiles and scripts expecting Fortran modules to be "*.mod".

This revision now requires changes to proceed.Apr 28 2021, 9:06 AM
awarzynski abandoned this revision.Apr 28 2021, 9:11 AM

From offline discussions (Slack & a community call): the flang script is needed when calling an external compiler specified via F18_FC. It makes sure that there's no clash between module files generated by Flang and the compiler specified with F18_FC.

This is a bad idea. The default module file name suffix should be ".mod"; the world is full of Makefiles and scripts expecting Fortran modules to be "*.mod".

Thank you for your comment. I wasn't sure what the rationale behind flang/tools/f18/flang and -module-suffix .f18.mod was. This is now clear and I see why we should keep .mod. I've already abandoned this.