-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature Request] Allow 'ninja -t compdb' accept one target #1544
Comments
CI fails due to gcc 4.8.4 didn't enable c++11, any suggestions? |
Ninja isn't using C++11 yet. I would use |
@jhasse Hi, is this feature supported now? I think it's very useful expecially in large system. |
The issue is still open and the linked PR is not merged…so I'd say "no, not yet". |
I just wanted to add a use case that we have for such a feature: we use CMake (with ninja) and also have some static code analysis tools that work off of a compilation database file. However, now we are taking in more external projects, which still get compiled (doing a lot of bare metal embedded stuff, so we have different compile/linker options depending on the targets, making it difficult to maintain a set of precompiled binaries for all external dependencies/projects). Currently this means configuring the SCA tools to exclude sources from these external projects. Is there anything I can do to hopefully help move this request (and the linked PR) forward? |
Yes: I've left some comments in the PR which weren't addressed. You could create a new PR based on the existing one which addresses those or first add some comments if you think my concerns are justified. |
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Fixes ninja-build#1544 Co-authored-by: Linkun Chen <[email protected]> Co-authored-by: csmoe <[email protected]> Co-authored-by: James Widman <[email protected]>
Currently, compdb iterates all edges. I am proposing an option to accept one target name, and only iterate edges it depends on.
e.g.
ninja -t compdb -a //foo:main cc cxx
New help message will be:
usage: ninja -t compdb [options] [target] [rules]
options:
-x expand @rspfile style response file invocations
-a accept one target name, and only dump compilation database for this target
The text was updated successfully, but these errors were encountered: