mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
build(core/rust): enable panic_immediate_abort for firmware
This commit is contained in:
parent
612d52e298
commit
20ac679651
@ -37,7 +37,7 @@ let
|
||||
];
|
||||
# we use rustfmt from nixpkgs because it's built with the nighly flag needed for wrap_comments
|
||||
# to use official binary, remove rustfmt from buildInputs and add it to extensions:
|
||||
extensions = [ "clippy" "rustfmt" ];
|
||||
extensions = [ "rust-src" "clippy" "rustfmt" ];
|
||||
};
|
||||
llvmPackages = nixpkgs.llvmPackages_13;
|
||||
# see pyright/README.md for update procedure
|
||||
|
@ -719,7 +719,16 @@ def cargo_build():
|
||||
if PYOPT == '0':
|
||||
features.append('ui_debug')
|
||||
|
||||
return f'cd embed/rust; cargo build {profile} --target={RUST_TARGET} --target-dir=../../build/firmware/rust --no-default-features --features "{" ".join(features)}"'
|
||||
cargo_opts = [
|
||||
f'--target={RUST_TARGET}',
|
||||
f'--target-dir=../../build/firmware/rust',
|
||||
'--no-default-features',
|
||||
'--features ' + ','.join(features),
|
||||
'-Z build-std=core',
|
||||
'-Z build-std-features=panic_immediate_abort',
|
||||
]
|
||||
|
||||
return f'cd embed/rust; cargo build {profile} ' + ' '.join(cargo_opts)
|
||||
|
||||
rust = env.Command(
|
||||
target=RUST_LIBPATH,
|
||||
|
Loading…
Reference in New Issue
Block a user