Skip to content

Commit

Permalink
address issue in boost.asio building on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Nov 14, 2023
1 parent 7859695 commit 7d20476
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++ : <compileflags>-Wno-deprecated-declarations
<compileflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\"
<compileflags>-mios-simulator-version-min=7
Expand All @@ -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
8 changes: 8 additions & 0 deletions Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ rule linking ( properties * )
result += <framework>CoreFoundation <framework>SystemConfiguration ;
}

if <target-os>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 += <define>BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION ;
}

if <toolset>gcc in $(properties)
&& <target-os>linux in $(properties)
&& ( <asserts>on in $(properties)
Expand Down

0 comments on commit 7d20476

Please sign in to comment.