Enable ref types and bulk memory by default for wamrc (#838)
Enable ref types feature and bulk memory feature by default for wamrc and provide "--disable-ref-types", "--disable-bulk-memory" to disable them. And remove the ref_type_flag option in wasm_loader.c which is used to control whether to enable ref types or not when ENABLE_REF_TYPES macro is enabled in wamrc. As the wasm binary format with ref types is compatible with the binary format before, we can remove the option. Also update the spec test scripts.
This commit is contained in:
@ -210,8 +210,8 @@ parser.add_argument('--sgx', action='store_true',
|
||||
parser.add_argument('--simd', default=False, action='store_true',
|
||||
help="Enable SIMD")
|
||||
|
||||
parser.add_argument('--ref_types', default=False, action='store_true',
|
||||
help="Enable Reference types")
|
||||
parser.add_argument('--multi-thread', default=False, action='store_true',
|
||||
help="Enable Multi-thread")
|
||||
|
||||
parser.add_argument('--verbose', default=False, action='store_true',
|
||||
help='show more logs')
|
||||
@ -939,12 +939,11 @@ def compile_wasm_to_aot(wasm_tempfile, aot_tempfile, runner, opts, r):
|
||||
if opts.sgx:
|
||||
cmd.append("-sgx")
|
||||
|
||||
if opts.simd:
|
||||
cmd.append("--enable-simd")
|
||||
if not opts.simd:
|
||||
cmd.append("--disable-simd")
|
||||
|
||||
if opts.ref_types:
|
||||
cmd.append("--enable-ref-types")
|
||||
cmd.append("--enable-bulk-memory")
|
||||
if opts.multi_thread:
|
||||
cmd.append("--enable-multi-thread")
|
||||
|
||||
# disable llvm link time optimization as it might convert
|
||||
# code of tail call into code of dead loop, and stack overflow
|
||||
|
||||
Reference in New Issue
Block a user