@@ -282,8 +282,8 @@ def add_cargo_rules(self, rustargs: Path, rust_target: Path) -> None:
282
282
description = "cargo compile $name" ,
283
283
pool = "console" ,
284
284
command = "cd $builddir "
285
- + " && config=$config $cargo build --manifest-path=$sourcedir/Cargo.toml --release"
286
- + " && touch $out && cd -" ,
285
+ + " && config=$config $cargo build --manifest-path=$sourcedir/Cargo.toml --release"
286
+ + " && touch $out && cd -" ,
287
287
)
288
288
self ._ninja .newline ()
289
289
self ._ninja .rule (
@@ -302,14 +302,18 @@ def add_cargo_package(self, package: "Package") -> None:
302
302
"cmd" : "cargo_config" ,
303
303
"args" : f"--rustargs-file={ str (package ._parent ._kernel .rustargs )} "
304
304
+ f"--target-file={ str (package ._parent ._kernel .rust_target )} "
305
- + f"--extra-args=\" " + " " .join (package .build_options ) + "\" "
305
+ + f'--extra-args="'
306
+ + " " .join (package .build_options )
307
+ + '" '
306
308
+ f"{ str (package .build_dir )} " ,
307
309
"description" : f"cargo config { package .name } " ,
308
310
},
309
311
order_only = [f"{ dep } _install.stamp" for dep in package .deps ],
310
312
)
311
313
self ._ninja .newline ()
312
- self ._ninja .build (f"{ package .name } _setup" , "phony" , f"{ package .build_dir } /.cargo/config.toml" )
314
+ self ._ninja .build (
315
+ f"{ package .name } _setup" , "phony" , f"{ package .build_dir } /.cargo/config.toml"
316
+ )
313
317
self ._ninja .newline ()
314
318
self ._ninja .build (
315
319
f"{ package .name } _compile.stamp" ,
@@ -339,7 +343,7 @@ def add_cargo_package(self, package: "Package") -> None:
339
343
"args" : f"--suffix=.elf "
340
344
+ f"--target-file={ str (package ._parent ._kernel .rust_target )} "
341
345
+ f"{ str (package .build_dir )} "
342
- + " " .join ((str (t .with_suffix ('' )) for t in package .installed_targets )),
346
+ + " " .join ((str (t .with_suffix ("" )) for t in package .installed_targets )),
343
347
"description" : f"cargo install { package .name } " ,
344
348
},
345
349
)
0 commit comments