Darwin builds fail because i386 gets enabled in compiler-rt builtins
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
On recent macos systems, the old i386 arch is disabled even if the system SDK lists it as supported. However, while all the other subprojects correctly diagnose the situation and adequately remove i386 from the list of architectures to compile for, the builtins behave differently and fail to build.
Because the builtins are configured on the fly in the middle of the build step, this behavior is actually very difficult to work around. I have found evidence that the homebrew folks ran into the same issue (see. https://github.com/Homebrew/homebrew-core/blob/main/Formula/l/llvm.rb#L222) and found some hack to avoid the problem, but I could not make their technique work reliably.
Contributor guide
Research direction
Start by tracing how compiler-rt builtins configure their Darwin architectures during the build, then compare that behavior with the other subprojects that remove i386 and with the Homebrew LLVM formula linked in the issue. Done means Darwin builds no longer attempt i386 when the host system disables it, while supported architectures still build.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100