Skip to content

Define Darwin GMP limb flag for witness builds#413

Open
Kuhai9801 wants to merge 2 commits into
iden3:masterfrom
Kuhai9801:long-long-limb-witness-build
Open

Define Darwin GMP limb flag for witness builds#413
Kuhai9801 wants to merge 2 commits into
iden3:masterfrom
Kuhai9801:long-long-limb-witness-build

Conversation

@Kuhai9801

@Kuhai9801 Kuhai9801 commented Jun 2, 2026

Copy link
Copy Markdown

Summary

  • set -D_LONG_LONG_LIMB for generated C++ witness builds on Darwin
  • pass the GMP flag through all generated C++ object compile rules
  • cover the Goldilocks json2bin64 compile path and add generated Makefile regression coverage

Why

On Darwin, GMP limb types can require _LONG_LONG_LIMB for generated witness C++ to agree with GMP's mp_limb_t layout. Linux and other platforms keep an empty flag.

Addresses #351.

Test

  • cargo test -p code_producers -- --test-threads=1
  • cargo build -p circom
  • macOS arm64 generated witness compile proof: upstream master fails with GMP uint64_t * to mp_ptr conversion errors, while this branch builds the generated witness successfully: https://github.com/Kuhai9801/circom/actions/runs/26813644848

@Kuhai9801 Kuhai9801 force-pushed the long-long-limb-witness-build branch from bd7c50f to 005335c Compare June 2, 2026 09:29
@Kuhai9801 Kuhai9801 closed this Jun 2, 2026
@Kuhai9801 Kuhai9801 reopened this Jun 2, 2026
@Kuhai9801 Kuhai9801 marked this pull request as ready for review June 2, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant