|
| 1 | +From 34fa0739fb74b6940e3d34c431d978f3152758e8 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Dominik Hassler < [email protected]> |
| 3 | +Date: Fri, 5 Apr 2024 18:20:46 +0000 |
| 4 | +Subject: [PATCH] initial illumos support |
| 5 | + |
| 6 | +--- |
| 7 | + tree-sitter-langs-build.el | 21 +++++++++++++++++++++ |
| 8 | + 1 file changed, 21 insertions(+) |
| 9 | + |
| 10 | +diff --git a/tree-sitter-langs-build.el b/tree-sitter-langs-build.el |
| 11 | +index 2e62cfed..f4b96044 100644 |
| 12 | +--- a/tree-sitter-langs-build.el |
| 13 | ++++ b/tree-sitter-langs-build.el |
| 14 | +@@ -244,6 +244,7 @@ infrequent (grammar-only changes). It is different from the version of |
| 15 | + ('gnu/linux "linux") |
| 16 | + ('berkeley-unix "freebsd") |
| 17 | + ('windows-nt "windows") |
| 18 | ++ ('usg-unix-v "illumos") |
| 19 | + (_ (error "Unsupported system-type %s" system-type)))) |
| 20 | + |
| 21 | + (defconst tree-sitter-langs--suffixes '(".dylib" ".dll" ".so") |
| 22 | +@@ -410,6 +411,26 @@ from the current state of the grammar repo, without cleanup." |
| 23 | + "-I" "src" |
| 24 | + "src/parser.c" |
| 25 | + "-o" (format "%sbin/%s.so" tree-sitter-langs-grammar-dir lang-symbol))))) |
| 26 | ++ ((memq system-type '(usg-unix-v)) |
| 27 | ++ (cond |
| 28 | ++ ((file-exists-p "src/scanner.cc") |
| 29 | ++ (tree-sitter-langs--call |
| 30 | ++ "g++" "-shared" "-fPIC" "-fno-exceptions" "-g" "-O2" |
| 31 | ++ "-I" "src" |
| 32 | ++ "src/scanner.cc" "-xc" "src/parser.c" |
| 33 | ++ "-o" (format "%sbin/%s.so" tree-sitter-langs-grammar-dir lang-symbol))) |
| 34 | ++ ((file-exists-p "src/scanner.c") |
| 35 | ++ (tree-sitter-langs--call |
| 36 | ++ "gcc" "-shared" "-fPIC" "-g" "-O2" |
| 37 | ++ "-I" "src" |
| 38 | ++ "src/scanner.c" "src/parser.c" |
| 39 | ++ "-o" (format "%sbin/%s.so" tree-sitter-langs-grammar-dir lang-symbol))) |
| 40 | ++ (:default |
| 41 | ++ (tree-sitter-langs--call |
| 42 | ++ "gcc" "-shared" "-fPIC" "-g" "-O2" |
| 43 | ++ "-I" "src" |
| 44 | ++ "src/parser.c" |
| 45 | ++ "-o" (format "%sbin/%s.so" tree-sitter-langs-grammar-dir lang-symbol))))) |
| 46 | + (:default (tree-sitter-langs--call "tree-sitter" "test"))))) |
| 47 | + ;; Replace underscores with hyphens. Example: c_sharp. |
| 48 | + (let ((default-directory bin-dir)) |
0 commit comments