all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: akrl@sdf.org
Cc: larsi@gnus.org, emacs-devel@gnu.org
Subject: Re: Building a tarball with native-compilation support
Date: Sat, 07 Aug 2021 09:23:42 +0300	[thread overview]
Message-ID: <83bl69ixht.fsf@gnu.org> (raw)
In-Reply-To: <83wnozhzw1.fsf@gnu.org> (message from Eli Zaretskii on Fri, 06 Aug 2021 09:05:02 +0300)

> Date: Fri, 06 Aug 2021 09:05:02 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: larsi@gnus.org, emacs-devel@gnu.org
> 
> How about if we start by providing a separate Makefile target to
> native-compile a single .el file when its .elc exists and is
> up-to-date?

There are some complications with doing this.  For a Makefile target
we need to know the file name of the .eln file to look for.  That file
name includes 2 parts that only Emacs knows: the ABI hash (which
determines the subdirectory of native-lisp/), and the 2 hashes
included in the basename of the .eln file itself.  For example, the
.eln file corresponding to window.el on my machine is this:

   native-lisp/28.0.50-2e9d394d/window-0d1b8b93-dcb2375f.eln

This should be the target name of the Makefile rule.  We can ask Emacs
to provide the hashes (the value of comp-abi-hash and what
comp-el-to-eln-rel-filename returns for "window.el"), but the problem
is that it must be the up-to-date rebuilt Emacs, otherwise the values
could be incorrect, or the Emacs binary could not yet exist at all.
This complicates things because Make expands and calculates some of
the stuff in the Makefile when it reads the Makefile, before it starts
executing the rules, and we cannot guarantee we can know those hashes
at that time.

So I think a better way would be to write a function in Emacs Lisp
that is passed a list of preloaded Lisp files, and natively-compiles
those of them whose *.eln files are either outdated or do not exist.
Then we could have a single Makefile target which invokes this
function once Emacs is fully rebuilt.

Comments?



  parent reply	other threads:[~2021-08-07  6:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  6:25 Building a tarball with native-compilation support Eli Zaretskii
2021-08-05 21:55 ` Andrea Corallo via Emacs development discussions.
2021-08-06  6:05   ` Eli Zaretskii
2021-08-06 14:37     ` Stefan Monnier
2021-08-06 17:41       ` Eli Zaretskii
2021-08-07 13:28         ` Stefan Monnier
2021-08-07 13:35           ` Eli Zaretskii
2021-08-07  6:23     ` Eli Zaretskii [this message]
2021-08-07  6:48       ` Eli Zaretskii
2021-08-07 10:32         ` Eli Zaretskii
2021-08-14  7:44           ` Eli Zaretskii
2021-08-17 10:16             ` Andrea Corallo via Emacs development discussions.
2021-08-17 11:44               ` Eli Zaretskii
2021-08-17 21:49                 ` Andrea Corallo via Emacs development discussions.
2021-08-18 13:17                   ` Eli Zaretskii
2021-08-18 15:03                     ` Andrea Corallo via Emacs development discussions.
2021-08-26 13:42                     ` Eli Zaretskii
2021-08-27 13:33                       ` Andrea Corallo via Emacs development discussions.

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=83bl69ixht.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.