diff --git a/bin/env.bash b/bin/env.bash index d48f4561..c4b9b427 100644 --- a/bin/env.bash +++ b/bin/env.bash @@ -3,6 +3,8 @@ set -euo pipefail system=$(uname) if [[ $system == "Linux" ]]; then ext="so" +elif [[ $system == "FreeBSD" ]]; then + ext="so" elif [[ $system == "Darwin" ]]; then ext="dylib" else diff --git a/core/tsc-dyn-get.el b/core/tsc-dyn-get.el index bfd9c328..7eeab632 100644 --- a/core/tsc-dyn-get.el +++ b/core/tsc-dyn-get.el @@ -72,7 +72,7 @@ this to nil." (pcase system-type ('windows-nt "dll") ('darwin "dylib") - ((or 'gnu 'gnu/linux 'gnu/kfreebsd) "so") + ((or 'gnu 'gnu/linux 'gnu/kfreebsd 'berkeley-unix) "so") ((or 'ms-dos 'cygwin) (error "Unsupported system-type %s" system-type)) (_ "so"))) @@ -82,7 +82,7 @@ this to nil." ;;; TODO: Make this correct. (defun tsc-dyn-get--system-specific-file () - "Return the dynamic module filename, which is system-dependent." + "Return the pre-built dynamic module filename, which is system-dependent." (pcase system-type ('windows-nt "tsc-dyn.x86_64-pc-windows-msvc.dll") ('darwin (if (string-prefix-p "x86_64" system-configuration) diff --git a/lisp/tree-sitter-load.el b/lisp/tree-sitter-load.el index dc6b51ce..ebe67e7e 100644 --- a/lisp/tree-sitter-load.el +++ b/lisp/tree-sitter-load.el @@ -32,6 +32,7 @@ See `tree-sitter-require'.") (pcase system-type ;; The CLI tool outputs `.so', but `.dylib' is more sensible on macOS. ('darwin (list ".dylib" ".so")) + ('berkeley-unix (list ".so")) ('gnu/linux (list ".so")) ('android (list ".so")) ('windows-nt (list ".dll"))