[AWS] Shrinking AWS apps
Pascal Obry
pascal at obry.net
Mon Oct 22 18:41:16 CEST 2007
Jilani Khaldi a écrit :
> I have compiled AWS (svn version) with SHARED and XMLADA set to true.
> Everything is done right with demos compiled and running. The more
> impressive thing is that demos examples are really small (almost like C
> cgi apps). So, again, I ask for the equivalent of:
Hear, hear ! Who said GNAT code was bloated !
> ===============================
> hello.gpr:
> <<
> with "aws";
> project Hello is
> for Source_Dirs use (".");
> for Object_Dir use ".";
> for Main use ("hello_world.adb");
> end Hello;
> >>
>
> Then just run:
>
> $ gnatmake -Phello
>
>
> ===============================
> to get a tiny "hello_world".
Don't you think at this point you should be reading the GNAT User's Guide :)
First you don't want to have debug symbols and want to optimize the code:
package Compiler is
for Default_Switches ("Ada") use ("-O2");
end Compiler;
And then you want to strip your executable:
package Linker is
for Default_Switches ("Ada") use ("-s");
end Linker;
All this as nothing to do with AWS BTW !
And again this is not tested, so I hope I didn't type wrong.
> Thank you.
You're welcome :)
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
More information about the AWS
mailing list