Open
Bug 1487070
Opened 6 years ago
Updated 2 years ago
Try using -fplugin=path to load clang plugin
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(Not tracked)
NEW
People
(Reporter: ted, Unassigned)
Details
glandium noted that sccache currently doesn't do anything special with clang plugins, which means that if we change the plugin it effectively won't get run on sources where we get cache hits. I filed an sccache issue on this: https://github.com/mozilla/sccache/issues/288 Unfortunately right now we load the clang plugin in our build using a pile of `-Xclang` options, which will be a PITA to parse in sccache: https://dxr.mozilla.org/mozilla-central/rev/9c13dbdf4cc9baf98881b4e2374363587fb017b7/build/autoconf/clang-plugin.m4#160 The clang docs do mention that you can use `-fplugin=path`, which might be a newer invention: https://clang.llvm.org/docs/ClangPlugins.html#using-the-clang-command-line We should try using that instead, since it should be much easier to support in sccache.
Reporter | ||
Comment 1•6 years ago
|
||
`-fplugin=path` was added 3 years ago, FWIW: https://github.com/llvm-mirror/clang/commit/9dcbcab85ccca71ccdfa924b6946a0475d93b636
Reporter | ||
Comment 2•6 years ago
|
||
We also pass `-Xclang -add-plugin -Xclang moz-check`, but the docs say we can write the plugin so that it gets added automatically: https://clang.llvm.org/docs/ClangPlugins.html#using-the-clang-command-line
Comment 3•6 years ago
|
||
(In reply to Ted Mielczarek [:ted] [:ted.mielczarek] from comment #2) > We also pass `-Xclang -add-plugin -Xclang moz-check`, but the docs say we > can write the plugin so that it gets added automatically: > https://clang.llvm.org/docs/ClangPlugins.html#using-the-clang-command-line Except we have one plugin that does several things, that we select with -add-plugin. We have moz-check and mozsearch-index. And the latter takes plugin arguments, which I don't think can be handled when registering the plugin "automatically".
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•