[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 2dae7e1 02/11: Add system-configuration in the compi
From: |
Andrea Corallo |
Subject: |
feature/native-comp 2dae7e1 02/11: Add system-configuration in the compilation output path |
Date: |
Wed, 4 Mar 2020 12:08:30 -0500 (EST) |
branch: feature/native-comp
commit 2dae7e1b697fef389e8e193d60ef799e2b3b09b4
Author: AndreaCorallo <address@hidden>
Commit: AndreaCorallo <address@hidden>
Add system-configuration in the compilation output path
---
lisp/emacs-lisp/comp.el | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index e14f350..c3e797b 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2014,9 +2014,12 @@ Update all insn accordingly."
(defun comp-compile-ctxt-to-file (name)
"Compile as native code the current context naming it NAME.
Prepare every function for final compilation and drive the C back-end."
- (comp-finalize-relocs)
- (unless comp-dry-run
- (comp--compile-ctxt-to-file name)))
+ (let ((dir (file-name-directory name)))
+ (comp-finalize-relocs)
+ (unless (file-exists-p dir)
+ (make-directory dir))
+ (unless comp-dry-run
+ (comp--compile-ctxt-to-file name))))
(defun comp-final (_)
"Final pass driving the C back-end for code emission."
@@ -2118,9 +2121,17 @@ Return the compilation unit file name."
(let ((data input)
(comp-native-compiling t)
(comp-ctxt (make-comp-ctxt
- :output (if (symbolp input)
- (make-temp-file (concat (symbol-name input)
"-"))
- (file-name-sans-extension (expand-file-name
input))))))
+ :output
+ (if (symbolp input)
+ (make-temp-file (concat (symbol-name input) "-"))
+ (let ((exp-file (expand-file-name input)))
+ (concat
+ (file-name-as-directory
+ (concat
+ (file-name-directory exp-file)
+ system-configuration))
+ (file-name-sans-extension
+ (file-name-nondirectory exp-file))))))))
(comp-log "\n\n" 1)
(condition-case err
(mapc (lambda (pass)
- feature/native-comp updated (0cef208 -> 6487d4a), Andrea Corallo, 2020/03/04
- feature/native-comp 8788fab 03/11: ; Nit fix in comment, Andrea Corallo, 2020/03/04
- feature/native-comp ce9e3a4 05/11: Introduce 'effective_load_path', Andrea Corallo, 2020/03/04
- feature/native-comp 0da62d9 01/11: Change parameter name into comp--compile-ctxt-to-file, Andrea Corallo, 2020/03/04
- feature/native-comp 2dae7e1 02/11: Add system-configuration in the compilation output path,
Andrea Corallo <=
- feature/native-comp d0066e3 04/11: * Keep comp-subr-list into pure space, Andrea Corallo, 2020/03/04
- feature/native-comp bf4f620 06/11: * ; Clean-up out of date comment, Andrea Corallo, 2020/03/04
- feature/native-comp 43b6f05 09/11: Hash eln ABI once and add it to the output compilation path, Andrea Corallo, 2020/03/04
- feature/native-comp f77f6ca 08/11: Fix org for eln new compilation folder layout, Andrea Corallo, 2020/03/04
- feature/native-comp 1f3ba65 10/11: * Do not crash if the output directory is created in the meanwhile, Andrea Corallo, 2020/03/04
- feature/native-comp 286e21c 07/11: Rework `find-lisp-object-file-name', Andrea Corallo, 2020/03/04
- feature/native-comp 6487d4a 11/11: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/04