Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: Sergey Bronnikov <estetus@gmail.com>,
	tarantool-patches@dev.tarantool.org, max.kokryashkin@gmail.com
Subject: Re: [Tarantool-patches] [PATCH luajit] Fix C file generation in jit.bcsave.
Date: Wed, 8 Nov 2023 11:48:49 +0300	[thread overview]
Message-ID: <ZUtLcWZnlM8qoAgF@root> (raw)
In-Reply-To: <ea9f12df-5f05-464f-a936-9bfc70edcd68@tarantool.org>

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

  reply	other threads:[~2023-11-08  8:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19  8:56 Sergey Bronnikov via Tarantool-patches
2023-10-23 11:12 ` Sergey Kaplun via Tarantool-patches
2023-10-31  9:57   ` Sergey Bronnikov via Tarantool-patches
2023-10-31 13:21     ` Sergey Kaplun via Tarantool-patches
2023-11-07 21:19       ` Sergey Bronnikov via Tarantool-patches
2023-11-08  8:48         ` Sergey Kaplun via Tarantool-patches [this message]
2024-03-20 15:07 ` Sergey Kaplun via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUtLcWZnlM8qoAgF@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=max.kokryashkin@gmail.com \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] Fix C file generation in jit.bcsave.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox