mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-01 20:32:35 +00:00
feat(core/rust): propagate bitcoin_only flag to Rust build
This commit is contained in:
parent
845a66a7de
commit
c06a93cba5
@ -665,7 +665,11 @@ def cargo_build():
|
|||||||
profile = '--release'
|
profile = '--release'
|
||||||
else:
|
else:
|
||||||
profile = ''
|
profile = ''
|
||||||
return f'cd embed/rust; cargo build {profile} --target={RUST_TARGET} --target-dir=../../build/firmware/rust'
|
features = []
|
||||||
|
if BITCOIN_ONLY == "1":
|
||||||
|
features.append("bitcoin_only")
|
||||||
|
|
||||||
|
return f'cd embed/rust; cargo build {profile} --target={RUST_TARGET} --target-dir=../../build/firmware/rust --features "{" ".join(features)}"'
|
||||||
|
|
||||||
rust = env.Command(
|
rust = env.Command(
|
||||||
target=RUST_LIBPATH,
|
target=RUST_LIBPATH,
|
||||||
|
@ -617,7 +617,11 @@ def cargo_build():
|
|||||||
profile = '--release'
|
profile = '--release'
|
||||||
else:
|
else:
|
||||||
profile = ''
|
profile = ''
|
||||||
return f'cd embed/rust; cargo build {profile} --target-dir=../../build/unix/rust'
|
features = []
|
||||||
|
if BITCOIN_ONLY == "1":
|
||||||
|
features.append("bitcoin_only")
|
||||||
|
|
||||||
|
return f'cd embed/rust; cargo build {profile} --target-dir=../../build/unix/rust --features "{" ".join(features)}"'
|
||||||
|
|
||||||
rust = env.Command(
|
rust = env.Command(
|
||||||
target=RUST_LIBPATH,
|
target=RUST_LIBPATH,
|
||||||
|
@ -6,6 +6,9 @@ edition = "2018"
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
bitcoin_only = []
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["staticlib"]
|
crate-type = ["staticlib"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user