<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hi, Sergey,</p>
    <p>Thanks for the patch! LGTM</p>
    <p>Sergey</p>
    <div class="moz-cite-prefix">On 4/6/26 16:04, Sergey Kaplun wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20260406130407.21995-1-skaplun@tarantool.org">
      <pre wrap="" class="moz-quote-pre">This patch is a follow-up to the commit
1e5887d884be92c24ebd7c9db0a9b21ea366a0b5 ("FFI: Avoid dangling
cts->L."). The `target_link_options()` feature is introduced in CMake
3.13. Unfortunately, we have distros in Tarantool's CI with an older
default CMake version.

This patch workarounds this by the passing `LINK_FLAGS` directly.
---

Branch: <a class="moz-txt-link-freetext" href="https://github.com/tarantool/luajit/tree/skaplun/fix-old-cmakes">https://github.com/tarantool/luajit/tree/skaplun/fix-old-cmakes</a>

 test/tarantool-c-tests/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/tarantool-c-tests/CMakeLists.txt b/test/tarantool-c-tests/CMakeLists.txt
index 3bb20bff..ea553db8 100644
--- a/test/tarantool-c-tests/CMakeLists.txt
+++ b/test/tarantool-c-tests/CMakeLists.txt
@@ -56,11 +56,11 @@ foreach(test_source ${tests})
   )
   set_target_properties(${exe} PROPERTIES
     COMPILE_FLAGS "${TESTS_C_FLAGS}"
+    # Allow to call non-static functions via FFI.
+    LINK_FLAGS "-rdynamic"
     OUTPUT_NAME "${exe}${C_TEST_SUFFIX}"
     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
   )
-  # Allow to call non-static functions via FFI.
-  target_link_options(${exe} PRIVATE "-rdynamic")
   target_link_libraries(${exe} libtest ${LUAJIT_LIBRARY})
   add_dependencies(tarantool-c-tests-build ${exe})
 
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>