[flang-commits] [flang] [flang][Driver] Improve error message for assembly file input (PR #174069)

Soumik Kumar Basu via flang-commits flang-commits at lists.llvm.org
Sat Jan 3 00:01:07 PST 2026


soumikiith wrote:

Hi,

I have a clarification question regarding where this diagnostic should live.

**My understanding:**

When the Flang driver sees an assembly input (`.s`), it goes through the Clang driver logic and attempts to construct an assembler job, which lowers to an invocation of the integrated assembler (`-cc1as`). Since Flang does not implement an assembler frontend, the driver currently errors out with the “unknown integrated tool -cc1as” message.

**Based on my understanding, what I want to do:**
Because this rejection happens during driver job construction, emitting a more user-friendly diagnostic from the Flang frontend seems too late — the frontend is never reached for this case.

My question is: would the preferred approach be to diagnose unsupported assembly inputs earlier in the Flang driver, before job construction, rather than attempting to let -cc1as through and rejecting it in the frontend?

I want to make sure I’m placing the diagnostic at the right layer.

https://github.com/llvm/llvm-project/pull/174069


More information about the flang-commits mailing list