feat: add Linux UAPI headers formula - #529
Conversation
There was a problem hiding this comment.
Reviewed the complete Linux UAPI formula diff. The build and consumer-test paths are internally consistent, but the module needs Linux-aware tag ordering to avoid selecting release candidates over final releases.
Validation: inspected LLAR bd473ea21632d57a4ed21e54144a55d0ee6c1872, Linux v5.7 Kbuild behavior, and reproduced the default comparator ordering. A local llar test ./torvalds/linux@v5.7 --os linux --arch amd64 compiled and loaded the formula, then stopped because this runner does not have Clang installed.
| id "torvalds/linux" | ||
|
|
||
| // Linux 5.7 introduced LLVM=1 for both target tools and host Clang. | ||
| fromVer "v5.7" |
There was a problem hiding this comment.
[P2] Define Linux release-aware tag ordering
Without a _cmp.gox, LLAR uses GNU version comparison, which orders a final tag before its RC suffix (for example, v7.2 < v7.2-rc7). As a result, whenever the newest release has no next-cycle RC yet, an unversioned torvalds/linux request resolves to the release candidate instead of the final release. Add a Linux-aware comparator that treats -rcN as a prerelease of the matching final version while still handling the repository's complete historical tag set.
Add a standalone Linux UAPI headers formula with Linux-aware release ordering.
The implementation includes:
make headers_install,LLVM=1, and an explicit targetARCHfor Linuxamd64andarm64.v5.7, where upstream introducedLLVM=1.-rcNtags before final releases and-dontusevariants before their normal RC, while retaining GNU numeric ordering for historical tags.v5.7formula boundary, and dependency version selection.This keeps header exports architecture-correct and prevents unversioned requests from selecting an older RC after its final release. Next-cycle RCs remain newer than the preceding final release; LLAR's global comparator and Git reference handling are unchanged.