From 774ca02c41bc54bf301d0c4b4642e664be6b4d93 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 21 Aug 2019 18:04:15 +0200 Subject: [PATCH] core: refactor FROZEN and PYOPT in SConscript.firmware --- core/SConscript.firmware | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 68b6ea7a53..af5e7eaa0d 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -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')