... | ... | @@ -42,16 +42,14 @@ Some source code files are generated during build. |
|
|
|
|
|
Build GHC in the context defined by `ghc.nix` and `shell.nix`, e.g.
|
|
|
```bash
|
|
|
nix-shell -p bear --command 'bear hadrian/build.sh -c -j12 --docs=none --flavour=Devel2'
|
|
|
nix-shell --command 'bear hadrian/build.sh -c -j12 --docs=none --flavour=Devel2'
|
|
|
```
|
|
|
|
|
|
**N.B.**: Probably we do not need a full build to use the IDE tooling, because source files are generated pretty early. However, you likely - sooner or later - want to have a fully built GHC: To run tests, do manual testing, etc..
|
|
|
|
|
|
### What is `bear`?
|
|
|
|
|
|
`ccls` needs a [`compile_commands.json`](https://clang.llvm.org/docs/JSONCompilationDatabase.html) (*JSON Compilcation Database*) file as configuration. This file is mostly a mapping of `*.c` filenames to C compiler arguments.
|
|
|
|
|
|
`compile_commands.json` is generated by [`bear`](https://github.com/rizsotto/Bear), a tool that intercepts all calls to the C compiler. That means, you have to trigger a full rebuild with `bear`, even if you already got a fully compiled GHC project.
|
|
|
`compile_commands.json` is generated by [`bear`](https://github.com/rizsotto/Bear), a tool that intercepts all calls to the C compiler. That means, you have to trigger a full (re-)build with `bear`, even if you already got a fully compiled GHC project.
|
|
|
|
|
|
# Start and configure VSCode
|
|
|
## Start VSCode in a ghc.nix/nix-shell environment
|
... | ... | |