mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
Merge pull request #30 from kyazdani42/fix/arg-positionning-install
fix install by changing cc arguments position
This commit is contained in:
commit
e7a9c41103
1 changed files with 6 additions and 6 deletions
|
|
@ -34,9 +34,9 @@ local function get_cache_dir()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function iter_cmd(cmd_list, i, ft)
|
local function iter_cmd(cmd_list, i, ft)
|
||||||
if i == #cmd_list then return print('Treesitter parser for '..ft..' has been installed') end
|
if i == #cmd_list + 1 then return print('Treesitter parser for '..ft..' has been installed') end
|
||||||
|
|
||||||
local attr = cmd_list[i + 1]
|
local attr = cmd_list[i]
|
||||||
if attr.info then print(attr.info) end
|
if attr.info then print(attr.info) end
|
||||||
|
|
||||||
handle = luv.spawn(attr.cmd, attr.opts, vim.schedule_wrap(function(code)
|
handle = luv.spawn(attr.cmd, attr.opts, vim.schedule_wrap(function(code)
|
||||||
|
|
@ -76,12 +76,12 @@ local function run_install(cache_folder, package_path, ft, repo)
|
||||||
args = vim.tbl_flatten({
|
args = vim.tbl_flatten({
|
||||||
'-o',
|
'-o',
|
||||||
'parser.so',
|
'parser.so',
|
||||||
|
'-I./src',
|
||||||
|
repo.files,
|
||||||
'-shared',
|
'-shared',
|
||||||
|
'-Os',
|
||||||
'-lstdc++',
|
'-lstdc++',
|
||||||
'-fPIC',
|
'-fPIC',
|
||||||
'-Os',
|
|
||||||
'-I./src',
|
|
||||||
repo.files
|
|
||||||
}),
|
}),
|
||||||
cwd = compile_location
|
cwd = compile_location
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +100,7 @@ local function run_install(cache_folder, package_path, ft, repo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iter_cmd(command_list, 0, ft)
|
iter_cmd(command_list, 1, ft)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO(kyazdani): this should work on windows too
|
-- TODO(kyazdani): this should work on windows too
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue