From 7d20476c752415f095fb5f2bb2dbffe48a8009e4 Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 14 Nov 2023 14:57:13 +0100 Subject: [PATCH] address issue in boost.asio building on iOS --- .github/workflows/macos.yml | 15 +++++++++++++-- Jamfile | 8 ++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cde3b1444dd..b61b276566a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -120,7 +120,18 @@ jobs: - name: install boost run: | - brew install boost-build boost + git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.78.0 https://github.com/boostorg/boost.git + cd boost + ./bootstrap.sh + + - name: boost headers + run: | + cd boost + ./b2 headers + cp b2 .. + + - name: user-config + run: | echo "using darwin : ios_sim : clang++ : -Wno-deprecated-declarations \"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\" -mios-simulator-version-min=7 @@ -141,4 +152,4 @@ jobs: - name: build library run: | - b2 -l400 cxxstd=14 darwin-ios darwin-ios_sim address-model=64 link=static + BOOST_ROOT=boost ./b2 -l400 cxxstd=14 target-os=iphone crypto=built-in darwin-ios darwin-ios_sim address-model=64 link=static diff --git a/Jamfile b/Jamfile index a9e121a3280..484322e21ce 100644 --- a/Jamfile +++ b/Jamfile @@ -155,6 +155,14 @@ rule linking ( properties * ) result += CoreFoundation SystemConfiguration ; } + if iphone in $(properties) + { + # boost.asio seems to mis-detect iOS as supporting the __thread + # keyword, resulting in the error: + # error: thread-local storage is not supported for the current target + result += BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION ; + } + if gcc in $(properties) && linux in $(properties) && ( on in $(properties)