mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
xtask: ensure loader is build with lto,codegenunits=1
If the loader is not build with these two parameters, then Weird Things happen with the font table. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
4d416ce4c6
commit
c1e585c37c
1 changed files with 14 additions and 0 deletions
|
|
@ -876,6 +876,14 @@ fn build_hw_image(
|
|||
pkg_path.push(pkg);
|
||||
init.push(pkg_path);
|
||||
}
|
||||
let existing_lto = std::env::var("CARGO_PROFILE_RELEASE_LTO")
|
||||
.map(|v| Some(v))
|
||||
.unwrap_or(None);
|
||||
let existing_codegen_units = std::env::var("CARGO_PROFILE_RELEASE_CODEGEN_UNITS")
|
||||
.map(|v| Some(v))
|
||||
.unwrap_or(None);
|
||||
std::env::set_var("CARGO_PROFILE_RELEASE_LTO", "true");
|
||||
std::env::set_var("CARGO_PROFILE_RELEASE_CODEGEN_UNITS", "1");
|
||||
let mut loader = build(
|
||||
&["loader"],
|
||||
debug,
|
||||
|
|
@ -884,6 +892,12 @@ fn build_hw_image(
|
|||
None,
|
||||
loader_features,
|
||||
)?;
|
||||
if let Some(existing) = existing_lto {
|
||||
std::env::set_var("CARGO_PROFILE_RELEASE_LTO", existing);
|
||||
}
|
||||
if let Some(existing) = existing_codegen_units {
|
||||
std::env::set_var("CARGO_PROFILE_RELEASE_CODEGEN_UNITS", existing);
|
||||
}
|
||||
loader.push(PathBuf::from("loader"));
|
||||
|
||||
let output_bundle = create_image(&kernel, &init, debug, MemorySpec::SvdFile(svd_file))?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue