Implement OpenBSD amd64 code generation, std providers and executable cases
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
OpenBSD currently has disabled case entries, but `llvm/src/codegen/target.rs` has no OpenBSD target and std dispatch selects only Linux, macOS, Windows and FreeBSD. The existing placeholder cases do not establish runtime support.
Implement the first executable OpenBSD target, `x86_64-unknown-openbsd`, under #471. Add the target and C calling-convention checks against Clang, OpenBSD-specific linker/startup/sysroot handling, and OS-specific std providers. Use OpenBSD's own headers for syscall IDs, socket layouts, errno and time APIs; do not reuse FreeBSD constants by assumption. Exercise imports, aggregate returns, pointers, variants, filesystem operations and local sockets in an OpenBSD VM. Follow with arm64 and riscv64 only where the OS and available test environment support them.
Completion requires actual execution and recorded OS/toolchain versions, not just LLVM object emission or a manifest flag. Missing runtime support must produce a diagnostic rather than a Linux fallback. Preserve all Windows GNU targets.
Official platform list: https://www.openbsd.org/plat.html
Parent: #471. No new parser library or language-definition system is part of this work.
Contributor guide
Research direction
Start with llvm/src/codegen/target.rs, the existing disabled OpenBSD cases, and the std dispatch paths; compare their target and provider handling with supported operating systems. Validate the x86_64-unknown-openbsd target in an OpenBSD VM against Clang, then exercise the listed runtime cases and record the OS and toolchain versions, including a diagnostic for unsupported runtime targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, operating-systems, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100