[PATCH] Allow -gsplit-dwarf for all ELF targets, not just Linux

Robinson, Paul Paul_Robinson at playstation.sony.com
Sun Mar 22 16:03:42 PDT 2015

30 years of delivering enterprise software tells me this:
If a switch you don't claim to support does nothing, nobody will complain. (Unless they're looking for an excuse to jerk your chain.)
If a switch you don't claim to support says "sorry, that switch is not supported" nobody will complain, period.
If a switch you don't claim to support says "program not executable" you WILL hear about it.

I'd be happiest with the second case, and fine with the first case. The third case is unacceptable.

From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of David Blaikie
Sent: Saturday, March 21, 2015 2:25 PM
To: reviews+D8484+public+374fa8dd1089857c at reviews.llvm.org
Cc: llvm cfe
Subject: Re: [PATCH] Allow -gsplit-dwarf for all ELF targets, not just Linux

On Sat, Mar 21, 2015 at 1:30 PM, Paul Robinson <Paul_Robinson at playstation.sony.com<mailto:Paul_Robinson at playstation.sony.com>> wrote:
In http://reviews.llvm.org/D8484#144547, @emaste wrote:

> In http://reviews.llvm.org/D8484#144353, @probinson wrote:
> > Please disable this for PS4?  Our toolchain isn't ready to support this.
> Presumably you wouldn't pass -gsplit-dwarf to clang when building for PS4 though?

*I* wouldn't, but licensees love to try stuff out even if we don't claim it
works.  Currently, adding -gsplit-dwarf to a command line silently has
no effect.  With your patch, I get:

clang.exe: error: unable to execute command: program not executable

which will inevitably cause a support call and cost us time and effort.
I'd prefer to preserve the "silently has no effect" behavior, at least until

Seems that'd be likely to cause a support call too - but in any case, I'll advocate for some error, any error, rather than silently ignoring the flag.

we are able to support this properly.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150322/4a8d186a/attachment.html>

More information about the cfe-commits mailing list