mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
core: unroll the utils.BITCOIN_ONLY constant in mpy-cross
This commit is contained in:
parent
4036f2243b
commit
8a61ef4f6e
@ -23,7 +23,10 @@ def generate(env):
|
|||||||
target = str(target[0])
|
target = str(target[0])
|
||||||
source = str(source[0])
|
source = str(source[0])
|
||||||
source_name = source.replace(env['source_dir'], '')
|
source_name = source.replace(env['source_dir'], '')
|
||||||
return '$MPY_CROSS -o %s -s %s %s' % (target, source_name, source)
|
# unroll the utils.BITCOIN_ONLY constant
|
||||||
|
btc_only = 'True' if env['bitcoin_only'] == '1' else 'False'
|
||||||
|
interim = "%s.i" % target[:-4] # replace .mpy with .i
|
||||||
|
return '$SED "s:utils\.BITCOIN_ONLY:%s:g" %s > %s && $MPY_CROSS -o %s -s %s %s' % (btc_only, source, interim, target, source_name, interim)
|
||||||
|
|
||||||
env['BUILDERS']['FrozenModule'] = SCons.Builder.Builder(
|
env['BUILDERS']['FrozenModule'] = SCons.Builder.Builder(
|
||||||
generator=generate_frozen_module,
|
generator=generate_frozen_module,
|
||||||
|
Loading…
Reference in New Issue
Block a user