CMake: fix LUAJIT_USE_XXX definitions
LuaJIT has some configuration flags which can be switched via -DLUAJIT_USE_OPTION defines, e.g. USE_ASAN or USE_VALGRIND. Before this patch these definitions were added by CMake to XCFLAGS variable and passed to LuaJIT's Makefile. However, some of these flags also affect the content of lj_xxx.h internal header files, which were included by Tarantool (see utils.c) and compiled WITHOUT proper flags. This situation might lead to inconsistent ABI between compiled libluajit.a and Tarantool. This patch adds all LUAJIT_USE_XXX defines to CMake's COMPILE_FLAGS in order to enable these flags globally, then parses COMPILE_FLAGS and adds them to LuaJIT's XCFLAGS. Needed for #2643
Please register or sign in to comment