mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 04:11:18 +00:00
Allow extra flags to be passed
This commit is contained in:
parent
0a0f467494
commit
4599bd9cba
2 changed files with 13 additions and 9 deletions
|
|
@ -79,12 +79,14 @@
|
|||
:compiler compiler
|
||||
:file file
|
||||
:action compiler-action
|
||||
:output output)
|
||||
(pcase action
|
||||
('debug (format "-mllvm -debug-only=%s" (ll/read-pass-name "Which pass? ")))
|
||||
('before-after (let ((pass (ll/read-pass-name "Which pass? ")))
|
||||
(format "-mllvm -print-before=%s -mllvm -print-after=%s" pass pass)))
|
||||
('changed "-mllvm -print-before-all"))
|
||||
:output output
|
||||
:flags
|
||||
(list
|
||||
(pcase action
|
||||
('debug (format "-mllvm -debug-only=%s" (ll/read-pass-name "Which pass? ")))
|
||||
('before-after (let ((pass (ll/read-pass-name "Which pass? ")))
|
||||
(format "-mllvm -print-before=%s -mllvm -print-after=%s" pass pass)))
|
||||
('changed "-mllvm -print-before-all"))))
|
||||
" ")
|
||||
" "))))
|
||||
|
||||
|
|
|
|||
|
|
@ -247,8 +247,8 @@
|
|||
(apply (lls/conf-get 'dis-command-fun) args))
|
||||
|
||||
;; ========================= LLVM Build Dirs =========================
|
||||
(cl-defun lls/default-comp-fun (&key compiler file action output rest)
|
||||
(string-join
|
||||
(cl-defun lls/default-comp-fun (&key compiler file action output flags)
|
||||
(-->
|
||||
(list compiler
|
||||
(lls/get-clang-options)
|
||||
(string-join rest " ")
|
||||
|
|
@ -259,11 +259,13 @@
|
|||
('preprocess "-E")
|
||||
('llvm-ir "-S -emit-llvm")
|
||||
('executable ""))
|
||||
flags
|
||||
"-o -"
|
||||
(or (and output
|
||||
(format "| tee %s" output))
|
||||
""))
|
||||
" "))
|
||||
(flatten-list it)
|
||||
(string-join it " ")))
|
||||
|
||||
(defun ll/read-pass ()
|
||||
(completing-read "Which pass? "
|
||||
|
|
|
|||
Loading…
Reference in a new issue