Re: [PATCH] D35338: Add the -fdestroy-globals flag

2018-01-26 Thread Vedant Kumar via cfe-commits
Yeah, I think we have internal users who would be happy to use this flag as well. Stepping back a bit. It's been a while since I followed the discussion on cfe-dev, but I don't recall there being any objections to the flag name or to using it for particular targets. IIRC the objections are

Re: [PATCH] D35338: Add the -fdestroy-globals flag

2018-01-26 Thread Nico Weber via cfe-commits
I'd love to use this flag in non-firmware code FWIW. On Fri, Jan 26, 2018 at 4:07 PM, Ian Tessier via Phabricator via cfe-commits wrote: > itessier added a comment. > > > That seems like a nice win and I like the convenience of this approach. > That said I've just

[PATCH] D35338: Add the -fdestroy-globals flag

2018-01-26 Thread Ian Tessier via Phabricator via cfe-commits
itessier added a comment. > That seems like a nice win and I like the convenience of this approach. That > said I've just remembered that there's a thread on cfe-dev about this: > [RFC] Suppress C++ static destructor registration > I don't think a consensus was reached. From what I gather, some

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-19 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a subscriber: bruno. vsk added a comment. That seems like a nice win and I like the convenience of this approach. That said I've just remembered that there's a thread on cfe-dev about this: [RFC] Suppress C++ static destructor registration I don't think a consensus was reached. From

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-18 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for working on this! One small drive-by nit for you. Same "no need to update the diff this very second" as vsk; I can't LGTM this with confidence. (Also, in the future, please try to include context

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-18 Thread Ian Tessier via Phabricator via cfe-commits
itessier added a comment. In https://reviews.llvm.org/D35338#809146, @vsk wrote: > This is interesting. Do you have any results/metrics to share (e.g some any > binary size reduction for projects you've looked at)? I only tested this with Project Loon's avionics firmware which freed up ~1.2%

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. This is interesting. Do you have any results/metrics to share (e.g some any binary size reduction for projects you've looked at)? Comment at: lib/Frontend/CompilerInvocation.cpp:585 Opts.CXXCtorDtorAliases = Args.hasArg(OPT_mconstructor_aliases); +

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-12 Thread Ian Tessier via Phabricator via cfe-commits
itessier created this revision. The -fdestroy-globals flag can be used to disable global variable destructor registration. It is intended to be used with embedded code that never exits. Disabling registration allows the linker to garbage collect unused destructors and vtables.