Locally Built Apple-LLVM Toolchain Can't Built Bitcode Supported Static Framework

I cloned Apple's LLVM repo from github (link), 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:
Code Block
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.

Any input regarding this issue will be highly appreciated.
What problem are you trying to solve? Bitcode is generally only useful for builds destined for the App Store, which will need the Xcode default toolchain anyway. If you're encountering an issue with the default toolchain, please fully describe that issue and use Feedback Assistant to open a bug report. Please post the FB number here.
Hi @edford,

I am experimenting with adding custom modifications to the default toolchain.

I expect 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?

I expect the local build of the apple-llvm toolchain to behave the same as the pre-built toolchain that’s included in Xcode.

As far as I know, Apple has never stated the open source version and the bundled version are the same.
Have you ever found any article that the two are the same?

I guess Apple would not reveal what are the differences between the two versions to check if apps built for App Store are really built with the genuine tool.
Locally Built Apple-LLVM Toolchain Can't Built Bitcode Supported Static Framework
 
 
Q