From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a02622021d090376 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: [GNAT 2006] Project file and conditional withing/linking Date: Fri, 09 Jun 2006 10:08:20 +0200 Message-ID: <4esohhF1g6citU1@individual.net> References: <4epgrmF1g33evU1@individual.net> <4esn72F1gdphpU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net bCYqJb6cjZVW2LrvicOVgwSGJNECz3xhvXxUp5KuBNQOhRV10= User-Agent: KNode/0.10.2 Xref: g2news2.google.com comp.lang.ada:4721 Date: 2006-06-09T10:08:20+02:00 List-Id: Alex R. Mosteo wrote: > Simon Wright wrote: >> We have defined environment-dependent symbols in non-source Projects >> and then used the symbols to create the appropriate switches in the >> user project. Something like >> >> package Linker is >> case Use_Other_Package is >> when Yes => >> for Default_Switches ("ada") >> use ("-foo") & Other_Package.Linker_Switches; >> when No => >> for Default_Switches ("ada") use ("-bar"); >> end case; >> end Linker; > > I used to do this with the GAP 2005 release, but it seems the GAP/GPL 2006 > release will pass the linker options to gnatlink no matter what, once you > with the project. Maybe this is the difference between Default_Switches > and Linker_Options. Going to set up a test case. For the record, I've just tested it: Using Default_Switches will not propagate through projects unless you do the appending as in your example, whereas using Linker_Options will pass these arguments to the linker just by withing the project.