Skip to content

fix: rebuild UnicodeCLib on toolchain changes and drop ntohl/htonl - #210

Merged
fgdorais merged 2 commits into
mainfrom
claude/project-thread-kywg1r
Nov 9, 2026
Merged

fgdorais merged 2 commits into
mainfrom
claude/project-thread-kywg1r

Conversation

@fgdorais

@fgdorais fgdorais commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

UnicodeCLib objects now include the Lean toolchain in their build trace (extraDepTrace := getLeanTrace), so they are rebuilt when the toolchain, and hence lean.h, changes. They are still compiled with the system cc as before.

basic.c now packs and unpacks script abbreviations with byte shifts instead of ntohl/htonl, so it no longer needs arpa/inet.h or winsock2.h, and the char * to uint32_t * casts are gone. Results are unchanged and TestTables passes.

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

Use buildLeanO instead of buildO so the C tables are compiled by the
toolchain's clang with Lean's C flags (honoring LEAN_CC) instead of the
system cc. Building no longer requires a system C compiler.

Replace ntohl/htonl in basic.c with byte shifts, since the Lean sysroot
has no arpa/inet.h; this also drops the winsock2.h dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fgdorais fgdorais self-assigned this Nov 9, 2026
Keep compiling UnicodeCLib with the system C compiler as before, but add
the Lean toolchain to its trace so the objects are rebuilt when lean.h
changes. The portable basic.c rewrite stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fgdorais fgdorais changed the title fix: build UnicodeCLib with Lean's bundled C compiler fix: rebuild UnicodeCLib on toolchain changes and drop ntohl/htonl Nov 9, 2026
@fgdorais
fgdorais merged commit 7dcace6 into main Nov 9, 2026
1 check passed
@fgdorais
fgdorais deleted the claude/project-thread-kywg1r branch November 9, 2026 02:48
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.

2 participants