[Tarantool-patches] [PATCH luajit] Fix C file generation in jit.bcsave.
Sergey Kaplun
skaplun at tarantool.org
Wed Nov 8 11:48:49 MSK 2023
Hi, Sergey!
Thanks for the fixes!
LGTM, for the patch itself, just a question:
Why do you remove the C file to check? I suppose it's good to check
creation of a C file too. Thus we can avoid some regressions in the
future.
On 08.11.23, Sergey Bronnikov wrote:
> Hello, Sergey
>
> On 10/31/23 16:21, Sergey Kaplun wrote:
>
<snipped>
> >> add_custom_target(export_bc
> >> COMMAND ${CMAKE_COMMAND} -E
> >> env
> >> LUA_PATH=${LUA_PATH}
> >> ${LUAJIT_BINARY} -b ${LUA_FILE} ${C_FILE}
> >> + COMMAND ${CMAKE_COMMAND} -E
> >> + remove ${LUA_FILE}
> >> DEPENDS luajit-main ${LUA_FILE}
> >> BYPRODUCTS ${C_FILE}
> >> COMMENT "Exporting bytecode to a C file"
> > The test still doesn't fail before the commit.
> > The reason is that the C file is compiled by C compiler, not the C++
> > compiler (so this macro is irrelevant).
> Fixed, thanks.
> >
> > I suppose that we should add a .cpp file for the test too (and add the
> > LINKER_LANGUAGE CXX [1] property for this target if its necessary).
>
> Unfortunately, setting property with LINKER_LANGUAGE is not enough.
>
> Additionally one need setting CXX language for a project or enable CXX
> in required CMakeLists.txt
>
> and it is better to have .cc extension for a file too. Otherwise CMake
> fails to build a file by CXX compiler.
Nice investigation, thanks!
<snipped>
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list