1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

core: refactor FROZEN and PYOPT in SConscript.firmware

This commit is contained in:
Pavol Rusnak 2019-08-21 18:04:15 +02:00
parent 2c646a61b7
commit 774ca02c41
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -8,7 +8,8 @@ CPPDEFINES_MOD = []
SOURCE_MOD = []
SOURCE_MOD_SECP256K1_ZKP = []
PYOPT = '1'
PYOPT = ARGUMENTS.get('PYOPT', '1')
FROZEN = True
# modtrezorconfig
CPPPATH_MOD += [
@ -418,7 +419,7 @@ env.Ignore(qstr_collected, qstr_generated)
# Frozen modules
#
if True:
if FROZEN:
if env.get('TREZOR_MODEL') == '1':
SOURCE_PY_DIR = 'src1/'
else:
@ -500,7 +501,7 @@ obj_program.extend(env.Object(source=SOURCE_MICROPYTHON))
obj_program.extend(env.Object(source=SOURCE_MICROPYTHON_SPEED, COPT='-O3'))
obj_program.extend(env.Object(source=SOURCE_STMHAL))
obj_program.extend(env.Object(source=SOURCE_TREZORHAL))
if True:
if FROZEN:
obj_program.extend(env.Object(source=source_mpyc))
VENDORHEADER = 'embed/vendorheader/vendorheader_' + ('unsafe_signed_prod.bin' if ARGUMENTS.get('PRODUCTION', '0') == '0' else 'satoshilabs_signed_prod.bin')