mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-02 22:28:45 +00:00
fix(build): fix ASAN build with num_derive crate
[no changelog]
This commit is contained in:
parent
cc49e2922d
commit
11748b7641
@ -680,12 +680,14 @@ protobuf_blobs = env.Command(
|
|||||||
)
|
)
|
||||||
env.Depends(protobuf_blobs, qstr_generated)
|
env.Depends(protobuf_blobs, qstr_generated)
|
||||||
|
|
||||||
|
TARGET = os.popen("rustc -vV | sed -n 's/host: //p'").read().strip()
|
||||||
|
|
||||||
if ARGUMENTS.get('TREZOR_EMULATOR_DEBUGGABLE', '0') == '1':
|
if ARGUMENTS.get('TREZOR_EMULATOR_DEBUGGABLE', '0') == '1':
|
||||||
RUST_PROFILE = 'dev'
|
RUST_PROFILE = 'dev'
|
||||||
RUST_LIBDIR = 'build/unix/rust/debug'
|
RUST_LIBDIR = f'build/unix/rust/{TARGET}/debug'
|
||||||
else:
|
else:
|
||||||
RUST_PROFILE = 'release'
|
RUST_PROFILE = 'release'
|
||||||
RUST_LIBDIR = 'build/unix/rust/release'
|
RUST_LIBDIR = f'build/unix/rust/{TARGET}/release'
|
||||||
RUST_LIB = 'trezor_lib'
|
RUST_LIB = 'trezor_lib'
|
||||||
RUST_LIBPATH = f'{RUST_LIBDIR}/lib{RUST_LIB}.a'
|
RUST_LIBPATH = f'{RUST_LIBDIR}/lib{RUST_LIB}.a'
|
||||||
|
|
||||||
@ -700,7 +702,7 @@ def cargo_build():
|
|||||||
if DMA2D:
|
if DMA2D:
|
||||||
features.append('dma2d')
|
features.append('dma2d')
|
||||||
|
|
||||||
return f'cd embed/rust; cargo build --profile {RUST_PROFILE} --target-dir=../../build/unix/rust --no-default-features --features "{" ".join(features)}"'
|
return f'cd embed/rust; cargo build --profile {RUST_PROFILE} --target-dir=../../build/unix/rust --no-default-features --features "{" ".join(features)}" --target {TARGET}'
|
||||||
|
|
||||||
rust = env.Command(
|
rust = env.Command(
|
||||||
target=RUST_LIBPATH,
|
target=RUST_LIBPATH,
|
||||||
|
Loading…
Reference in New Issue
Block a user