forked from mirrors/gecko-dev
Bug 1829512 - Use .clangd rather than vscode-specific configuration to point to the compilation database. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D176230
This commit is contained in:
parent
d3cbada9f4
commit
169a3e63a8
3 changed files with 11 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -35,6 +35,7 @@ ID
|
||||||
|
|
||||||
# User files that may appear at the root
|
# User files that may appear at the root
|
||||||
/.clang-tidy
|
/.clang-tidy
|
||||||
|
/.clangd
|
||||||
/.mozconfig*
|
/.mozconfig*
|
||||||
/mozconfig*
|
/mozconfig*
|
||||||
/old-configure
|
/old-configure
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ compile_commands\.json
|
||||||
|
|
||||||
# User files that may appear at the root
|
# User files that may appear at the root
|
||||||
^\.clang-tidy
|
^\.clang-tidy
|
||||||
|
^\.clangd
|
||||||
^\.mozconfig
|
^\.mozconfig
|
||||||
^mozconfig*
|
^mozconfig*
|
||||||
^\.moz-fast-forward
|
^\.moz-fast-forward
|
||||||
|
|
|
||||||
|
|
@ -299,11 +299,18 @@ def setup_clangd_rust_in_vscode(command_context):
|
||||||
with open(".clang-tidy", "w") as file:
|
with open(".clang-tidy", "w") as file:
|
||||||
yaml.dump(clang_tidy, file)
|
yaml.dump(clang_tidy, file)
|
||||||
|
|
||||||
|
clangd_cfg = {
|
||||||
|
"CompileFlags": {
|
||||||
|
"CompilationDatabase": clangd_cc_path,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
with open(".clangd", "w") as file:
|
||||||
|
yaml.dump(clangd_cfg, file)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"clangd.path": clangd_path,
|
"clangd.path": clangd_path,
|
||||||
"clangd.arguments": [
|
"clangd.arguments": [
|
||||||
"--compile-commands-dir",
|
|
||||||
clangd_cc_path,
|
|
||||||
"-j",
|
"-j",
|
||||||
str(multiprocessing.cpu_count() // 2),
|
str(multiprocessing.cpu_count() // 2),
|
||||||
"--limit-results",
|
"--limit-results",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue