|
|
@@ -121,7 +121,10 @@ endif ()
|
|
|
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|
|
|
|
|
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 (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
|
|
|
|
|
@@ -150,7 +153,6 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
|
|
|
|
|
add_executable (iwasm main.c ${UNCOMMON_SHARED_SOURCE})
|
|
|
|
|
|
-check_pie_supported()
|
|
|
set_target_properties (iwasm PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
install (TARGETS iwasm DESTINATION bin)
|