diff --git a/treesit.patch b/treesit.patch index 25f3ef5..479a0bd 100644 --- a/treesit.patch +++ b/treesit.patch @@ -1,8 +1,8 @@ diff --git a/lisp/treesit.el b/lisp/treesit.el -index d7502560fea..dbdbdb193c0 100644 +index a9761dbb38d..274b3979bd7 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el -@@ -2952,11 +2952,11 @@ function signals an error." +@@ -3146,11 +3146,11 @@ function signals an error." (default-directory (make-temp-file "treesit-workdir" t)) (workdir (expand-file-name "repo")) (source-dir (expand-file-name (or source-dir "src") workdir)) @@ -16,7 +16,7 @@ index d7502560fea..dbdbdb193c0 100644 "c++")) (soext (or (car dynamic-library-suffixes) (signal 'treesit-error '("Emacs cannot figure out the file extension for dynamic libraries for this system, because `dynamic-library-suffixes' is nil")))) -@@ -2981,20 +2981,27 @@ function signals an error." +@@ -3175,15 +3175,21 @@ function signals an error." (message "Compiling library") ;; cc -fPIC -c -I. parser.c (treesit--call-process-signal @@ -41,9 +41,11 @@ index d7502560fea..dbdbdb193c0 100644 ;; cc/c++ -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}" (apply #'treesit--call-process-signal (if (file-exists-p "scanner.cc") c++ cc) - nil t nil - `("-fPIC" "-shared" -+ "--sysroot" ,(file-name-as-directory (getenv "EMACS_SNAP_DIR")) - ,@(directory-files - default-directory nil - (rx bos (+ anychar) ".o" eos)) +@@ -3195,6 +3201,7 @@ function signals an error." + (rx bos (+ anychar) ".o" eos)) + "-o" ,lib-name) + `("-fPIC" "-shared" ++ "--sysroot" ,(file-name-as-directory (getenv "EMACS_SNAP_DIR")) + ,@(directory-files + default-directory nil + (rx bos (+ anychar) ".o" eos))