From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: native compilation units Date: Mon, 06 Jun 2022 19:58:11 +0300 Message-ID: <831qw191b0.fsf@gnu.org> References: <83o7z6849m.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19061"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, akrl@sdf.org, emacs-devel@gnu.org To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 06 18:59:55 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyG53-0004k2-JO for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Jun 2022 18:59:53 +0200 Original-Received: from localhost ([::1]:56460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyG52-0007xQ-5y for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Jun 2022 12:59:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyG3a-0005xw-TI for emacs-devel@gnu.org; Mon, 06 Jun 2022 12:58:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyG3a-0007n1-IC; Mon, 06 Jun 2022 12:58:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BOjq6dWsafG+w42c0pTuTn9zAgVGsD7CKpMQk47Oz3c=; b=DKgr4GBG19UD /QAUUtehaOeYUigqzNOiiqRSmMZGv+um02rRaxoR/kv+4mI8NcQK253SbyxcggQphRlCAvhHnuVDf Bcb7vfWv1rXid/llvZ9aJLWFSTpNNfQHrIooanexw43OP8lmw7fOlzTRBeseXdMqEDh8ZZ7WWuMgz OxQNiGh7aTQ7A0tOd/OospZSWiMOyAcHTTuWEXR81nRTgT8klUSjIHK54Vr0Lz2ZXoXgjoYulbpaQ 45mDufYpNIRACYynqTH9uJLLVinHoDlXVGKCNtweqFJ+31ktieIZTXy0vT/DeVHr2OLp59r57YdSv EEsKDn6xBlRTSpwpkAYBRA==; Original-Received: from [87.69.77.57] (port=4443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyG3Z-0005zP-VG; Mon, 06 Jun 2022 12:58:22 -0400 In-Reply-To: (message from Lynn Winebarger on Mon, 6 Jun 2022 12:23:49 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290808 Archived-At: > From: Lynn Winebarger > Date: Mon, 6 Jun 2022 12:23:49 -0400 > Cc: Stefan Monnier , Andrea Corallo , emacs-devel@gnu.org > > Of course, there is: that function is what is invoked when building a > release tarball, where the *.elc files are already present. See > lisp/Makefile.in. > > That's what I expected was the case, but the question is whether it "should" > check for those .elc files and create them only if they do not exist, as opposed > to batch-byte+native-compile, which creates both unconditionally. Or perhaps > just note the possible hiccup in the docstring for batch-native-compile? You are describing a different function. batch-native-compile was explicitly written to support the build of a release tarball, where the *.elc files are always present, and regenerating them is just a waste of cycles, and also runs the risk of creating a .elc file that is not fully functional, due to some peculiarity of the platform or the build environment. > However, since the eln file can be generated without the elc file, it also begs the question > of why the use of the eln file is conditioned on the existence of the elc file in the > first place. Are there situations where the eln file would be incorrect to use > without the byte-compiled file in place? Andrea was asked this question several times and explained his design, you can find it in the archives. Basically, native compilation is driven by byte compilation, and is a kind of side effect of it.