[clang] [flang] [flang][debug] Add compressed DWARF support in Flang (PR #212584)

Abid Qadeer via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 30 04:06:48 PDT 2026


abidh wrote:

Heads-up (not a blocker, and not caused by this PR): with an invalid value on a compile+link command, the error is printed twice:

$ flang -g -gz=test test2.f90 -o /tmp/test2
flang-24: error: unsupported argument 'test' to option '-gz='
flang-24: error: unsupported argument 'test' to option '-gz='

It comes from two independent validators of -gz= that both run for compile+link: `renderDebugInfoCompressionArgs` (compile job) and `addLinkerCompressDebugSectionsOption` (link job) in CommonArgs.cpp. It's pre-existing clang behavior as clang -g -gz=test x.c -o x prints it twice as well, while -c prints it once. So this PR just inherits it by reusing those functions.

Since the duplication lives in the shared clang driver code, it's probably best handled as a separate PR which would fix both clang and flang. I just wanted to flag it here so it's not mistaken for a regression from this change.

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


More information about the cfe-commits mailing list