Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for other compiler names #107

Open
amacara1 opened this issue Oct 29, 2020 · 3 comments
Open

Support for other compiler names #107

amacara1 opened this issue Oct 29, 2020 · 3 comments

Comments

@amacara1
Copy link

amacara1 commented Oct 29, 2020

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.

@amacara1 amacara1 changed the title Support for other compilers (name and number) Support for other compiler names Oct 29, 2020
@gr4yj3d1
Copy link

I would like to add emscriptens emcc and em++ here

@Klaim
Copy link

Klaim commented Jun 1, 2021

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++?

@gr4yj3d1
Copy link

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_regexin parser.py.
In my case r"^.*-?[gc]\+\+-?[0-9.]*$|^.*-?clang\+\+-?[0-9.]*$|^em\+\+$" did the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants