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

compile_commands.json #12

Closed
bhack opened this issue Jul 21, 2020 · 2 comments
Closed

compile_commands.json #12

bhack opened this issue Jul 21, 2020 · 2 comments

Comments

@bhack
Copy link
Contributor

bhack commented Jul 21, 2020

Migrating from https://github.com/tensorflow/addons/issues/1894
It could be nice if we could generate/distribute compile_commands.json to better interact with some IDE and our c++ code.

I.e. In Bazel and also in Vscode the the official Bazel team vscode plugin we don't have in tree support to generate compile_commands:
bazelbuild/bazel#258
bazel-contrib/vscode-bazel#179

I've tried some quite popular community workaround like:
https://github.com/grailbio/bazel-compilation-database

But the problem is that we are using --action_env for build when we generate our .bazelrc with python configure.py and so these arguments not supported in other command like e.g. bazel query bazelbuild/bazel#10226.
This is going to invalidate the official bazel vscode plugin that need to execute query command but also the bazel-compilation-database workaround cause we have problem to retrieve our env variable.

@bhack bhack closed this as completed Jul 21, 2020
@JsBlueCat
Copy link

generate

how we genrerate compile_commands.json?

@ganler
Copy link

ganler commented Sep 28, 2022

@bhack I am curious if you can use https://github.com/hedronvision/bazel-compile-commands-extractor to generate compile_commands.json for tensorflow? It cannot work with TensorFlow due to errors like "Analysis of target '//tensorflow/tools/toolchains/win_1803/py36:py3_runtime' failed
ERROR: Analysis of target '//tensorflow/tools/toolchains/win_1803/py36:py3_runtime' failed; build aborted:"

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