Skip to content

Commit

Permalink
fix compile_flags.txt to include correct paths
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Jul 25, 2024
1 parent b5b2329 commit 1ac76b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compile_flags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
-xc++
-nostdinc
-Ibazel-bin/external/dawn/include
-Ibazel-bin/external/ada-url/_virtual_includes/ada-url/
-Ibazek-bin/external/simdutf/virtual_includes/simdutf/
-Ibazel-bin/external/com_cloudflare_lol_html/_virtual_includes/lolhtml
-Ibazel-bin/external/perfetto/
-Iexternal/perfetto-sdk/sdk/
Expand Down
17 changes: 17 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Development

## Compile flags

In order to fix Intellisense issues in VSCode and several other IDEs related to missing header files in C++ dependencies such as `ada-url` and `simdutf`, you need to generate a `compile_commands.json` document. Follow the steps below to fix the issue:

1. Install `gen-compile-commands`

```sh
cargo install --git https://github.com/mikea/gen-compile-commands`
```

2. Generate `compile_commands.json`

```sh
gen-compile-commands --root . --compile-flags compile_flags.txt --out compile_commands.json --src-dir ./src
```

0 comments on commit 1ac76b3

Please # to comment.