Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-03-09 13:32:10

> In our project we primarily build both Mac OS X (PPC and MacTel) as
> well as MSVC. In order to accomodate the ability to build native, ppc,
> i386 or fat binaries for the Mac platform, we added an "arch" flag to
> the darwin.jam file:

There are already <address-model>, <architecture> and <instruction-set> features in the v2/tools/builtin.jam file.

> feature arch : native ppc i386 fat : composite propagated ; # We don't
> turn on link-incompatible for now;

<arch>native would map to <address-model>/<architecture>/<instruction-set> (or, more simply, leaving them
<arch>ppc ==> <architecture>power
<arch>i386 ==> <architecture>x86 or <architecture>x86/<instruction-set>i386 if you really want 386 instructions only!
<arch>fat ==> ????? You'd probably need to add a new <architecture> value, e.g. <architecture>power_x86

 flags darwin.compile OPTIONS <architecture> : -isysroot ;
 flags darwin.compile OPTIONS <architecture>power_x86 : -arch i386 -arch ppc ;
flags darwin.compile OPTIONS <architecture>x86 : -arch i386 ;
flags darwin.compile OPTIONS <architecture>power : -arch ppc -isysroot ;
 flags darwin.compile OPTIONS -isysroot /Developer/SDKs/MacOSX10.4u.sdk ;

> Now we can specify the architecture for which we want to build our Mac
> binaries. There was much rejoicing.


> The problem we are having comes when I now try to build on any other
> platform that knows nothing about the <arch> flag (MSVC, for example).

But it does know about <architecture> and its ilk. Thus, you can do the following:

bjam msvc-8.0 architecture=x86 # IA32 (i386)
bjam msvc-8.0 architecture=x86 address-model=64 # AMD64
bjam msvc-8.0 architecture=ia64 # IA64

and there was much rejoicing :).

NOTE: This may require you having the latest (or a recent) CVS version.

- Reece
Express yourself instantly with MSN Messenger! Download today it's FREE!

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at