Skip to content

Commit 9c3f517

Browse files
tsafinclaude
andcommitted
build: Fix Rust env var passing in cargo build command
Corrected cargo invocation to properly pass RUSTC environment variable. Changed from: cmake -E env RUSTC=${RUSTC_ENV_VAR} cargo ... To: env RUSTC=${RUSTC_ENV_VAR} cargo ... This prevents CMake from incorrectly quoting the path and allows cargo to correctly find the rustc compiler. Verified clean build results: ✓ No Rust artifacts in source tree (third_party/lance-ffi/target/) ✓ All artifacts in CMAKE_BINARY_DIR/rust/ (proper isolation) ✓ Final library in CMAKE_BINARY_DIR/liblance_ffi.a ✓ Build completed successfully with -j8 parallel make Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent dcf6e90 commit 9c3f517

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ if(TPCH_ENABLE_LANCE AND Lance_FOUND)
239239
# Note: Cargo target directory is set to build/rust to keep artifacts out of source tree
240240
# All build artifacts go to CMAKE_BINARY_DIR/rust, NOT source tree
241241
# On macOS, we specify the target triple to ensure correct output directory
242-
set(CARGO_BUILD_CMD "${CMAKE_COMMAND}" -E env RUSTC="${RUSTC_ENV_VAR}"
242+
# RUSTC env var ensures correct rustc version is used (snap vs system)
243+
set(CARGO_BUILD_CMD "env" "RUSTC=${RUSTC_ENV_VAR}"
243244
"${Cargo_EXECUTABLE}" build --release
244245
--manifest-path "${LANCE_FFI_DIR}/Cargo.toml"
245246
--target-dir "${LANCE_FFI_BUILD_DIR}")

0 commit comments

Comments
 (0)