Repository navigation
fix: rebuild UnicodeCLib on toolchain changes and drop ntohl/htonl - #210
Merged
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UnicodeCLib objects now include the Lean toolchain in their build trace (
extraDepTrace := getLeanTrace), so they are rebuilt when the toolchain, and hencelean.h, changes. They are still compiled with the systemccas before.basic.cnow packs and unpacks script abbreviations with byte shifts instead ofntohl/htonl, so it no longer needsarpa/inet.horwinsock2.h, and thechar *touint32_t *casts are gone. Results are unchanged and TestTables passes.Co-authored-by: Claude Opus 5.5 noreply@anthropic.com