Boost logo

Boost :

Subject: Re: [boost] Please advise: Boost with LLVM Clang and 0x11 dialect ?
From: Steve Ramsey (steve_at_[hidden])
Date: 2012-03-21 14:46:36


On Mar 21, 2012, at 1:35 AM, "John M. Dlugosz" <mpbecey7gu_at_[hidden]> wrote:
> Can someone please advise on how to get Boost headers to work when compiling using Clang (as found on Apple OSX/iOS development) when the 0x11 dialect is enabled?
>
> We're stuck at Boost 1.47 because 1.48 doesn't even work with the current settings (C++03 dialect). The Mac developers don't want to fiddle with 1.49 without knowing what the deal is.
>
> Is there someone who has used Boost on the Apple with Clang who can relate some tales of how it works and offer suggestions? I've had no luck on the Boost.Users mailing list, or a previous post here on Boost.Devel. Is there anyplace else I might ask? At this point, any scrap of wisdom would be appreciated.

It's not an automatic process, but once the initial effort is spent, it works beautifully. I should point out that I use both C++11 and libc++, and I ended up making a number of changes to boost build files to get various features working. The biggest problem is the lack of support in tools/build/v2/tools/clang-darwin.jam for specifying the SDK/platform for cross-compiling. My solution since boost 1.47 has been to replace it with a modified copy of tools/build/v2/tools/darwin.jam; if I thought this was going to be an issue for anywhere near as long as it has, I would've sent in a patch half a year ago (aside: do any of the maintainers actually use boost on OS X?). An additional complication is that as of Xcode 4.3, variant toolchains are stored in a different location and use a slightly different directory structure; a nice solution would be to support a build feature to indicate this and respond accordingly; I just hardcode for Xcode 4.3+.

I'm happy to send you diffs off-list if you're interested, but it's frankenhacks all the way down until I get around to making a clean patch file for clang-darwin.jam.

                        Steve

P.S. The only source/header file with a problem is libs/signals/src/named_slot_map.cpp, which is trivially fixable.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk