How to create a universal cef.framework includes x86_64 and arm64 for MacOS? especially for snapshot_blob.bin.
I refer to the "Universal Builds" https://chromium.googlesource.com/chromium/src.git/+/master/docs/mac_arm64.md#universal-builds, and tried to create a universal Chromium Embedded Framework.framework for version:4280. But because there are 2 following files in folder "Resources":
snapshot_blob.bin
v8_context_snapshot.x86_64.bin or v8_context_snapshot.arm64.bin
For v8_context_snapshot.bin, it has its own name for different architecture, so the script could handle it. But for snapshot_blob.bin, it has same name in x86_64 and arm64, but the file contents in different architecture are different, so the tool lipo couldn't know how to deal with it:
# universalizer.py Chromium\ Embedded\ Framework.framework arm64/Chromium\ Embedded\ Framework.framework out.framework
fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: Chromium Embedded Framework.framework/Resources/snapshot_blob.bin
The size of snapshot_blob.bin:
# ls Chromium\ Embedded\ Framework.framework/Resources/snapshot_blob.bin -rlta
-rw-r--r-- 1 xxx staff 51441 Dec 12 17:35 'Chromium Embedded Framework.framework/Resources/snapshot_blob.bin'
# Release ls arm64/Chromium\ Embedded\ Framework.framework/Resources/snapshot_blob.bin -rlta
-rw-r--r-- 1 xxx staff 51335 Dec 15 10:51 'arm64/Chromium Embedded Framework.framework/Resources/snapshot_blob.bin'
According to REAMDE.txt:
snapshot_blob.bin, v8_context_snapshot.[x86_64|arm64].bin <= V8 initial snapshot, and they are "Required components"!!!
Look like, different architecture has its own snapshot_blob.bin.
I have done following testing:
1. Delete snapshot_blob.bin
test some website, look like cefclient.app works without snapshot_blob.bin on x86_64 and arm64 architecture
2. Use the snapshot_blob.bin of x86_64 on arm64
cefclient.app on arm64 works with the snapshot_blob.bin of x86_64.
Above all, look like snapshot_blob.bin is non-essential. But I'm no sue if it would error out in some other cases.
My question:
1. Can I delete snapshot_blob.bin?
2. Can I replace the the snapshot_blob.bin of arm64 with the file of x86_64?
3. or Can we change the config file not to generate the snapshot_blob.bin?
Regards