Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-24 06:51:51


Hi Mat,

> >> These may give you some idea about "universal" artifacts and gcc 4.0
> >> changes. In addition to the various combinations of -arch settings,
> >> there are two other build variables of which I am aware. First, the
> >> toolchain's behavior is affected by the environment variable,
> >> MACOSX_DEPLOYMENT_TARGET, which typically is set somewhere between
> >> 10.1 and 10.4 at the moment, and determines the oldest OS version
> >> upon which the targeted artifacts will run.
> >>
> >> *** Question 2
> >> Is there an existing bbv2 paradigm into which we can shoehorn this
> >> notion?
> >
> > Sorry, what's "this" referring to?
>
> The value of the environment variable MACOSX_DEPLOYMENT_TARGET (typically
> 10.2, 10.3 or 10.4u if I understand correctly) determines the oldest
> version of the OS on which the built artifacts can be used. For some reason
> Apple chose not to make it an environment variable instead of a command
> line compiler flag. I am asking for the best way to expose this build
> parameter in the darwin toolset. For example, could bbv2 set/export the
> environment variable according to the value of a feature, say
> <deployment_target>, so that the it would be visible to the generated
> compilation commands? Or maybe there is a better approach.

There's no techical problem with setting whatever environment variable,
responding to whatever feature. Say:

flags darwin DT <deployment_target> ;

actions compile.c++
{
set MACOSX_DEPLOYMENT_TARGET=$(DT) ....

Though we probably need to choose some more specific name, like
<osx-target-version>. I am not yet sure that feature is the best thing. After
all, you probably won't be building with different values of that feature, so
you can just set the environment variable globally. Dunno.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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