mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 05:11:19 +00:00 
			
		
		
		
	 724858c731
			
		
	
	
		724858c731
		
			
		
	
	
	
	
		
			
			Update wasm app build scripts for wasi-sdk-12.0: add --export=__main_argc_argv, remove --no-threads Lookup function with name "__main_argc_argv" as main function besides "main" Change module_malloc to runtime_malloc in wasi native lib Refine classic interpreter op_block and op_br_table Refine faster interpreter op_br_table Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			730 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			730 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| # Copyright (C) 2019 Intel Corporation.  All rights reserved.
 | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 | |
| 
 | |
| WAMR_DIR=${PWD}/../../..
 | |
| 
 | |
| echo "Build wasm app .."
 | |
| /opt/wasi-sdk/bin/clang -O3 \
 | |
|         -z stack-size=4096 -Wl,--initial-memory=65536 \
 | |
|         -o test.wasm main.c \
 | |
|         -Wl,--export=main -Wl,--export=__main_argc_argv \
 | |
|         -Wl,--export=__data_end -Wl,--export=__heap_base \
 | |
|         -Wl,--strip-all,--no-entry \
 | |
|         -Wl,--allow-undefined \
 | |
|         -nostdlib \
 | |
| 
 | |
| echo "Build binarydump tool .."
 | |
| rm -fr build && mkdir build && cd build
 | |
| cmake ../../../../test-tools/binarydump-tool
 | |
| make
 | |
| cd ..
 | |
| 
 | |
| echo "Generate test_wasm.h .."
 | |
| ./build/binarydump -o test_wasm.h -n wasm_test_file test.wasm
 | |
| 
 | |
| echo "Done"
 |