[LU-16961] Clang plugin build system integration Created: 13/Jul/23 Updated: 09/Jan/24 Resolved: 31/Aug/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Tim Day | Assignee: | Tim Day |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
Clang has a plugin system. Compiler extension can be created by making a shared library and loading it via the "-fplugin". This allows for custom warnings and static analyzers.
In the past, Lustre has used custom compiler plugins in the past - although they haven't been maintained in a while: https://wiki.whamcloud.com/pages/viewpage.action?pageId=18645101
I've developed a plugin which detects functions which ought to be static. Since Clang has an easier time reasoning about static functions, the plugin has the side effect of finding some cases of dead code. This ticket tracks implementing build system support for that plugin (and potential future/past plugins). |
| Comments |
| Comment by Gerrit Updater [ 13/Jul/23 ] |
|
"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51659 |
| Comment by Gerrit Updater [ 31/Aug/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51659/ |
| Comment by Peter Jones [ 31/Aug/23 ] |
|
Landed for 2.16 |
| Comment by Gerrit Updater [ 09/Jan/24 ] |
|
Wrong LU |