mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
install: allow pure C parsers to be compiled without -lstdc++
E.g. installing C [here](https://github.com/nvim-treesitter/nvim-treesitter/issues/4056) does not require libstdc++. Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
This commit is contained in:
parent
5b8a152c6c
commit
86345612b7
1 changed files with 7 additions and 1 deletions
|
|
@ -96,8 +96,14 @@ function M.select_compiler_args(repo, compiler)
|
|||
repo.files,
|
||||
"-shared",
|
||||
"-Os",
|
||||
"-lstdc++",
|
||||
}
|
||||
if
|
||||
#vim.tbl_filter(function(file)
|
||||
return file:match "%.cc$" or file:match "%cpp$" or file:match "%.cxx$"
|
||||
end, repo.files) > 0
|
||||
then
|
||||
table.insert(args, "-lstdc++")
|
||||
end
|
||||
if fn.has "win32" == 0 then
|
||||
table.insert(args, "-fPIC")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue