Skip to content

Commit f2bb31c

Browse files
ngiloq6cpsauer
authored andcommitted
Update C-language family notes to include CUDA
1 parent 273fd7c commit f2bb31c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**What is this project trying to do for me?**
44

5-
First, provide Bazel users cross-platform autocomplete for the C language family (C++, C, Objective-C, and Objective-C++), and thereby make development more efficient and fun!
5+
First, provide Bazel users cross-platform autocomplete for the C language family (C++, C, Objective-C, Objective-C++, and CUDA), and thereby make development more efficient and fun!
66

77
More generally, export Bazel build actions into the `compile_commands.json` format that enables great tooling decoupled from Bazel.
88

@@ -95,7 +95,7 @@ If not now, maybe come back to this step later, or watch this repo for updates.
9595

9696
We'll generate a `compile_commands.json` file in the root of the Bazel workspace.
9797

98-
That file describes how Bazel is compiling all the (Objective-)C(++) files. With the compile commands in a common format, build-system-independent tooling (e.g. `clangd` autocomplete, `clang-tidy` linting etc.), can get to work.
98+
That file describes how Bazel is compiling all the (Objective-)C(++) or CUDA files. With the compile commands in a common format, build-system-independent tooling (e.g. `clangd` autocomplete, `clang-tidy` linting etc.), can get to work.
9999

100100
We'll get it running and then move onto the next section while it whirrs away. But in the future, every time you want tooling (like autocomplete) to see new `BUILD`-file changes, rerun the command you chose below! Clangd will automatically pick up the changes.
101101

refresh.template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _get_headers_gcc(compile_args: typing.List[str], source_path: str, action_ke
227227
if not arg.startswith('-fsanitize'))
228228

229229
header_cmd = list(header_cmd)
230-
# Dump system and user headers to stdout...in makefile format, tolerating missing (generated) files
230+
# Dump system and user headers to stdout...in makefile format, tolerating missing (generated) files--whose paths may be wrong!
231231
# Relies on our having made the workspace directory simulate a complete version of the execroot with //external symlink
232232
deps_args = ['--dependencies', '--print-missing-file-dependencies']
233233
# https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-command-options
@@ -974,7 +974,7 @@ def _get_cpp_command_for_files(compile_action):
974974
def _convert_compile_commands(aquery_output):
975975
"""Converts from Bazel's aquery format to de-Bazeled compile_commands.json entries.
976976
977-
Input: jsonproto output from aquery, pre-filtered to (Objective-)C(++) compile actions for a given build.
977+
Input: jsonproto output from aquery, pre-filtered to (Objective-)C(++) and CUDA compile actions for a given build.
978978
Yields: Corresponding entries for a compile_commands.json, with commas after each entry, describing all ways every file is being compiled.
979979
Also includes one entry per header, describing one way it is compiled (to work around https://github.com/clangd/clangd/issues/123).
980980

0 commit comments

Comments
 (0)