Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16961

Clang plugin build system integration

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 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).

      Attachments

        Issue Links

          Activity

            [LU-16961] Clang plugin build system integration
            gerrit Gerrit Updater added a comment - - edited

            "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53626
            Subject: LU-16961 llite: fix new clang error in statahead.c
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: c2630dfc05c866024bc0f76ec64faff3558cb54f

            Wrong LU

            gerrit Gerrit Updater added a comment - - edited "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53626 Subject: LU-16961 llite: fix new clang error in statahead.c Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c2630dfc05c866024bc0f76ec64faff3558cb54f Wrong LU
            pjones Peter Jones added a comment -

            Landed for 2.16

            pjones Peter Jones added a comment - Landed for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51659/
            Subject: LU-16961 clang: plugins and build system integration
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d684885098c40fee2951feb410bec739717ac9bc

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51659/ Subject: LU-16961 clang: plugins and build system integration Project: fs/lustre-release Branch: master Current Patch Set: Commit: d684885098c40fee2951feb410bec739717ac9bc

            "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51659
            Subject: LU-16961 clang: plugins and build system integration
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: e88f731ed9e485dd01eda249cd9b89b118aa082c

            gerrit Gerrit Updater added a comment - "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51659 Subject: LU-16961 clang: plugins and build system integration Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e88f731ed9e485dd01eda249cd9b89b118aa082c

            People

              timday Tim Day
              timday Tim Day
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: