-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e752690
commit af93d06
Showing
5 changed files
with
89 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
if (NOT DEFINED WAMR_BUILD_PLATFORM) | ||
string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM) | ||
endif () | ||
|
||
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") | ||
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") | ||
|
||
set (CMAKE_C_STANDARD 99) | ||
|
||
if (NOT DEFINED WAMR_BUILD_TARGET) | ||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)") | ||
set (WAMR_BUILD_TARGET "AARCH64") | ||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") | ||
set (WAMR_BUILD_TARGET "RISCV64") | ||
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set (WAMR_BUILD_TARGET "X86_64") | ||
elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
set (WAMR_BUILD_TARGET "X86_32") | ||
else () | ||
message(SEND_ERROR "Unsupported build target platform!") | ||
endif () | ||
endif () | ||
|
||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wshadow -Wno-unused-parameter") | ||
|
||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused") | ||
|
||
if (WAMR_BUILD_TARGET MATCHES "X86_.*" OR WAMR_BUILD_TARGET STREQUAL "AMD_64") | ||
if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) | ||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mindirect-branch-register") | ||
endif () | ||
endif () | ||
|
||
set (WAMR_BUILD_INTERP 1) | ||
set (WAMR_BUILD_AOT 1) | ||
set (WAMR_BUILD_JIT 0) | ||
set (WAMR_BUILD_LIBC_WASI 1) | ||
set (WAMR_BUILD_FAST_INTERP 1) | ||
|
||
if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang")) | ||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") | ||
endif () | ||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (C) 2019 Intel Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
# Find tensorflow-lite | ||
find_package(tensorflow_lite REQUIRED) | ||
|
||
set(WASI_NN_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/..) | ||
|
||
include_directories (${WASI_NN_ROOT_DIR}/include) | ||
include_directories (${WASI_NN_ROOT_DIR}/src) | ||
include_directories (${WASI_NN_ROOT_DIR}/src/utils) | ||
|
||
set ( | ||
LIBC_WASI_NN_SOURCE | ||
${WASI_NN_ROOT_DIR}/src/wasi_nn.c | ||
${WASI_NN_ROOT_DIR}/src/wasi_nn_tensorflowlite.cpp | ||
${WASI_NN_ROOT_DIR}/src/utils/wasi_nn_app_native.c | ||
) | ||
|
||
set (TENSORFLOW_LIB tensorflow-lite) |
This file was deleted.
Oops, something went wrong.