Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

wslpath-compdb

Converts all Windows paths in a compile_commands.json to WSL compatible ones.

Prerequisites

This script must be run on WSL, which must have the wslpath utility.

The JSON database must be in "arguments" format, not "command" (see example).

Usage

A compile_commands.json can be generated using compiledb, which can be installed as follows:

pip install git+https://github.com/shyun3/compiledb@support-cl-clang-cl

This fork and branch contains fixes for some issues in the main repo, see #120 and #124.

To generate the database, the following can be used when in the directory of a makefile:

make -Bnwk all | compiledb -f -o /path/to/compile_commands.json

This will create a compile_commands.json at the specified path.

Convert the JSON database using the script:

python3 wslpath_compdb.py -i /path/to/compile_commands.json

Note how the in-place option is used to modify the file.

About

Converts all Windows paths in a compile_commands.json to WSL compatible ones

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages