From 5ff49151e3af3f3bbf2eed8cd99293f5593d730b Mon Sep 17 00:00:00 2001 From: Alexander Polyakov Date: Tue, 5 Nov 2024 21:24:44 +0300 Subject: [PATCH] Add linker flags to allow undefined symbols in shared library --- runtime-light/runtime-light.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime-light/runtime-light.cmake b/runtime-light/runtime-light.cmake index 92f8d3188..a68b862ab 100644 --- a/runtime-light/runtime-light.cmake +++ b/runtime-light/runtime-light.cmake @@ -37,6 +37,12 @@ target_compile_options(runtime-light PUBLIC -stdlib=libc++ -iquote ${GENERATED_DIR} -fPIC -O3) target_link_options(runtime-light PUBLIC -stdlib=libc++ -static-libstdc++) +if(APPLE) + target_link_options(runtime-light PUBLIC -undefined dynamic_lookup) +else() + target_link_options(runtime-light PUBLIC --allow-shlib-undefined) +endif() + vk_add_library(kphp-light-runtime STATIC) target_link_libraries( kphp-light-runtime PUBLIC vk::light-common vk::light-unicode