airbnb / airbnb/BuckSample

[Feature] Add bitcode support

Open
#84 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
469
Forks
63
PR merge metrics
No merged PRs in 30d

Description

It would be great to have bitcode support added to the sample.

From the research I had earlier, it's the `-fembed-bitcode` flag that has to be added to compiler and linker flags.
I tried it before, but I think I may have missed couple options, like Swift compiler flags or maybe even `ldflags` (?).

Ideally, the bitcode option should be an on/off option in `.buckconfig`, which could then be controlled from command line.

The reason: to be able to build different projects in monorepo with and without bitcode.
We actually have a setup, where one app can enable bitcode but another one cannot (due to 3-rd party pre-built binary missing bitcode).

I think building with/without bitcode, would mean that different cache directory should be used.

Or, what I tried as well, everything that can be built with bitcode, should be built with bitcode, but then when, say a library, is used in an app that doesn't support bitcode, the bitcode can be stripped out of the binary. That, or each library can generate two artifacts, one with bitcode, one stripped, so then the apps/target products can pick the one fitting their needs.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with .buckconfig and the compiler and linker flag handling described in the issue, including the Swift compiler flags and ldflags. Done means bitcode can be toggled from the configuration or command line while builds with different bitcode settings use appropriate cache directories and produce usable artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c, swift
Domain
build-system, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.