mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 16:30:02 -04:00
feat: use -bundle to build parsers on macOS
This will make the parsers align more closely to the ones bundled with
Neovim, because CMake uses the `-bundle` flag (instead of `-shared`) on
macOS when a library is compiled as a `MODULE`.
See, for example:
10baf89712/cmake.deps/cmake/TreesitterParserCMakeLists.txt (L6-L9)
This commit is contained in:
parent
cbfa7cae1b
commit
6f5a4f6306
1 changed files with 5 additions and 1 deletions
|
|
@ -110,9 +110,13 @@ function M.select_compiler_args(repo, compiler)
|
||||||
"parser.so",
|
"parser.so",
|
||||||
"-I./src",
|
"-I./src",
|
||||||
repo.files,
|
repo.files,
|
||||||
"-shared",
|
|
||||||
"-Os",
|
"-Os",
|
||||||
}
|
}
|
||||||
|
if fn.has "mac" == 1 then
|
||||||
|
table.insert(args, "-bundle")
|
||||||
|
else
|
||||||
|
table.insert(args, "-shared")
|
||||||
|
end
|
||||||
if
|
if
|
||||||
#vim.tbl_filter(function(file) ---@param file string
|
#vim.tbl_filter(function(file) ---@param file string
|
||||||
local ext = vim.fn.fnamemodify(file, ":e")
|
local ext = vim.fn.fnamemodify(file, ":e")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue