From 4fd8050fc143ff1502365b9713cfbaaa65615203 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 | 6 ++++-- Jamfile | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cde3b1444dd..6634b89407e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -121,7 +121,8 @@ jobs: - name: install boost run: | brew install boost-build boost - echo "using darwin : ios_sim : clang++ : -Wno-deprecated-declarations + echo "using darwin : ios_sim : clang++ : iphone + -Wno-deprecated-declarations \"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\" -mios-simulator-version-min=7 -fobjc-abi-version=2 @@ -129,7 +130,8 @@ jobs: -mios-simulator-version-min=7 -fobjc-abi-version=2 ;" >>~/user-config.jam; - echo "using darwin : ios : clang++ : -Wno-deprecated-declarations + echo "using darwin : ios : clang++ : iphone + -Wno-deprecated-declarations \"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk\" -mios-version-min=7 \"-arch armv7\" 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)