faithfracture / Apple-Boost-BuildScript

Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, OS X)
279 stars 111 forks source link

Fix enforcing minimum macOS SDK version #22

Closed netromdk closed 6 years ago

netromdk commented 6 years ago

First of all; thanks for the great build script.

In order to enforce the actual minimum macOS SDK version I had to use both -isysroot and -mmacosx-version-min for cxxflags and linkflags.

netromdk commented 6 years ago

Btw the problem mentioned in #11 is fixed in this PR. :)

faithfracture commented 6 years ago

Great! Could you please update the help documentation & remove the NOTE about min-macos-version being ignored?

netromdk commented 6 years ago

I have removed that note you referred to. I couldn't find anything else to change.

faithfracture commented 6 years ago

Awesome, thanks!

netromdk commented 6 years ago

You're welcome! :)

mbendiksen commented 6 years ago

Cool - @netromdk regarding this also addressing #11 does it get the user-config.jam settings to be used even without the architecture being passed to b2? To be honest, I don't remember the specifics (and I can barely keep my head above water with Boost config stuff) but I know when I was fiddling with it previously I had to add that (architecture=x86) or user-config.jam was totally ignored.

faithfracture commented 6 years ago

It seems to. I tried it out and the min architecture is definitely being set correctly - no more complaints from xcodebuild when linking with Boost & targeting an OS version earlier than the current one. There wasn't a specific consideration for that though. Maybe just passing the SDK path did the trick there?

netromdk commented 6 years ago

@mbendiksen What I meant was that it correctly sets the minimum SDK version, which I saw was commented on in your PR. But I might have missed some of the parts you addressed. It still creates the user-config.jam as before, including the minimum SDK version.

@faithfracture Yes, the path to the used SDK given via -isysroot is like stating what the base SDK is. For some reason, if that is left out, even when specifying -mmacosx-version-min, then it wouldn't work.