From 5198a497bdedc9716be0d8acadf4c9271716dfea Mon Sep 17 00:00:00 2001 From: shixingbo <90814748+bmb0537@users.noreply.github.com> Date: Mon, 16 May 2022 10:00:56 +0800 Subject: [PATCH] kp ld multiple definition bugfix (#42707) --- cmake/xpu_kp.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/xpu_kp.cmake b/cmake/xpu_kp.cmake index 166f8786337..adf3d74c262 100644 --- a/cmake/xpu_kp.cmake +++ b/cmake/xpu_kp.cmake @@ -16,6 +16,10 @@ if(NOT WITH_XPU_KP) return() endif() +set(LINK_FLAGS "-Wl,--allow-multiple-definition") +set(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}") + if(NOT XPU_TOOLCHAIN) set(XPU_TOOLCHAIN /workspace/output/XTDK-ubuntu_x86_64) get_filename_component(XPU_TOOLCHAIN ${XPU_TOOLCHAIN} REALPATH) -- GitLab