App crash on launch using Xcode 15 and iOS 14 simulator

When use Xcode15 and iOS 14 simulator to run app, it will crash, and the crash stack is:

Thread 1 Queue : com.apple.main-thread (serial)
#0 0x0000000104b074a5 in __cxx_global_var_init.4 ()
#1 0x000000014fb6ec95 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()
#2 0x000000014fb6f08a in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) ()
#3 0x000000014fb69bb7 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#4 0x000000014fb67ec7 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#5 0x000000014fb67f68 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) ()
#6 0x000000014fb5b26b in dyld::initializeMainExecutable() ()
#7 0x000000014fb5ff56 in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#8 0x000000014fb5a1c2 in start_sim ()
#9 0x000000024760e424 in dyld4::prepareSim(dyld4::RuntimeState&, char const*) ()
#10 0x000000024760cabc in dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) ()
#11 0x000000024760c3bd in start ()

And I found two same issues: 1.https://issuetracker.google.com/issues/301372178; 2.https://github.com/realm/realm-swift/issues/8369

From these two issue, I know Xcode15 use new linker(ld_prime), and not support iOS <15;

So if we want to support iOS 14, we only have one solution that add the -Wl,-ld_classic options to the OTHER_LDFLAGS?

And for now, the crash only happened in iOS 14 simulator, but will it affect the iPhone device if we don't add the -Wl,-ld_classic options to the OTHER_LDFLAGS?

App crash on launch using Xcode 15 and iOS 14 simulator
 
 
Q