Boost logo

Boost-Build :

Subject: Re: [Boost-build] Compiling and linking with different tools
From: Bo Jensen (jensen.bo_at_[hidden])
Date: 2012-03-15 09:01:40


Thanks Chris, I got it to work.

On Tue, Mar 13, 2012 at 1:35 PM, Nogradi, Chris <Chris.Nogradi_at_[hidden]>wrote:

> It think it is possible. I do something similar when I build an exe or
> a lib with one toolset and then install it. Then I make the installed
> version (LINUXOBJ below) a dependency of the other toolset’s targets. I
> would guess you should be able to do it with an obj as well.****
>
> ** **
>
> obj OBJ : file.c ;****
>
> alias OBJ_build : : <source>OBJ/<toolset>linux ;****
>
> install OBJ_install : OBJ_build : <conditional>@get-install-location ;****
>
> alias LINUXOBJ : OBJ_install ;****
>
> alias LINUXOBJ : OBJ_build : <variant>debug <toolset>linux ;****
>
> explicit LINUXOBJ OBJ_build OBJ_install OBJ ;****
>
> ** **
>
> rule get-install-location ( properties * )****
>
> {****
>
> local properties-set = [ property-set.create $(properties) ] ; ****
>
> local dir = [ $(properties-set).as-path ] ;****
>
> return "<location>$(BIN_DIR)/cross-objs/$(dir)" ;****
>
> }****
>
> ** **
>
> exe MYEXE : main.c LINUXOBJ ;****
>
> ** **
>
> Chris****
>
> ** **
>
> *From:* boost-build-bounces_at_[hidden] [mailto:
> boost-build-bounces_at_[hidden]] *On Behalf Of *Bo Jensen
> *Sent:* Monday, March 12, 2012 2:46 PM
> *To:* Boost.Build developer's and user's list
> *Subject:* Re: [Boost-build] Compiling and linking with different tools***
> *
>
> ** **
>
> If anyone could just tell me if it's possible at all, that would be much
> appreciated.
>
> Thanks.****
>
> On Sun, Mar 11, 2012 at 12:15 PM, Bo Jensen <jensen.bo_at_[hidden]> wrote:**
> **
>
> Hi,
>
> I am compiling with linux and linking with gcc. For several reasons I have
> to use two separate tools. I used to do this by compiling all the object
> files into one static library, which I then use in building other targets.
> But I just realized I can not control the library size with this method,
> since using all the GCC visibility settings does not work on static libs..
>
> So my question is, can anyone point me to an example that show how to
> compile a "obj" target with one tool and including this source in another
> link with a different tool. When I do it I get conflicts on mixing
> properties for targets.
>
> Thanks.
>
> /Bo****
>
> ** **
>
> ------------------------------
> This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient. If you are not the intended recipient,
> please be aware that any disclosure, copying, distribution or use of this
> e-mail or any attachment is prohibited. If you have received this e-mail in
> error, please contact the sender and delete all copies.
>
> Thank you for your cooperation.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk