Pull in latest upstream n2 fixes

- Fixes an issue where tasks would continue to appear active for a while
after they had finished on Unix platforms
- The latest n2 now behaves the same way as ninja when substituting
variables, so we no longer need to do the substitution ourselves.
This commit is contained in:
Damien Elmes 2023-08-31 07:33:14 +10:00
parent 740528eaf9
commit e07e60495b
2 changed files with 6 additions and 9 deletions

View file

@ -22,12 +22,17 @@ impl Build {
) )
.unwrap(); .unwrap();
writeln!(&mut buf, "builddir = {}", self.buildroot.as_str()).unwrap();
writeln!( writeln!(
&mut buf, &mut buf,
"runner = $builddir/rust/release/{}", "runner = $builddir/rust/release/{}",
with_exe("runner") with_exe("runner")
) )
.unwrap(); .unwrap();
for (key, value) in &self.variables {
writeln!(&mut buf, "{} = {}", key, value).unwrap();
}
buf.push('\n');
for (key, value) in &self.pools { for (key, value) in &self.pools {
writeln!(&mut buf, "pool {}\n depth = {}", key, value).unwrap(); writeln!(&mut buf, "pool {}\n depth = {}", key, value).unwrap();
@ -49,14 +54,6 @@ impl Build {
buf.push_str(&self.trailing_text); buf.push_str(&self.trailing_text);
buf = buf.replace("$builddir", self.buildroot.as_str());
for (key, value) in &self.variables {
buf = buf.replace(
&format!("${key}"),
&value.replace("$builddir", self.buildroot.as_str()),
);
}
buf buf
} }

View file

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
cargo install --git https://github.com/ankitects/n2.git --rev 56202604d4c541524b82381162eafae4290fdd22 cargo install --git https://github.com/ankitects/n2.git --rev 3eca2545a8f4c8cbdd8ed697936bd2ae929b55dd