Skip to content

Commit d074885

Browse files
committed
rename --force-spirv-cli-rebuild to --rebuild-codegen
1 parent 792b719 commit d074885

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ for an example.
9494
* If `--spirv-builder-source` is set, then this is assumed to be a Git "commitsh", such
9595
as a Git commit hash or a Git tag, therefore anything that `git checkout` can resolve.
9696
97-
--force-spirv-cli-rebuild
97+
--rebuild-codegen
9898
Force `rustc_codegen_spirv` to be rebuilt
9999
100100
--auto-install-rust-toolchain
101101
Assume "yes" to "Install Rust toolchain: [y/n]" prompt
102102
103+
--no-clear-target
104+
Clear target dir of `rustc_codegen_spirv` build after a successful build, saves about 200MiB of disk space
105+
103106
--force-overwrite-lockfiles-v4-to-v3
104107
There is a tricky situation where a shader crate that depends on workspace config can have
105108
a different `Cargo.lock` lockfile version from the the workspace's `Cargo.lock`. This can
@@ -148,12 +151,15 @@ for an example.
148151
* If `--spirv-builder-source` is set, then this is assumed to be a Git "commitsh", such
149152
as a Git commit hash or a Git tag, therefore anything that `git checkout` can resolve.
150153
151-
--force-spirv-cli-rebuild
154+
--rebuild-codegen
152155
Force `rustc_codegen_spirv` to be rebuilt
153156
154157
--auto-install-rust-toolchain
155158
Assume "yes" to "Install Rust toolchain: [y/n]" prompt
156159
160+
--no-clear-target
161+
Clear target dir of `rustc_codegen_spirv` build after a successful build, saves about 200MiB of disk space
162+
157163
--force-overwrite-lockfiles-v4-to-v3
158164
There is a tricky situation where a shader crate that depends on workspace config can have
159165
a different `Cargo.lock` lockfile version from the the workspace's `Cargo.lock`. This can

crates/cargo-gpu/src/args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub struct InstallArgs {
6565

6666
/// Force `rustc_codegen_spirv` to be rebuilt.
6767
#[clap(long)]
68-
pub force_spirv_cli_rebuild: bool,
68+
pub rebuild_codegen: bool,
6969

7070
/// Assume "yes" to "Install Rust toolchain: [y/n]" prompt.
7171
#[clap(long, action)]

crates/cargo-gpu/src/install.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ package = "rustc_codegen_spirv"
7979
let path = target_spec_dir()
8080
.context("creating target spec dir")?
8181
.join(filename);
82-
if !path.is_file() || self.spirv_install.force_spirv_cli_rebuild {
82+
if !path.is_file() || self.spirv_install.rebuild_codegen {
8383
let mut file = std::fs::File::create(&path)
8484
.with_context(|| format!("creating file at [{}]", path.display()))?;
8585
file.write_all(contents.as_bytes())
@@ -129,9 +129,8 @@ package = "rustc_codegen_spirv"
129129
}
130130
}
131131

132-
let skip_rebuild = !source_is_path
133-
&& dest_dylib_path.is_file()
134-
&& !self.spirv_install.force_spirv_cli_rebuild;
132+
let skip_rebuild =
133+
!source_is_path && dest_dylib_path.is_file() && !self.spirv_install.rebuild_codegen;
135134
if skip_rebuild {
136135
log::info!("...and so we are aborting the install step.");
137136
} else {

crates/shader-crate-template/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ manifest-file = "manifest.json"
8686

8787
# Whether to assume "yes" to the "Install Rust toolchain: [y/n]" prompt.
8888
auto-install-rust-toolchain = false
89-
# Force `spirv-builder-cli` and `rustc_codegen_spirv` to be rebuilt.
90-
force-spirv-cli-rebuild = false
89+
# Force `rustc_codegen_spirv` to be rebuilt.
90+
rebuild_codegen = false
9191
# There is a tricky situation where a shader crate that depends on workspace config can have
9292
# a different `Cargo.lock` lockfile version from the the workspace's `Cargo.lock`. This can
9393
# prevent builds when an old Rust toolchain doesn't recognise the newer lockfile version.

crates/xtask/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn main() {
172172
"--shader-crate",
173173
SHADER_CRATE_PATH,
174174
"--auto-install-rust-toolchain",
175-
"--force-spirv-cli-rebuild",
175+
"--rebuild-codegen",
176176
"--force-overwrite-lockfiles-v4-to-v3",
177177
])
178178
.unwrap();

0 commit comments

Comments
 (0)