emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-


From: Andrea Corallo
Subject: [elpa] externals/elisp-benchmarks fccb7bbaad 1/2: * Handle 'compilation-safety'
Date: Wed, 15 May 2024 13:49:25 -0400 (EDT)

branch: externals/elisp-benchmarks
commit fccb7bbaad77f5b77f98bafb8402dbc250e5d9c2
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Handle 'compilation-safety'
    
    * elisp-benchmarks.el (bytecomp): Require it.
    : Silence warning if 'compilation-safety' is not defined.
    (elb-safety): Define.
    (elisp-benchmarks-run): Make use of.
---
 elisp-benchmarks.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/elisp-benchmarks.el b/elisp-benchmarks.el
index 855d5af444..0e2d9dcbc5 100644
--- a/elisp-benchmarks.el
+++ b/elisp-benchmarks.el
@@ -46,9 +46,12 @@
 (require 'benchmark)
 (require 'outline)
 (require 'org)
+(require 'bytecomp)
 (if (featurep 'native-compile)
     (require 'comp)
   (defvar native-comp-speed))
+(unless (boundp 'compilation-safety)
+  (defvar compilation-safety))
 
 (defgroup elb nil
   "Emacs Lisp benchmarks."
@@ -62,6 +65,10 @@
   "Default `native-comp-speed' to be used for native compiling the benchmarks."
   :type 'number)
 
+(defcustom elb-safety 0
+  "Default `compilation-safety' to be used for native compiling the 
benchmarks."
+  :type 'number)
+
 (defconst elb-bench-directory
   (expand-file-name "benchmarks/"
                    (file-name-directory
@@ -93,6 +100,7 @@ RECOMPILE all the benchmark folder when non nil."
    (when current-prefix-arg
      (list (read-regexp "Run benchmark matching: "))))
   (let* ((native-comp-speed elb-speed)
+        (compilation-safety elb-safety)
         (compile-function (if (featurep 'native-compile)
                               #'native-compile
                             #'byte-compile-file))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]