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

[question] Why does AutotoolsToolchain not respect tools.apple:enable_bitcode? #15988

Closed
1 task done
lagner opened this issue Mar 29, 2024 · 1 comment
Closed
1 task done

Comments

@lagner
Copy link

lagner commented Mar 29, 2024

What is your question?

Hi everyone.

I am building my project on iOS with bitcode setting enabled. Conan profile looks like this

[settings]
os=iOS
os.version=13.0
arch=armv8
compiler=apple-clang
compiler.libcxx=libc++
os.sdk=iphoneos
compiler.version=15
compiler.cppstd=20
build_type=Release

[conf]
tools.cmake.cmaketoolchain:generator=Ninja
tools.cmake.cmaketoolchain:user_toolchain=["build/ios-arm64/mobile-sdk/multi/cmake-toolchain-build-release"].
tools.apple:enable_bitcode=True
tools.apple:enable_arc=True

[buildenv]

The cmake dependencies work fine. However, the autotools projects do not respect the bitcode and arc settings.

Right now I can work around this with the following code in a conanfile

def generate(self):
    tc = AutotoolsToolchain(self)
    if is_apple_os(self):
        if self.conf.get('tools.apple:enable_bitcode', check_type=bool)
            tc.extra_cflags.append('-fembed-bitcode')
            tc.extra_cxxflags.append('-fembed-bitcode')

But I'm confused, I have to do this in every recipe.

How is it supposed to work in general? Is there any reason not to respect the settings in the common AutotoolsToolchain?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@SpaceIm
Copy link
Contributor

SpaceIm commented Mar 29, 2024

There is already an issue: #12197

I've proposed #15027

@lagner lagner closed this as completed Mar 30, 2024
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

No branches or pull requests

2 participants