Open amacara1 opened 4 years ago
I would like to add emscriptens emcc
and em++
here
Ditto.
I'm using Emscripten and various clang verions in a project targeting iOS, WASM and desktop and using build2
. As pointed in that build2
issue, there is a simple command to invoke compiledb
to generate a compile_commands.json
for working, for example, with Visual Studio Code's intellisense.
However it doesnt work with Emscripten (the generated file doesn't contain include paths nor does it recognize emcc
and em++
).
My project have a bunch of source files specific to WASM so just generating the compile_commands.json
file for other platform doesn't cover all cases I would like to work with. (though it's an ok workaround most of the time).
Support for these compiler names would help, I think it wouldn't be too hard because emcc/em++
are basically a layer over clang/clang++
?
I'm not that familiar with the internals of compildb, maybe someone else can better comment on this. I think it might just be as easy as extending cc_compile_regex
and cpp_compile_regex
in parser.py.
In my case r"^.*-?[gc]\+\+-?[0-9.]*$|^.*-?clang\+\+-?[0-9.]*$|^em\+\+$"
did the trick.
compilerdb seems to miss TI C compiler names like: cl6x and armcl. Would be great to extend cc_compile_regex from parser.py with these.