mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Add versioning information for libraries and executables across multiple platforms
This commit is contained in:
parent
e64685f43c
commit
b144e611a2
|
@ -107,6 +107,8 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
|||
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (vmlib)
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -pie -fPIE")
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security")
|
||||
|
@ -135,6 +137,7 @@ endif()
|
|||
|
||||
set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
|
||||
set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
|
||||
set_version_info (iwasm)
|
||||
|
||||
add_custom_command (TARGET iwasm POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"
|
||||
|
|
|
@ -132,6 +132,7 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
|||
check_pie_supported()
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_target_properties (vmlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_version_info (vmlib)
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
|
||||
|
@ -160,6 +161,8 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
|||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
@ -168,6 +171,8 @@ target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} ${WASI_NN
|
|||
|
||||
add_library (libiwasm STATIC ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
install (TARGETS libiwasm DESTINATION lib)
|
||||
|
||||
set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
|
||||
|
|
|
@ -116,11 +116,14 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info (vmlib)
|
||||
|
||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
||||
target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
|
||||
|
@ -131,5 +134,7 @@ install (TARGETS libiwasm DESTINATION lib)
|
|||
|
||||
set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
target_link_libraries (libiwasm ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
|
||||
|
||||
|
|
|
@ -113,17 +113,22 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info (vmlib)
|
||||
|
||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
||||
target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS} -lm -ldl -lpthread)
|
||||
|
||||
add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
install (TARGETS libiwasm DESTINATION lib)
|
||||
|
||||
set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
|
||||
|
|
|
@ -139,6 +139,7 @@ endif()
|
|||
|
||||
set (distribution_DIR ${CMAKE_BINARY_DIR}/distribution)
|
||||
set_target_properties (iwasm PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${distribution_DIR}/wasm/lib")
|
||||
set_version_info (iwasm)
|
||||
|
||||
add_custom_command (TARGET iwasm POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${WAMR_ROOT_DIR}/core/iwasm/include" "${distribution_DIR}/wasm/include/"
|
||||
|
|
|
@ -107,6 +107,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info (vmlib)
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT libvmlib_untrusted.a
|
||||
|
|
|
@ -78,6 +78,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info (vmlib)
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT libvmlib_untrusted.a
|
||||
|
|
|
@ -170,6 +170,7 @@ endif ()
|
|||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
|
@ -186,6 +187,7 @@ target_link_libraries(iwasm
|
|||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
||||
add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
install (TARGETS libiwasm DESTINATION lib)
|
||||
|
|
|
@ -62,3 +62,5 @@ include_directories(SYSTEM ${RIOT_INCLUDES_LIST})
|
|||
# executable linking is done by RIOT build system
|
||||
|
||||
add_library( wamr ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (wamr)
|
||||
|
|
|
@ -78,17 +78,22 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info (vmlib)
|
||||
|
||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
||||
target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} -lm -ldl -lunix)
|
||||
|
||||
add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
install (TARGETS libiwasm DESTINATION lib)
|
||||
|
||||
set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
|
||||
|
|
|
@ -106,6 +106,7 @@ set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|||
|
||||
include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
|
||||
add_library(vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
set_version_info(vmlib)
|
||||
|
||||
#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
|
||||
if (NOT MINGW)
|
||||
|
@ -134,6 +135,8 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
|||
|
||||
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
||||
|
||||
set_version_info (iwasm)
|
||||
|
||||
install (TARGETS iwasm DESTINATION bin)
|
||||
|
||||
target_link_libraries (iwasm vmlib ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS})
|
||||
|
@ -144,6 +147,8 @@ endif ()
|
|||
|
||||
add_library (libiwasm SHARED ${WAMR_RUNTIME_LIB_SOURCE})
|
||||
|
||||
set_version_info (libiwasm)
|
||||
|
||||
install (TARGETS libiwasm DESTINATION lib)
|
||||
|
||||
set_target_properties (libiwasm PROPERTIES OUTPUT_NAME libiwasm)
|
||||
|
|
|
@ -376,6 +376,7 @@ add_library (aotclib ${IWASM_COMPL_SOURCE})
|
|||
add_executable (wamrc main.c)
|
||||
check_pie_supported()
|
||||
set_target_properties (wamrc PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_version_info (wamrc)
|
||||
|
||||
if (LLVM_LINK_LLVM_DYLIB)
|
||||
set(WAMRC_LINK_LLVM_LIBS LLVM)
|
||||
|
|
Loading…
Reference in New Issue
Block a user