comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Ada interacting with Windows 8.1+ GUI
Date: Fri, 26 Oct 2018 10:19:18 +0100
Date: 2018-10-26T10:19:18+01:00	[thread overview]
Message-ID: <lyin1pjca1.fsf@pushface.org> (raw)
In-Reply-To: 61c2515d-29fd-4b96-8138-88d7f5419fb5@googlegroups.com

joakimds@kth.se writes:

> Isn't it easy for the compiler to optimize away/remove the code that
> is not used?

Not so much in a library package where some subprograms don't have to be
used by the overall program.

You can compile with -ffunction-sections -fdata-sections which say each
subprogram/data object resp. is to have its own section. If your linker
supports (the equivalent of) -gc-sections. linking with it means that
only the used sections get linked. This is fine for (arm-eabi) embedded
systems & (probably) Linux. which use GNU ld, but not on macOS. Can't
say for Windows.

GNAT provides gnatelim, which analyses your code and (?) regenerates it
without the unused objects. No idea how well this works.


  reply	other threads:[~2018-10-26  9:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 14:42 Ada interacting with Windows 8.1+ GUI Donar
2018-10-09 14:56 ` gautier_niouzes
2018-10-10 15:42   ` herbert.glarner
2018-10-10 18:19     ` G. B.
2018-10-25  9:24       ` gautier_niouzes
2018-10-11 14:42     ` gautier_niouzes
2018-10-11 15:26       ` rabbibotton
2018-10-11 18:25         ` rabbibotton
2018-10-11 18:37       ` Björn Lundin
2018-10-13  6:30       ` alby.gamper
2018-10-13 11:50         ` gautier_niouzes
2018-10-13 12:47           ` alby.gamper
2018-10-25 17:19 ` Olivier Henley
2018-10-25 17:33   ` Olivier Henley
2018-10-25 22:30     ` joakimds
2018-10-26  9:19       ` Simon Wright [this message]
2018-10-26  9:39         ` gautier_niouzes
2018-10-26 12:52         ` Bill Findlay
2018-10-26 13:42           ` Simon Wright
2018-10-26 21:19             ` Bill Findlay
2018-10-29 21:09         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox