Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)

* Implement memory profiler, optimize memory usage, modify code indent

* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default

* Add a new extension library: connection

* Fix bug of reading magic number and version in big endian platform

* Re-org platform APIs: move most platform APIs from iwasm to shared-lib

* Enhance wasm loader to fix some security issues

* Fix issue about illegal load of EXC_RETURN into PC on stm32 board

* Updates that let a restricted version of the interpreter run in SGX

* Enable native/app address validation and conversion for wasm app

* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused

* Refine binary size and fix several minor issues

Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c

* Add more strict security checks for libc wrapper API's

* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files

* Enhance security of libc strcpy/sprintf wrapper function

* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions

* Remove get_module_inst() and fix issue of call native

* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate

* Refine interpreter call native process, refine memory boudary check

* Fix issues of invokeNative function of arm/mips/general version

* Add a switch to build simple sample without gui support

* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code

* Re-org shared lib header files, remove unused info; fix compile issues of vxworks

* Add build target general

* Remove unused files

* Update license header

* test push

* Restore file

* Sync up with internal/feature

* Sync up with internal/feature

* Rename build_wamr_app to build_wasm_app

* Fix small issues of README

* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc

* Sync up with internal/feature

* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue

* Sync up with internal/feature

* Fix bug of config.h and rename wasi config.h to ssp_config.h

* Sync up with internal/feature

* Import wamr aot

* update document

* update document

* Update document, disable WASI in 32bit

* update document

* remove files

* update document

* Update document

* update document

* update document

* update samples

* Sync up with internal repo
This commit is contained in:
wenyongh
2020-01-21 13:26:14 +08:00
committed by Wang Xin
parent 2a4528c749
commit 46b93b9d22
464 changed files with 25137 additions and 7911 deletions

View File

@ -9,23 +9,23 @@ if (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug)
endif (NOT CMAKE_BUILD_TYPE)
if (NOT TARGET_PLATFORM)
set (TARGET_PLATFORM "linux")
endif (NOT TARGET_PLATFORM)
if (NOT WAMR_BUILD_PLATFORM)
set (WAMR_BUILD_PLATFORM "linux")
endif (NOT WAMR_BUILD_PLATFORM)
message ("TARGET_PLATFORM = " ${TARGET_PLATFORM})
message ("WAMR_BUILD_PLATFORM = " ${WAMR_BUILD_PLATFORM})
set(REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
set(WASM_DIR ${REPO_ROOT_DIR}/core/iwasm)
set(APP_MGR_DIR ${REPO_ROOT_DIR}/core/app-mgr)
set(SHARED_DIR ${REPO_ROOT_DIR}/core/shared-lib)
set (REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
set (IWASM_DIR ${REPO_ROOT_DIR}/core/iwasm)
set (APP_MGR_DIR ${REPO_ROOT_DIR}/core/app-mgr)
set (SHARED_DIR ${REPO_ROOT_DIR}/core/shared)
set (APP_FRAMEWORK_DIR ${REPO_ROOT_DIR}/core/app-framework)
#TODO: use soft-plc/tools/iec-runtime/external/cJSON instead
set(CJSON_DIR ${CMAKE_CURRENT_LIST_DIR}/external/cJSON)
set(SSG_LIB_DIR ${REPO_ROOT_DIR}/../host-agent/lib)
set (CJSON_DIR ${CMAKE_CURRENT_LIST_DIR}/external/cJSON)
include (${WASM_DIR}/lib/native-interface/native_interface.cmake)
include (${APP_FRAMEWORK_DIR}/app-native-shared/native_interface.cmake)
include (${APP_MGR_DIR}/app-mgr-shared/app_mgr_shared.cmake)
include (${SHARED_DIR}/platform/${TARGET_PLATFORM}/shared_platform.cmake)
include (${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
include (${SHARED_DIR}/utils/shared_utils.cmake)
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
include (${CJSON_DIR}/cjson.cmake)
@ -40,7 +40,7 @@ add_definitions(-Wall -Wno-pointer-sign -DMALLOC_MEMORY_FROM_SYSTEM)
include_directories(
${CMAKE_CURRENT_LIST_DIR}/src
${WASM_DIR}/runtime/include
${IWASM_DIR}/include
)
file (GLOB_RECURSE HOST_TOOL_SRC src/*.c)

View File

@ -4,7 +4,7 @@
*/
#include "host_tool_utils.h"
#include "shared_utils.h"
#include "bi-inc/shared_utils.h"
#include <time.h>
#include <sys/stat.h>

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
#include "attr_container.h"
#include "bi-inc/attr_container.h"
#include "cJSON.h"
/**

View File

@ -12,8 +12,8 @@
#include <unistd.h>
#include "host_tool_utils.h"
#include "shared_utils.h"
#include "attr_container.h"
#include "bi-inc/shared_utils.h"
#include "bi-inc/attr_container.h"
#include "coap_ext.h"
#include "cJSON.h"
#include "app_manager_export.h" /* for Module_WASM_App */
@ -99,14 +99,10 @@ extern int g_mid;
extern unsigned char leading[2];
/* -1 fail, 0 success */
static int send_request(request_t *request, bool is_install_wasm_bytecode_app)
static int send_request(request_t *request, uint16_t msg_type)
{
char *req_p;
int req_size, req_size_n, ret = -1;
uint16_t msg_type = REQUEST_PACKET;
if (is_install_wasm_bytecode_app)
msg_type = INSTALL_WASM_BYTECODE_APP;
if ((req_p = pack_request(request, &req_size)) == NULL)
return -1;
@ -137,6 +133,7 @@ static int send_request(request_t *request, bool is_install_wasm_bytecode_app)
return ret;
}
/*
static package_type_t get_app_package_type(const char *buf, int size)
{
if (buf && size > 4) {
@ -147,6 +144,7 @@ static package_type_t get_app_package_type(const char *buf, int size)
}
return Package_Type_Unknown;
}
*/
#define url_remain_space (sizeof(url) - strlen(url))
@ -159,7 +157,6 @@ static int install(inst_info *info)
char *app_file_buf;
char url[URL_MAX_LEN] = { 0 };
int ret = -1, app_size;
bool is_wasm_bytecode_app;
snprintf(url, sizeof(url) - 1, "/applet?name=%s", info->name);
@ -188,13 +185,10 @@ static int install(inst_info *info)
FMT_APP_RAW_BINARY, app_file_buf, app_size);
request->mid = gen_random_id();
if ((info->module_type == NULL || strcmp(info->module_type, "wasm") == 0)
&& get_app_package_type(app_file_buf, app_size) == Wasm_Module_Bytecode)
is_wasm_bytecode_app = true;
if (info->module_type == NULL || strcmp(info->module_type, "wasm") == 0)
ret = send_request(request, INSTALL_WASM_APP);
else
is_wasm_bytecode_app = false;
ret = send_request(request, is_wasm_bytecode_app);
ret = send_request(request, REQUEST_PACKET);
free(app_file_buf);
@ -217,7 +211,7 @@ static int uninstall(uninst_info *info)
NULL, 0);
request->mid = gen_random_id();
return send_request(request, false);
return send_request(request, REQUEST_PACKET);
}
static int query(query_info *info)
@ -236,7 +230,7 @@ static int query(query_info *info)
NULL, 0);
request->mid = gen_random_id();
ret = send_request(request, false);
ret = send_request(request, REQUEST_PACKET);
return ret;
}
@ -276,7 +270,7 @@ static int request(req_info *info)
FMT_ATTR_CONTAINER, payload, payload_len);
request->mid = gen_random_id();
ret = send_request(request, false);
ret = send_request(request, REQUEST_PACKET);
if (info->json_payload_file != NULL && payload != NULL)
attr_container_destroy(payload);
@ -317,7 +311,7 @@ static int subscribe(reg_info *info)
FMT_ATTR_CONTAINER,
NULL, 0);
request->mid = gen_random_id();
ret = send_request(request, false);
ret = send_request(request, REQUEST_PACKET);
#endif
return ret;
}
@ -350,7 +344,7 @@ static int unsubscribe(unreg_info *info)
FMT_ATTR_CONTAINER,
NULL, 0);
request->mid = gen_random_id();
ret = send_request(request, false);
ret = send_request(request, REQUEST_PACKET);
#endif
return ret;
}

View File

@ -1,16 +0,0 @@
# Cross Compile Toolchain for Wasm Micro Runtime
This folder contains sysroot and toolchain files for building wasm application by using cmake.
## Build a project
To build a C project into wasm, you may use the toolchain file provided here as `wamr_toolchain.cmake`:
```Bash
cmake /path/to/CMakeLists.txt -DCMAKE_TOOLCHAIN_FILE=/path/to/wamr_toolchain.cmake
make
```
## Generate a toolchain for your runtime
If you extend more APIs of wasm runtime by using `EXPORT_WASM_API` API, we also provide a tool which allow you to generate the toolchain for your runtime:
```Bash
./generate_toolchain.py -o out_dir -f api_list_file
```
A toolchain which enables your extended APIs should be generated in the path you specified.

View File

@ -1,113 +0,0 @@
#!/usr/bin/python3
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import os
import sys
import shutil
from optparse import OptionParser
import re
optParser = OptionParser()
optParser.add_option("-o", "", dest="output_dir", help="the output path of sysroot")
optParser.add_option("-f", "--api_file", dest="api_file_name",
help="append user defined APIs to toolchain")
(options, args) = optParser.parse_args()
optParser.usage = "%prog [options] output_dir"
sysroot_path = os.path.join(os.getcwd(), "sysroot")
if not os.path.isdir(sysroot_path):
print("Error: No sysroot folder in current path.")
exit(0)
if options.output_dir == None:
out_dir = sysroot_path
else:
out_dir = os.path.join(os.path.abspath(options.output_dir), "sysroot")
def check_sysroot():
if out_dir != sysroot_path and not os.path.isdir(out_dir):
try:
shutil.copytree(sysroot_path,out_dir)
except:
print('Error while copy sysroot')
def Search_API(pattern, file):
f = open(file, 'r')
content = f.read()
f.close()
p = re.compile(pattern, re.S | re.M)
return p.findall(content)
def fill_defined_symbols():
wamr_root = os.path.join(os.getcwd(), "../..")
user_lib_dir = os.path.join(wamr_root, "core/iwasm/lib/native/extension")
defined_symbols = []
# WAMR extension APIs
for lib in os.listdir(user_lib_dir):
for file in os.listdir(os.path.join(user_lib_dir, lib)):
if re.match(r'.*.inl', file):
defined_symbols += Search_API(r'EXPORT_WASM_API[(](.*?)[)]', os.path.join(user_lib_dir, lib, file))
# Base lib APIs
defined_symbols += Search_API(r'EXPORT_WASM_API[(](.*?)[)]',
os.path.join(wamr_root, "core/iwasm/lib/native/base", "base_lib_export.c"))
# libc
defined_symbols += Search_API(r'REG_NATIVE_FUNC[(]env, _(.*?)[)]',
os.path.join(wamr_root, "core/iwasm/lib/native/libc", "libc_wrapper.c"))
# User defined APIs
if options.api_file_name != None:
api_file = open(options.api_file_name)
APIs = api_file.read().split('\n')
if APIs != None and APIs != []:
defined_symbols += APIs
defined_symbols = [i for i in defined_symbols if len(i) != 0]
symbol_file = open(os.path.join(out_dir, "share/defined-symbols.txt"), 'w')
symbol_file.write('\n'.join(defined_symbols))
symbol_file.close()
def generate_toolchain_file():
cmake_content = """
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR wasm32)
SET (CMAKE_SYSROOT {})
SET (CMAKE_C_FLAGS "-nostdlib" CACHE INTERNAL "")
SET (CMAKE_C_COMPILER_TARGET "wasm32")
SET (CMAKE_C_COMPILER "clang-8")
SET (CMAKE_CXX_FLAGS "-nostdlib" CACHE INTERNAL "")
SET (CMAKE_CXX_COMPILER_TARGET "wasm32")
SET (CMAKE_CXX_COMPILER "clang++-8")
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,--no-entry,--export-all,--allow-undefined-file=${{CMAKE_SYSROOT}}/share/defined-symbols.txt" CACHE INTERNAL "")
SET (CMAKE_LINKER "/usr/bin/wasm-ld-8" CACHE INTERNAL "")
SET (CMAKE_AR "/usr/bin/llvm-ar-8" CACHE INTERNAL "")
SET (CMAKE_NM "/usr/bin/llvm-nm-8" CACHE INTERNAL "")
SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump-8" CACHE INTERNAL "")
SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib-8" CACHE INTERNAL "")
""".format(out_dir)
f = open(os.path.join(out_dir, "..", "wamr_toolchain.cmake"), 'w')
f.write(cmake_content)
f.close()
def main():
check_sysroot()
fill_defined_symbols()
generate_toolchain_file()
print("Successfully generate wamr toolchain")
print("Now you can use this command to build your cmake based project:")
print("cmake /path/to/CMakeLists.txt -DCMAKE_TOOLCHAIN_FILE={}"
.format(os.path.abspath(os.path.join(out_dir, "..", "wamr_toolchain.cmake"))))
if __name__ == '__main__':
main()

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_ASSERT_H
#define _WAMR_LIBC_ASSERT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,28 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_CTYPE_H
#define _WAMR_LIBC_CTYPE_H
#ifdef __cplusplus
extern "C" {
#endif
int isupper(int c);
int isalpha(int c);
int isspace(int c);
int isgraph(int c);
int isprint(int c);
int isdigit(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);
int isalnum(int c);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_ERRNO_H
#define _WAMR_LIBC_ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_FCNTL_H
#define _WAMR_LIBC_FCNTL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_INTTYPES_H
#define _WAMR_LIBC_INTTYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,34 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_LIMITS_H
#define _WAMR_LIBC_LIMITS_H
#ifdef __cplusplus
extern "C" {
#endif
#define CHAR_BIT 8
#define SCHAR_MIN -128
#define SCHAR_MAX 127
#define UCHAR_MAX 255
#define CHAR_MIN 0
#define CHAR_MAX 127
#define MB_LEN_MAX 1
#define SHRT_MIN -32768
#define SHRT_MAX +32767
#define USHRT_MAX 65535
#define INT_MIN -32768
#define INT_MAX +32767
#define UINT_MAX 65535
#define LONG_MIN -2147483648
#define LONG_MAX +2147483647
#define ULONG_MAX 4294967295
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,19 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STDBOOL_H
#define _WAMR_LIBC_STDBOOL_H
#define __bool_true_false_are_defined 1
#ifndef __cplusplus
#define bool _Bool
#define false 0
#define true 1
#endif /* __cplusplus */
#endif

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STDINT_H
#define _WAMR_LIBC_STDINT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,30 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STDIO_H
#define _WAMR_LIBC_STDIO_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
# define NULL ((void*) 0)
#endif
typedef unsigned int size_t;
int printf(const char *format, ...);
int putchar(int c);
int snprintf(char *str, size_t size, const char *format, ...);
int sprintf(char *str, const char *format, ...);
int puts(char *string);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,28 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STDLIB_H
#define _WAMR_LIBC_STDLIB_H
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned int size_t;
int atoi(const char *s);
void exit(int status);
long strtol(const char *nptr, char **endptr, register int base);
unsigned long strtoul(const char *nptr, char **endptr, register int base);
void *malloc(size_t size);
void *calloc(size_t n, size_t size);
void free(void *ptr);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,36 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STRING_H
#define _WAMR_LIBC_STRING_H
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned int size_t;
int memcmp(const void *s1, const void *s2, size_t n);
void *memcpy(void *dest, const void *src, size_t n);
void *memmove(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
void *memchr(const void *s, int c, size_t n);
int strncasecmp(const char *s1, const char *s2, size_t n);
size_t strspn(const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);
char *strstr(const char *s, const char *find);
char *strchr(const char *s, int c);
int strcmp(const char *s1, const char *s2);
char *strcpy(char *dest, const char *src);
size_t strlen(const char *s);
int strncmp(const char * str1, const char * str2, size_t n);
char *strncpy(char *dest, const char *src, unsigned long n);
char * strdup(const char *s);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#ifndef _WAMR_LIBC_STRINGS_H
#define _WAMR_LIBC_STRINGS_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,76 +0,0 @@
wasm_open_connection
wasm_close_connection
wasm_send_on_connection
wasm_config_connection
wasm_sensor_open
wasm_sensor_config
wasm_sensor_config_with_attr_container
wasm_sensor_close
wasm_btn_native_call
wasm_obj_native_call
wasm_label_native_call
wasm_cont_native_call
wasm_page_native_call
wasm_list_native_call
wasm_ddlist_native_call
wasm_cb_native_call
wasm_register_resource
wasm_response_send
wasm_post_request
wasm_sub_event
wasm_create_timer
wasm_timer_destroy
wasm_timer_cancel
wasm_timer_restart
wasm_get_sys_tick_ms
wasm_runtime_get_current_module_inst1
wasm_runtime_validate_app_addr1
wasm_runtime_validate_native_addr1
wasm_runtime_addr_app_to_native1
wasm_runtime_addr_native_to_app1
printf
sprintf
snprintf
puts
putchar
memcmp
memcpy
memmove
memset
strchr
strcmp
strcpy
strlen
strncmp
strncpy
malloc
calloc
strdup
free
atoi
bsearch
exit
strtol
strtoul
memchr
strncasecmp
strspn
strcspn
strstr
isupper
isalpha
isspace
isgraph
isprint
isdigit
isxdigit
tolower
toupper
isalnum
llvm_bswap_i16
llvm_bswap_i32
bitshift64Lshr
bitshift64Shl
llvm_stackrestore
llvm_stacksave
emscripten_memcpy_big

View File

@ -1,22 +0,0 @@
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR wasm32)
SET (CMAKE_SYSROOT ${CMAKE_CURRENT_LIST_DIR}/sysroot)
SET (CMAKE_C_FLAGS "-nostdlib" CACHE INTERNAL "")
SET (CMAKE_C_COMPILER_TARGET "wasm32")
SET (CMAKE_C_COMPILER "clang-8")
SET (CMAKE_CXX_FLAGS "-nostdlib" CACHE INTERNAL "")
SET (CMAKE_CXX_COMPILER_TARGET "wasm32")
SET (CMAKE_CXX_COMPILER "clang++-8")
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,--no-entry,--export-all,--allow-undefined-file=${CMAKE_SYSROOT}/share/defined-symbols.txt" CACHE INTERNAL "")
SET (CMAKE_LINKER "/usr/bin/wasm-ld-8" CACHE INTERNAL "")
SET (CMAKE_AR "/usr/bin/llvm-ar-8" CACHE INTERNAL "")
SET (CMAKE_NM "/usr/bin/llvm-nm-8" CACHE INTERNAL "")
SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump-8" CACHE INTERNAL "")
SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib-8" CACHE INTERNAL "")