mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 04:11:18 +00:00
Rename function build target
This commit is contained in:
parent
665acffffb
commit
16c218cc25
7 changed files with 15 additions and 14 deletions
|
|
@ -32,19 +32,20 @@
|
|||
(require 'use-package)
|
||||
(use-package realgud-lldb)
|
||||
|
||||
;; =========================== LLVM Rebuild ==========================
|
||||
;; =========================== Rebuild ==========================
|
||||
|
||||
(defvar llvm-core-count
|
||||
(defvar comp-dev/default-parallelism
|
||||
(nprocs))
|
||||
|
||||
(defun lls/run-build-command (build-dir targets &optional verbose)
|
||||
(defun comp-dev/build-target (build-dir targets &optional verbose)
|
||||
(let ((cmake-make-program
|
||||
(if (string= "Makefile" (car (directory-files build-dir nil "^\\(build\\.ninja$\\|Makefile\\)$")))
|
||||
(if (string= "Makefile" (car (directory-files build-dir nil
|
||||
(rx line-start (or "build.ninja" "Makefile") line-end))))
|
||||
"make"
|
||||
"ninja")))
|
||||
(format "set -o pipefail && CLICOLOR_FORCE=1 %s -C %s -j %d %s %s 2>&1 | tee ninja.log"
|
||||
cmake-make-program
|
||||
build-dir llvm-core-count
|
||||
build-dir comp-dev/default-parallelism
|
||||
(if verbose "-v" "")
|
||||
(string-join targets " "))))
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
(defun ll/ensure-clang-binary-built (dir)
|
||||
;; TODO: assumed build-dir constant, should take as argument and prompt
|
||||
;; further up
|
||||
(lls/run-build-command dir '("clang")))
|
||||
(comp-dev/build-target dir '("clang")))
|
||||
|
||||
(defun ll/get-c-action-map ()
|
||||
(append
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
(call-interactively #'recompile)))))
|
||||
|
||||
(defun ll/diff-on-optionset (file action)
|
||||
(let ((comm (ll/build-clang-command (lls/un-trampify file) action))
|
||||
(let ((comm (ll/build-clang-command file action))
|
||||
(extra-option (read-string "Extra option? "))
|
||||
(pipe (if (y-or-n-p "Diff assembly (y) or debug (n)? ")
|
||||
">" "2>")))
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
(let ((dir (lls/get-llvm-build-dir)))
|
||||
(--> file
|
||||
(list (format "touch %s" it)
|
||||
(lls/run-build-command dir (list (concat it "^")) t))
|
||||
(comp-dev/build-target dir (list (concat it "^")) t))
|
||||
(string-join it " && ")
|
||||
(compilation-start it nil
|
||||
(lambda (_)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
;; further up
|
||||
(let ((dir (lls/get-llvm-build-dir))
|
||||
(tools (ll/get-required-binaries-for-test file)))
|
||||
(lls/run-build-command dir tools)))
|
||||
(comp-dev/build-target dir tools)))
|
||||
|
||||
(defun ll/build-lit-command (file action)
|
||||
(format "%s %s %s"
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
(when tools
|
||||
(-->
|
||||
;; TODO: Assuming debug folder, (lls/get-llvm-build-dir) doesn't work
|
||||
(lls/run-build-command "/scratch/benson/tools3/llvm_cgt/build/Debug/llvm" (seq-uniq tools))
|
||||
(comp-dev/build-target "/scratch/benson/tools3/llvm_cgt/build/Debug/llvm" (seq-uniq tools))
|
||||
(compilation-start
|
||||
it
|
||||
nil
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
(compilation-start (-->
|
||||
(list
|
||||
(format "touch %s" file)
|
||||
(lls/run-build-command
|
||||
(comp-dev/build-target
|
||||
build-dir (list (format "%s^" file)) t))
|
||||
(string-join it " && "))
|
||||
nil
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
;; "llc")))))
|
||||
;; (let* ((buffer-name (funcall lls/name-llvm-build-buffer directory tools)))
|
||||
;; (compilation-start
|
||||
;; (lls/run-build-command (lls/un-trampify directory) tools)
|
||||
;; (comp-dev/build-target directory tools)
|
||||
;; nil
|
||||
;; (lambda (_) buffer-name))))
|
||||
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
"llc")))))
|
||||
(name (funcall lls/name-llvm-build-buffer directory tools))
|
||||
|
||||
(lls/run-build-command (lls/un-trampify directory) tools))
|
||||
(comp-dev/build-target directory tools))
|
||||
|
||||
(provide 'llvm-build-tool)
|
||||
;;; llvm-build-tool.el ends here
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5e5d4984816ace917f78190e04936b038c43365b
|
||||
Subproject commit 9475fc97631749af237b5fcda503a0b945c16eab
|
||||
Loading…
Reference in a new issue