I cloned Apple's LLVM repo from github, then I took the apple/stable/20200714 branch, and successfully built an Xcode toolchain.
Using that locally built toolchain, I built my static framework with bitcode enabled, and included that framework in my iOS app project.
When I was trying to build the app with bitcode enabled, everything was fine, until I choose to "Archive" the app, the following error is encountered:
ld: loaded libLTO doesn't support -bitcode_hide_symbols: LLVM version 11.0.1release for architecture armv7
This error only happens when I use my locally built toolchain. No error when archiving with Xcode's default toolchain.
Since I used the stable branch of the Apple-LLVM, I didn't expect the difference in the behavior.
My Xcode version is 11.5.
I kind of expected the local build of the apple-llvm toolchain to behave the same as the pre-built toolchain that’s included in Xcode.
Right now there’s a difference between the two, and I am not sure whether I missed anything.
So,
Is there any difference between the toolchain on Apple’s Github and the one came with Xcode?
Or is there anything specific that I have to pay attention to when I try to build the toolchain locally?
question from:
https://stackoverflow.com/questions/65880966/trying-to-support-bitcode-with-locally-built-apple-llvm 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…