Skip to content

Use target compilation mode for Cargo build scripts#24

Merged
dzbarsky merged 1 commit into
mainfrom
zbarsky/build-script-libtool
Jun 22, 2026
Merged

Use target compilation mode for Cargo build scripts#24
dzbarsky merged 1 commit into
mainfrom
zbarsky/build-script-libtool

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Jun 8, 2026

Copy link
Copy Markdown
Member

cargo_build_script now applies config.exec().and_then(...) only to the script attribute and restores the parent compilation_mode through target_compilation_mode. The runner no longer has a second deps exec edge; it reads transitive BuildInfo values from the script binary’s DepInfo.

The new rolling-Bazel aquery regression compares the target and build-script dependency Rustc arguments, environment, execution requirements, execution platform, mapped inputs and outputs, param files, and process_wrapper. Validation passed on Bazel main and the Bazel 9.1.1 fallback; a remote-cache build reported one deduplicated spawn with matching SHA-256 digests.

@dzbarsky dzbarsky force-pushed the zbarsky/build-script-libtool branch from 3356d13 to 44dca84 Compare June 22, 2026 15:20
@dzbarsky dzbarsky changed the title Fix libtool configuration for Cargo build scripts Use target compilation mode for Cargo build scripts Jun 22, 2026
@dzbarsky dzbarsky force-pushed the zbarsky/build-script-libtool branch from 44dca84 to 546fe31 Compare June 22, 2026 16:06
@dzbarsky dzbarsky merged commit 0a4149d into main Jun 22, 2026
3 checks passed
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