Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: Changed build script run 'output' dir to 'stdout'
This commit changes the directory name of the `output` file to `stdout` in
order to match the naming of `stderr` and better represent the contents
it contains.
  • Loading branch information
ranger-ross committed Feb 14, 2026
commit f7bcfe40a69576c713b69c4cc593160ea4b41352
6 changes: 5 additions & 1 deletion src/cargo/core/compiler/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,11 @@ struct BuildScriptRunFiles {
impl BuildScriptRunFiles {
pub fn for_unit(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> Self {
let root = build_runner.files().build_script_run_dir(unit);
let stdout = root.join("output");
let stdout = if build_runner.bcx.gctx.cli_unstable().build_dir_new_layout {
root.join("stdout")
} else {
root.join("output")
};
let stderr = root.join("stderr");
let root_output = root.join("root-output");
Self {
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/build_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ fn build_script_should_output_to_build_dir() {
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/fingerprint/build-script-build-script-build
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/fingerprint/build-script-build-script-build.json
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/run/invoked.timestamp
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/run/output
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/run/stdout
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/run/root-output
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/run/stderr
[ROOT]/foo/build-dir/debug/build/foo/[HASH]/.lock
Expand Down