Apple has not released the source to ld-prime. Apple has updated the ld64 source dumps on github and opensource.apple.com a few times since and they do not contain ld-prime source code. Hopefully they release it eventually!
Post
Replies
Boosts
Views
Activity
Here's the relevant discussion on LLVM's discussion forums: https://discourse.llvm.org/t/why-does-march-native-not-work-on-apple-m1/2733
You can find a workaround in this thread as well https://forums.swift.org/t/async-await-crash-on-ios14-with-xcode-13-2-1/54541
I filed FB9632180 with a few sysdiagnoses from machines that hit this
Based on the Xcode 13 beta 3 release notes this should work:
Resolved an issue where Xcode and xcodebuild might fail to build iOS, tvOS, and watchOS projects under Rosetta in macOS 12 beta 3. (78967162) (FB9130594)
For _simple_getenv specifically this old version of it is probably good enough https://opensource.apple.com/source/libplatform/libplatform-161/src/simple/getenv.c.auto.html
I filed FB7746173 with a repro case