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 5ce4c51 commit 4fd8050
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,17 @@ jobs:
- name: install boost
run: |
brew install boost-build boost
echo "using darwin : ios_sim : clang++ : <compileflags>-Wno-deprecated-declarations
echo "using darwin : ios_sim : clang++ : <target-os>iphone
<compileflags>-Wno-deprecated-declarations
<compileflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\"
<compileflags>-mios-simulator-version-min=7
<compileflags>-fobjc-abi-version=2
<linkflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\"
<linkflags>-mios-simulator-version-min=7
<linkflags>-fobjc-abi-version=2 ;" >>~/user-config.jam;
echo "using darwin : ios : clang++ : <compileflags>-Wno-deprecated-declarations
echo "using darwin : ios : clang++ : <target-os>iphone
<compileflags>-Wno-deprecated-declarations
<compileflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk\"
<compileflags>-mios-version-min=7
<compileflags>\"-arch armv7\"
Expand Down
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 4fd8050

Please sign in to comment.