Skip to content

fix(libsql-sqlite3-parser): cross-compilation for lemon generator#2256

Open
salim-b wants to merge 1 commit into
tursodatabase:mainfrom
salim-b:patch-1
Open

fix(libsql-sqlite3-parser): cross-compilation for lemon generator#2256
salim-b wants to merge 1 commit into
tursodatabase:mainfrom
salim-b:patch-1

Conversation

@salim-b

@salim-b salim-b commented Jul 12, 2026

Copy link
Copy Markdown

Force the cc crate to ignore cross-compilation environment variables and use the host's native compiler and architecture settings.

Fixes an issue where libsql-sqlite3-parser fails to cross-compile on Windows (e.g., building for aarch64-pc-windows-msvc on an x86_64 host).

During the build process, the build.rs script compiles lemon.c into a helper executable (rlemon). Previously, the build configuration was not strictly isolating the host environment. This resulted in the MSVC cross-compiler attempting to build the lemon binary for the target architecture (arm64), causing an ERROR_EXE_MACHINE_TYPE_MISMATCH (Error 216) when the build script attempted to execute the resulting binary on the x64 host machine.

Force the `cc` crate to ignore cross-compilation environment variables
and use the host's native compiler and architecture settings.
@salim-b salim-b changed the title fix: cross-compilation for lemon generator fix(libsql-sqlite3-parser): cross-compilation for lemon generator Jul 12, 2026
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