compiler-explorer / compiler-explorer

Run compilers interactively from your web browser and interact with the assembly

Home Page:https://godbolt.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[REQUEST]: Flang frontend driver

partouf opened this issue · comments

Is your feature request related to a problem? Please describe

A user has requested to make use of the Flang frontend driver directly https://flang.llvm.org/docs/FlangDriver.html
This is done through passing -fc1 to flang-new (as a first argument)
This cannot be done currently with the flang compilerType that we have, because user arguments come last.

There are 2 options:

  1. Override add an exception for -fc1 to be put in front of all options when the user supplies it https://github.com/compiler-explorer/compiler-explorer/blob/main/lib/base-compiler.ts#L1128 (but will probably conflict with other arguments, so not sure if even possible)
  2. Override the FlangCompiler class itself to make a new compiler that supports -fc1 and all it can do (and can't do)

Describe the solution you'd like

I would prefer option 2

Describe alternatives you've considered

Additional context

Not applicable

was merged but is not live yet

this is now live