Fix link cxx object file error when building wamrc (#1794)

This commit is contained in:
Wenyong Huang 2022-12-08 18:14:02 +08:00 committed by GitHub
parent 49be7cbbcb
commit aa6a7a2069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,9 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows")
# Add -fPIC flag if build as 64-bit
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -fPIC")
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -fPIC")
endif ()
else ()
add_definitions (-m32)