Generate compilation database using clang++
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
https://sarcasm.github.io/notes/dev/compilation-database.html#clang
Replace the shell script for generating the compilation database (gen_ccjs.sh) with the generator from clang++.
Specifically, use the usually clang++ compilation command, but add a -MJ flag passing along a temporary json file. Finally add [ ] to the generated file. For example:
clang++ -std=c++17 -MJ temp.json main.cc -o main
sed -e '1s/^/[\n/' -e '$s/,$/\n]/' temp.json > compile_commands.json
rm temp.json
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with gen_ccjs.sh and read the linked clang compilation-database documentation, then inspect how the current script is invoked. Replace its generation flow with the described clang++ -MJ approach, producing compile_commands.json and removing the temporary file; verify the resulting JSON format and existing build workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, shell
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100