Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
weberlo committed Aug 4, 2020
1 parent de83ef1 commit b6956d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions tests/micro/test_mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,13 @@ def test_compile_runtime():
)

root_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
bin_opts = tvm.micro.DefaultOptions()
bin_opts.setdefault('profile', {})['common'] = ['-Wno-unused-variable']
bin_opts.setdefault('ccflags', []).append('-std=gnu++14')
bin_opts.setdefault('ldflags', []).append('-std=gnu++14')
bin_opts.setdefault('include_dirs', []).append(f'{project_dir}/crt')

lib_opts = copy.deepcopy(bin_opts)
lib_opts['profile']['common'].append('-Werror')
lib_opts['cflags'] = ['-Wno-error=incompatible-pointer-types']
opts = tvm.micro.DefaultOptions(f'{project_dir}/crt')
# TODO(weberlo) verify this is necessary
opts['bin_opts']['ccflags'] = ['-std=gnu++14']
opts['lib_opts']['ccflags'] = ['-std=gnu++14']

if BUILD:
micro_binary = tvm.micro.build_static_runtime(workspace, compiler, mod, lib_opts, bin_opts)
micro_binary = tvm.micro.build_static_runtime(workspace, compiler, mod, **opts)
lib_opts['cflags'].pop()

device_transport = device_util.DeviceTransportLauncher({
Expand Down
2 changes: 1 addition & 1 deletion tests/python/unittest/test_crt.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _make_cortex_m33_sess(mod):

if BUILD:
micro_binary = tvm.micro.build_static_runtime(
workspace, compiler, mod, lib_opts=opts['lib_opts'], bin_opts=opts['bin_opts'])
workspace, compiler, mod, **opts)

# debug_rpc_session = tvm.rpc.connect('127.0.0.1', 9090)
debug_rpc_session = None
Expand Down

0 comments on commit b6956d2

Please sign in to comment.