diff options
author | m-lima <m-lima@users.noreply.github.com> | 2023-02-13 17:52:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 17:52:10 +0100 |
commit | d1b458e37bf740a3a45bb80fb62edfb440e32ac3 (patch) | |
tree | 2643c40fc73aee380fd007dfe91a7a23e71a8354 /xtask | |
parent | 5eb2d055ffa23f6775c12d7cc7e900e0d66a3def (diff) |
chore(build): make the singlepass compiler opt-in through flags (#2146)
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/flags.rs | 6 | ||||
-rw-r--r-- | xtask/src/pipelines.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xtask/src/flags.rs b/xtask/src/flags.rs index df785e546..2aed0013f 100644 --- a/xtask/src/flags.rs +++ b/xtask/src/flags.rs @@ -63,8 +63,8 @@ xflags::xflags! { cmd run { /// Take plugins from here, skip building plugins. Passed to zellij verbatim optional --data-dir path: PathBuf - /// Force the use of Cranelift for compiling WASM modules - optional --cranelift + /// Enable the singlepass compiler for WASM plugins + optional --singlepass /// Arguments to pass after `cargo run --` repeated args: OsString } @@ -176,7 +176,7 @@ pub struct Run { pub data_dir: Option<PathBuf>, - pub cranelift: bool, + pub singlepass: bool, } #[derive(Debug)] diff --git a/xtask/src/pipelines.rs b/xtask/src/pipelines.rs index 69737c25c..a615c0971 100644 --- a/xtask/src/pipelines.rs +++ b/xtask/src/pipelines.rs @@ -94,7 +94,7 @@ pub fn install(sh: &Shell, flags: flags::Install) -> anyhow::Result<()> { pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { let err_context = || format!("failed to run pipeline 'run' with args {flags:?}"); - let cranelift = flags.cranelift.then_some(["--features", "force_cranelift"]); + let singlepass = flags.singlepass.then_some(["--features", "singlepass"]); if let Some(ref data_dir) = flags.data_dir { let data_dir = sh.current_dir().join(data_dir); @@ -105,7 +105,7 @@ pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { .args(["--package", "zellij"]) .arg("--no-default-features") .args(["--features", "disable_automatic_asset_installation"]) - .args(cranelift.iter().flatten()) + .args(singlepass.iter().flatten()) .args(["--", "--data-dir", &format!("{}", data_dir.display())]) .args(&flags.args) .run() @@ -124,7 +124,7 @@ pub fn run(sh: &Shell, flags: flags::Run) -> anyhow::Result<()> { .and_then(|_| crate::cargo()) .and_then(|cargo| { cmd!(sh, "{cargo} run") - .args(cranelift.iter().flatten()) + .args(singlepass.iter().flatten()) .args(["--"]) .args(&flags.args) .run() |