Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow building for iOS 32-bit #860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kambala-decapitator
Copy link

Description

Building for iOS armv7/armv7s fails with the following error:

ninja: error: '../src/tbb/def/mac32-tbb.def', needed by 'appleclang_13.1_cxx11_32_release/libtbb.12.7.dylib', missing and no known rule to make it

This change fixes it.

Tested by building with Ninja and Makefiles generators using ios-cmake toolchain, also built the Getting Started example.

cmake -S . -B build -G Ninja \
  -DTBB_TEST=OFF \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE=~/dev/vcmi/vcmi-ios-depends/ios-cmake/ios.toolchain.cmake \
  -DPLATFORM=OS \
  -DENABLE_BITCODE=OFF \
  -DDEPLOYMENT_TARGET=10.0 \
  -DENABLE_ARC=ON \
  -DENABLE_VISIBILITY=ON
  • - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Other information

Signed-off-by: Andrey Filipenkov <decapitator@ukr.net>
@pavelkumbrasev
Copy link
Contributor

Hi @kambala-decapitator, how it would link without def file? What the propose of this patch?

@kambala-decapitator
Copy link
Author

@pavelkumbrasev

how it would link without def file?

I've never used def files before, but to my understanding, if you don't provide it, then linker simply takes all symbols it can find.

What the propose of this patch?

sorry, thought it's clear from PR title: to make TBB usable on 32-bit (armv7) iOS devices.

Here's an example of built library with this patch (fat binary with armv7 and arm64), if you'd like to see what was linked in it:
libtbb.12.5.dylib.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants