Skip to content

Commit

Permalink
test: Disable Wasm extensions in wat2wasm4cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 3, 2020
1 parent 5ccde02 commit 96c1215
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wat2wasm4cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
DEBUG = False

WAT2WASM_TOOL = 'wat2wasm'
WAT2WASM_DEFAULT_OPTIONS = ['--disable-saturating-float-to-int',
'--disable-sign-extension', '--disable-multi-value']
FORMAT_TOOL = 'clang-format'

WAT_RE = re.compile(r'/\* wat2wasm(.*)\n([^*]*)\*/', re.MULTILINE)
Expand Down Expand Up @@ -88,6 +90,7 @@ def report_wat_errors(errmsg, source, source_path, wat_pos):
with open(TMP_WAT_FILE, 'w') as f:
f.write(wat)

options = WAT2WASM_DEFAULT_OPTIONS + options
r = subprocess.run([WAT2WASM_TOOL, TMP_WAT_FILE] + options,
capture_output=True, text=True)
if r.returncode != 0:
Expand Down

0 comments on commit 96c1215

Please sign in to comment.