mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 05:11:19 +00:00 
			
		
		
		
	 c6fc12b7b6
			
		
	
	
		c6fc12b7b6
		
			
		
	
	
	
	
		
			
			* Clean compiling warnings of zephyr samples * Support xtensa AOT and fix build issue of alios
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| # Copyright (C) 2019 Intel Corporation. All rights reserved.
 | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 | |
| 
 | |
| DEPS_DIR=${PWD}/../core/deps
 | |
| 
 | |
| cd ${DEPS_DIR}
 | |
| if [ ! -d "llvm" ]; then
 | |
|   echo "Clone llvm Xtensa to core/deps/ .."
 | |
|   git clone https://github.com/espressif/llvm-project.git llvm
 | |
| fi
 | |
| 
 | |
| cd llvm
 | |
| mkdir -p build
 | |
| cd build
 | |
| 
 | |
| if [ ! -f bin/llvm-lto ]; then
 | |
| 
 | |
|   CORE_NUM=$(nproc --all)
 | |
|   if [ -z "${CORE_NUM}" ]; then
 | |
|     CORE_NUM=1
 | |
|   fi
 | |
| 
 | |
|   echo "Build llvm with" ${CORE_NUM} "cores"
 | |
| 
 | |
|   cmake ../llvm \
 | |
|           -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
 | |
|           -DCMAKE_BUILD_TYPE:STRING="Release" \
 | |
|           -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD:STRING="Xtensa" \
 | |
|           -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
 | |
|           -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
 | |
|           -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
 | |
|           -DLLVM_INCLUDE_TESTS:BOOL=OFF \
 | |
|           -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
 | |
|           -DLLVM_APPEND_VC_REV:BOOL=OFF
 | |
|   make -j ${CORE_NUM}
 | |
| 
 | |
| else
 | |
|   echo "llvm has already been built"
 | |
| fi
 | |
| 
 | |
| cd ${PWD}
 | |
| 
 |