Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

formula: anrieff/libcpuid - #519

Open
MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/243-libcpuid-luna
Open

MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/243-libcpuid-luna

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

Summary

  • Add the anrieff/libcpuid LLAR Formula with v0.5.0, v0.6.0, and v0.7.0 thresholds covering the complete upstream tag set through v0.8.1.
  • Translate the Conan Center v0.5.1 recipe, including its CMake patch, shared/fPIC options, x86-only matrix contract, license/tool installation, and relocatable libcpuid.pc metadata.
  • Verify the installed headers/library and complete pkg-config lookup through an independent C consumer and cpuid_tool --report; no direct dependencies.

Validation

  • Exact v0.5.0 and v0.5.1 tests pass on native darwin/amd64 under Rosetta, including static and shared builds.
  • fPIC=OFF, v0.6.0, v0.6.5, default latest v0.8.1, and cache-hit consumer tests pass on darwin/amd64.
  • darwin/arm64 is rejected by the Formula filter as unsupported by the pinned Conan recipe.
  • Linux cross-build was attempted with exact LLAR 9c062aa5c4b1724bfd30cb72f7e0bda136f9c078 but could not start because this host has no ld.lld.

Closes #243

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formula structure, version thresholds, patched v0.5 build, CMake option handling, pkg-config metadata, and independent consumer tests were reviewed against the requested Conan recipe and upstream tags. One architecture-filter regression is called out inline; the shared/fPIC combinations and representative upstream CMake configurations otherwise match the inspected source behavior.

Verified the v0.7.0 shared build with fPIC=OFF directly against upstream; it succeeds.

}
}
}
return slices.contains(target.require["arch"], "amd64")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Preserve 32-bit x86 support in the architecture filter

The Conan recipe's validate contract explicitly accepts both x86 and x86_64, and the upstream project publishes ix86 builds. LLAR represents 32-bit x86 as 386, so this filter rejects a supported target before onBuild runs; the same predicate is duplicated in the v0.6.0 and v0.7.0 thresholds. Include 386 alongside amd64 (or otherwise mirror the recipe's x86/x86_64 matrix) so the formula does not silently drop a supported architecture.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate Conan Center libcpuid recipe to LLAR

1 participant