Skip to content

Commit

Permalink
Fixup treesit.patch for latest changes on upstream master
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Murray <murray.alex@gmail.com>
  • Loading branch information
alexmurray committed Jul 12, 2023
1 parent bbfaf11 commit ad8a180
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions treesit.patch
Original file line number Diff line number Diff line change
@@ -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))
Expand All @@ -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
Expand All @@ -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))

0 comments on commit ad8a180

Please sign in to comment.