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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to