mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-04-18 18:18:44 +00:00
Reapply "fix a wamrc compile warning, and enable system include flag for third-party libraries to suppresses corresponding compile warnings (#4875)"
This reverts commit 09c664f974.
This commit is contained in:
parent
eb2a828e55
commit
efa51bf281
|
|
@ -123,7 +123,7 @@ if (WAMR_BUILD_JIT EQUAL 1)
|
|||
set (LLVM_DIR ${LLVM_BUILD_ROOT}/lib/cmake/llvm)
|
||||
endif ()
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ if ((WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||
if (NOT zycore_POPULATED)
|
||||
message ("-- Fetching zycore ..")
|
||||
FetchContent_Populate(zycore)
|
||||
include_directories("${zycore_SOURCE_DIR}/include")
|
||||
include_directories("${zycore_BINARY_DIR}")
|
||||
include_directories(SYSTEM "${zycore_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${zycore_BINARY_DIR}")
|
||||
add_definitions(-DZYCORE_STATIC_BUILD=1)
|
||||
add_subdirectory(${zycore_SOURCE_DIR} ${zycore_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
file (GLOB_RECURSE c_source_zycore ${zycore_SOURCE_DIR}/src/*.c)
|
||||
|
|
@ -92,9 +92,9 @@ if ((WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
||||
option(ZYDIS_BUILD_MAN "" OFF)
|
||||
option(ZYDIS_BUILD_DOXYGEN "" OFF)
|
||||
include_directories("${zydis_BINARY_DIR}")
|
||||
include_directories("${zydis_SOURCE_DIR}/include")
|
||||
include_directories("${zydis_SOURCE_DIR}/src")
|
||||
include_directories(SYSTEM "${zydis_BINARY_DIR}")
|
||||
include_directories(SYSTEM "${zydis_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${zydis_SOURCE_DIR}/src")
|
||||
add_definitions(-DZYDIS_STATIC_BUILD=1)
|
||||
add_subdirectory(${zydis_SOURCE_DIR} ${zydis_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
file (GLOB_RECURSE c_source_zydis ${zydis_SOURCE_DIR}/src/*.c)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ MyCompiler::operator()(llvm::Module &M)
|
|||
M.getModuleIdentifier() + "-jitted-objectbuffer");
|
||||
#endif
|
||||
|
||||
return std::move(ObjBuffer);
|
||||
return ObjBuffer;
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(llvm::orc::LLLazyJITBuilder,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||
add_definitions(-DASMJIT_NO_INTRINSICS)
|
||||
add_definitions(-DASMJIT_NO_AARCH64)
|
||||
add_definitions(-DASMJIT_NO_AARCH32)
|
||||
include_directories("${asmjit_SOURCE_DIR}/src")
|
||||
include_directories(SYSTEM "${asmjit_SOURCE_DIR}/src")
|
||||
add_subdirectory(${asmjit_SOURCE_DIR} ${asmjit_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
file (GLOB_RECURSE cpp_source_asmjit
|
||||
${asmjit_SOURCE_DIR}/src/asmjit/core/*.cpp
|
||||
|
|
@ -67,8 +67,8 @@ if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||
FetchContent_Populate(zycore)
|
||||
option(ZYDIS_BUILD_TOOLS "" OFF)
|
||||
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
||||
include_directories("${zycore_SOURCE_DIR}/include")
|
||||
include_directories("${zycore_BINARY_DIR}")
|
||||
include_directories(SYSTEM "${zycore_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${zycore_BINARY_DIR}")
|
||||
add_subdirectory(${zycore_SOURCE_DIR} ${zycore_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
file (GLOB_RECURSE c_source_zycore ${zycore_SOURCE_DIR}/src/*.c)
|
||||
endif ()
|
||||
|
|
@ -83,9 +83,9 @@ if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|||
FetchContent_Populate(zydis)
|
||||
option(ZYDIS_BUILD_TOOLS "" OFF)
|
||||
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
||||
include_directories("${zydis_BINARY_DIR}")
|
||||
include_directories("${zydis_SOURCE_DIR}/include")
|
||||
include_directories("${zydis_SOURCE_DIR}/src")
|
||||
include_directories(SYSTEM "${zydis_BINARY_DIR}")
|
||||
include_directories(SYSTEM "${zydis_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${zydis_SOURCE_DIR}/src")
|
||||
add_subdirectory(${zydis_SOURCE_DIR} ${zydis_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
file (GLOB_RECURSE c_source_zydis ${zydis_SOURCE_DIR}/src/*.c)
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ endif()
|
|||
|
||||
add_definitions (-DWASM_ENABLE_LIB_RATS=1)
|
||||
|
||||
include_directories(${LIB_RATS_DIR} ${SGX_SSL_DIR}/include)
|
||||
include_directories(SYSTEM ${LIB_RATS_DIR} ${SGX_SSL_DIR}/include)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ FetchContent_GetProperties(librats)
|
|||
if (NOT librats_POPULATED)
|
||||
message("-- Fetching librats ..")
|
||||
FetchContent_Populate(librats)
|
||||
include_directories("${librats_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${librats_SOURCE_DIR}/include")
|
||||
|
||||
# Prevent the propagation of the CMAKE_C_FLAGS of WAMR into librats
|
||||
set(SAVED_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
|||
## libuv
|
||||
find_package(LIBUV QUIET)
|
||||
if (LIBUV_FOUND)
|
||||
include_directories(${LIBUV_INCLUDE_DIR})
|
||||
include_directories(SYSTEM ${LIBUV_INCLUDE_DIR})
|
||||
else()
|
||||
FetchContent_Declare(
|
||||
libuv
|
||||
|
|
@ -30,7 +30,7 @@ else()
|
|||
GIT_TAG ${LIBUV_VERSION}
|
||||
)
|
||||
FetchContent_MakeAvailable(libuv)
|
||||
include_directories("${libuv_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${libuv_SOURCE_DIR}/include")
|
||||
set (LIBUV_LIBRARIES uv_a)
|
||||
set_target_properties(uv_a PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
||||
endif()
|
||||
|
|
@ -38,7 +38,7 @@ endif()
|
|||
## uvwasi
|
||||
find_package(UVWASI QUIET)
|
||||
if (UVWASI_FOUND)
|
||||
include_directories(${UVWASI_INCLUDE_DIR})
|
||||
include_directories(SYSTEM ${UVWASI_INCLUDE_DIR})
|
||||
else()
|
||||
FetchContent_Declare(
|
||||
uvwasi
|
||||
|
|
@ -46,7 +46,7 @@ else()
|
|||
GIT_TAG 392e1f1c1c8a2d2102c9f2e0b9f35959a149d133
|
||||
)
|
||||
FetchContent_MakeAvailable(uvwasi)
|
||||
include_directories("${uvwasi_SOURCE_DIR}/include")
|
||||
include_directories(SYSTEM "${uvwasi_SOURCE_DIR}/include")
|
||||
set (UVWASI_LIBRARIES uvwasi_a)
|
||||
set_target_properties(uvwasi_a PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ FetchContent_Declare(
|
|||
|
||||
message("-- Fetching simde ..")
|
||||
FetchContent_MakeAvailable(simde)
|
||||
include_directories("${simde_SOURCE_DIR}")
|
||||
include_directories(SYSTEM "${simde_SOURCE_DIR}")
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ find_package(LLVM REQUIRED CONFIG)
|
|||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
|
||||
add_definitions(${LLVM_DEFINITIONS_LIST})
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ set (WAMR_BUILD_GC 1)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ set (WAMR_BUILD_APP_FRAMEWORK 0)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ set (WAMR_BUILD_JIT 0)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ set (WAMR_BUILD_LOAD_CUSTOM_SECTION 1)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ set (WAMR_BUILD_DUMP_CALL_STACK 1)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ set(WAMR_BUILD_SHARED_MEMORY 1)
|
|||
include(../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ set(WAMR_BUILD_REF_TYPES 1)
|
|||
include(../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ set (WAMR_BUILD_MULTI_MODULE 1)
|
|||
include(../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ add_definitions (-Dattr_container_free=free)
|
|||
include (../unit_common.cmake)
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ if (NOT WAMR_BUILD_WITH_CUSTOM_LLVM)
|
|||
endif ()
|
||||
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
|
|
@ -184,8 +184,8 @@ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
|||
|
||||
if (WAMR_BUILD_DEBUG_AOT EQUAL 1)
|
||||
if(LLVM_BUILD_MAIN_SRC_DIR)
|
||||
include_directories(${LLVM_BUILD_MAIN_SRC_DIR}/../lldb/include)
|
||||
include_directories(${LLVM_BUILD_BINARY_DIR}/tools/lldb/include)
|
||||
include_directories(SYSTEM ${LLVM_BUILD_MAIN_SRC_DIR}/../lldb/include)
|
||||
include_directories(SYSTEM ${LLVM_BUILD_BINARY_DIR}/tools/lldb/include)
|
||||
endif()
|
||||
link_directories(${LLVM_LIBRARY_DIRS})
|
||||
find_library(lib_lldb NAMES lldb HINTS ${LLVM_LIBRARY_DIRS} REQUIRED)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user