aboutsummaryrefslogtreecommitdiff
path: root/rakelib
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-10-09 14:43:11 +0200
committerEugen Wissner <belka@caraus.de>2026-10-09 14:43:11 +0200
commit134d3ac4caff6d87c79b0892e57073594cb0064c (patch)
treee93c73d59ee50f3bdaa073bb5908ae3c74f7a985 /rakelib
parent244449004fb62adbfd43b81e8dfce7500ca4a7e4 (diff)
downloadelna-134d3ac4caff6d87c79b0892e57073594cb0064c.tar.gz
Remove Pointer and nil support
Diffstat (limited to 'rakelib')
-rw-r--r--rakelib/treesitter.rake5
1 files changed, 3 insertions, 2 deletions
diff --git a/rakelib/treesitter.rake b/rakelib/treesitter.rake
index ca0c8d0..8ccf48f 100644
--- a/rakelib/treesitter.rake
+++ b/rakelib/treesitter.rake
@@ -7,6 +7,7 @@ require 'rake/clean'
TREE_SITTER_BUILD = Pathname.new 'build/tree-sitter'
TREE_SITTER_TREE = Pathname.new 'tools/tree-sitter'
+TREE_SITTER_EXT = RUBY_PLATFORM =~ /darwin/ ? 'dylib' : 'so'
CLEAN.include TREE_SITTER_BUILD
@@ -28,7 +29,7 @@ namespace :ts do
File.symlink (TREE_SITTER_TREE / 'test' / 'corpus').relative_path_from(build_test), build_corpus
end
- file "#{TREE_SITTER_BUILD}/parser.so" => "#{TREE_SITTER_BUILD}/src/parser.c" do |t|
+ file "#{TREE_SITTER_BUILD}/parser.#{TREE_SITTER_EXT}" => "#{TREE_SITTER_BUILD}/src/parser.c" do |t|
sh 'build/host/install/bin/gcc', '-O2', '-Wall', '-fPIC', '-shared',
t.source, '-o', t.name
end
@@ -61,4 +62,4 @@ namespace :ts do
end
desc 'Build a tree-sitter parser'
-task ts: ['ts:generate', "#{TREE_SITTER_BUILD}/parser.so"]
+task ts: ['ts:generate', "#{TREE_SITTER_BUILD}/parser.#{TREE_SITTER_EXT}"]