Skip to content

Commit cc0a1a2

Browse files
authored
[k2] add extra flex pic version with libc++ usage for runtime-light (#1475)
1 parent aa46234 commit cc0a1a2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

flex/flex.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ vk_add_library_no_pic(flex-data-src-no-pic OBJECT ${FLEX_SOURCES})
2525
add_dependencies(flex-data-src-no-pic flex-data)
2626

2727
if (COMPILE_RUNTIME_LIGHT)
28-
target_compile_options(flex-data-src-pic PUBLIC -stdlib=libc++ ${RUNTIME_LIGHT_VISIBILITY})
29-
target_link_options(flex-data-src-pic PUBLIC -stdlib=libc++)
28+
# A new pic library needs to be added because it uses libc++.
29+
# vkext is not ready to use a library with libc++.
30+
vk_add_library_pic(flex-libcpp-data-src-pic OBJECT ${FLEX_SOURCES})
31+
add_dependencies(flex-libcpp-data-src-pic flex-data)
32+
33+
target_compile_options(flex-libcpp-data-src-pic PUBLIC -stdlib=libc++ ${RUNTIME_LIGHT_VISIBILITY})
34+
target_link_options(flex-libcpp-data-src-pic PUBLIC -stdlib=libc++)
3035
endif()
3136

3237
vk_add_library_pic(flex_data_shared-pic SHARED $<TARGET_OBJECTS:flex-data-src-pic>)

runtime-light/runtime-light.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ set(RUNTIME_LIGHT_LINK_LIBS "${KPHP_TIMELIB_PIC_LIBRARIES} ${PCRE2_PIC_LIBRARIES
6363
vk_add_library_pic(kphp-light-runtime-pic STATIC)
6464
target_compile_options(kphp-light-runtime-pic PUBLIC ${RUNTIME_LIGHT_COMPILE_FLAGS})
6565
target_link_options(kphp-light-runtime-pic PUBLIC ${RUNTIME_LIGHT_LINK_FLAGS})
66-
target_link_libraries(kphp-light-runtime-pic PUBLIC vk::pic::flex-data-src vk::pic::light-common vk::pic::unicode vk::pic::runtime-light vk::pic::runtime-common)
66+
target_link_libraries(kphp-light-runtime-pic PUBLIC vk::pic::flex-libcpp-data-src-pic vk::pic::light-common vk::pic::unicode vk::pic::runtime-light vk::pic::runtime-common)
6767

6868
set_target_properties(kphp-light-runtime-pic PROPERTIES LIBRARY_OUTPUT_NAME libkphp-light-runtime.a)
6969

0 commit comments

Comments
 (0)