Improve the detection of llvm repos

This commit is contained in:
Benson Chu 2025-06-18 14:43:50 -05:00
parent 1d7d21bb7c
commit 13fb053b3a

View file

@ -331,16 +331,10 @@
#'lls/default-target-init))
(defun lls/guess-root-dir-fun ()
(let ((repo-remotes
'("https://github.com/llvm/llvm-project.git"
"git@github.com:llvm/llvm-project"
"git@github.com:llvm/llvm-project.git"
"https://github.com/MPACT-ORG/llvm-project"
"https://github.com/Xilinx/llvm-aie")))
(if (-->
(shell-command-to-string "git remote get-url origin")
(string-trim it)
(member it repo-remotes))
(string-match-p ".*llvm.*" it))
(vc-root-dir)
(--> (directory-files "~/workspace" t "^[^.]")
(remove-if-not #'(lambda (it)
@ -350,7 +344,7 @@
(string-trim it)
(member it repo-remotes))))
it)
(completing-read "Repo directory? " it)))))
(completing-read "Repo directory? " it))))
(defun lls/guess-build-dirs-fun (root-dir)
(lambda ()