Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Dec 12, 2024
1 parent b946735 commit 9bc65da
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ target_link_libraries(${LOADABLE_EXTENSION_NAME}
)

# Set link flags to ensure proper symbol resolution
set_target_properties(${EXTENSION_NAME} PROPERTIES
LINK_FLAGS "-Wl,--no-as-needed -Wl,-z,now -Wl,--export-dynamic"
ENABLE_EXPORTS ON
POSITION_INDEPENDENT_CODE ON
)
if(VCPKG_TARGET_TRIPLET MATCHES "arm64-linux" OR SYSTEM_ARCH MATCHES ".*(arm64|aarch64).*")
list(APPEND STATIC_LIBS "atomic")
set_target_properties(${EXTENSION_NAME} PROPERTIES
LINK_FLAGS "-Wl,--no-as-needed -Wl,-z,now -Wl,--export-dynamic -latomic"
)
else()
set_target_properties(${EXTENSION_NAME} PROPERTIES
LINK_FLAGS "-Wl,--no-as-needed -Wl,-z,now -Wl,--export-dynamic"
)
endif()

install(
TARGETS ${EXTENSION_NAME}
Expand Down

0 comments on commit 9bc65da

Please sign in to comment.