WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
237510
Add options to filter generate-compile-commands output
https://bugs.webkit.org/show_bug.cgi?id=237510
Summary
Add options to filter generate-compile-commands output
Brandon
Reported
2022-03-06 22:01:37 PST
Add options to filter generate-compile-commands output
Attachments
patch
(6.77 KB, patch)
2022-03-06 22:08 PST
,
Brandon
brandonstewart
: review?
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brandon
Comment 1
2022-03-06 22:08:07 PST
Created
attachment 453944
[details]
patch
Brandon
Comment 2
2022-03-06 22:18:12 PST
The generate-compile-commands generates data for all sources compiled (except third party), however, users may only care about a subset of the files. This allows users to output a more focused compile_commands.json with only the directories they care about. Passing no parameters will output all sources like before. How to use: generate-compile-commands WebKitBuild/Debug/ --exclude_bmalloc --exclude_jsc This will filter out the bmalloc and JavaScriptCore directories from compile_commands.json.
Alexey Proskuryakov
Comment 3
2022-03-07 09:00:21 PST
It's not really clear to me when one would what to exclude specific directories. I believe you that there is a use case, but it's hard to me to comment without understanding it. In the department on bike shed painting, I think that the names should use dashes, not underscores. Or alternatively, --exclude wtf,jsc,tools
Elliott Williams
Comment 4
2022-03-07 14:31:36 PST
I would love to not have a hard-coded list of projects in here. Can you do this while matching path or target names in a more generic way? My understanding of the problem is that we emit so much build metadata that clangd is sluggish, and the recommended solution is to skip merging compile commands from third-party sources. This feels like a reasonable default. Could we do automatically so that engineers don't have to know about these options? Also, I'm curious if our cmake-based ports have a similar problem with clangd, and if so, whether they've done anything to address it.
Radar WebKit Bug Importer
Comment 5
2022-03-13 23:02:15 PDT
<
rdar://problem/90230511
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug