I’m trying to do the same as Uber did in that article, I was able to replicate it, but the problem comes when embed bitcode is enabled.
1.- I compile with Xcode with -emit-bc (for swift compiler) and flto=thin (clang compiler). Also I enable bitcode in Xcode settings (that adds -fembed-bitcode flag)
Hey friend, have you figured out the solution? I’m currently working on this too, thinking a way to deal with xcode settings to do this job. Custom some of the link tools
Unfortunately I haven’t found a solution, I ended up disabling Bitcode for now.
I had a WWDC lab with Apple Devs regarding this, and they suggested to me to edit the __LLVM, __cmdline section of app.ll (more info here Embedded Bitcode)
Basically, that section contains the commands that bitcode-build-tool uses to rebuild the application from the Bitcode section. You can find bitcode-build-tool in the Xcode directory, or use this repo as a reference bitcode-build-tool
In our case, __LLVM, __cmdline contains the concatenated instructions of each file that was linked with llvm-link, so the idea is to rewrite that section (or even better to add this capability to the LLVM tools in some way) to contain only one instruction since now we only have 1 file containing the complete application. But that was only an idea, not really sure if it’s gonna work.
I have not tried it myself, but I will post here what happens with that.
Sorry for the delay. And yes I am. I’m doing this taking into account pods.
I made a medium post explaining all you need to know, and there’s also a GitHub repo with an example