Closed
Bug 1332689
(st-an-3.9)
Opened 8 years ago
Closed 5 years ago
Remove clang <3.9 specific code from the clang-plugin
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox72 fixed)
RESOLVED
FIXED
mozilla72
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: nika, Assigned: emilio)
References
(Depends on 1 open bug)
Details
Attachments
(2 files)
According to :froydnj, Stylo is going to require clang >= 3.9 for running bindgen. If we have this requirement to build our tree anyway, we can increase the minimum supported clang version of our clang-plugin. This would allow us to remove code like: http://searchfox.org/mozilla-central/rev/30fcf167af036aeddf322de44a2fadd370acfd2f/build/clang-plugin/plugin.h#29-52 and simplify the build setup to not check for things like HAVE_NEW_ASTMATCHER_NAMES.
Comment 1•8 years ago
|
||
Does this mean people won't be able to build the tree using Apple clang any more? That seems bad. Are we planning to run bindgen as part of the build for everyone?
Flags: needinfo?(nfroyd)
Comment hidden (typo) |
Comment 3•8 years ago
|
||
The way things currently work is that bindgen can use a completely separate compiler/clang installation than the main CC/CXX. Once stylo lands and is enabled by default, bindgen will be required, so developers will need a clang-$VERSION installation separate from XCode's clang. (The idea here is that people shouldn't have to check in generated Rust to the tree; bindgen should be able to generate all the files we need during the build process.) The plan is to have that clang-$VERSION package installed via |mach bootstrap|, and ideally that package will be installed from the same binaries we use in automation.
Sound reasonable?
Comment 4•8 years ago
|
||
I'm assuming that we couldn't use Apple's clang with bindgen even if we wanted to, since I suspect the necessary libraries/headers aren't really provided?
Flags: needinfo?(nfroyd)
Comment 5•8 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #3)
> The way things currently work is that bindgen can use a completely separate
> compiler/clang installation than the main CC/CXX. Once stylo lands and is
> enabled by default, bindgen will be required, so developers will need a
> clang-$VERSION installation separate from XCode's clang. (The idea here is
> that people shouldn't have to check in generated Rust to the tree; bindgen
> should be able to generate all the files we need during the build process.)
> The plan is to have that clang-$VERSION package installed via |mach
> bootstrap|, and ideally that package will be installed from the same
> binaries we use in automation.
>
> Sound reasonable?
Yes it sounds awesome. FWIW I'm essentially writing the code that does the last part in bug 1328454. :-)
(In reply to Nathan Froyd [:froydnj] from comment #4)
> I'm assuming that we couldn't use Apple's clang with bindgen even if we
> wanted to, since I suspect the necessary libraries/headers aren't really
> provided?
Yes that's correct. (Similarly you can't use it if you want to enable static analysis.)
Comment 6•8 years ago
|
||
(In reply to Michael Layzell [:mystor] from comment #2)
> (In reply to :Ehsan Akhgari from comment #1)
> > Does this mean people won't be able to build the tree using Apple clang any
> > more? That seems bad. Are we planning to run bindgen as part of the build
> > for everyone?
>
> https://hg.mozilla.org/integration/mozilla-inbound/rev/210b8d21be06#l1.21 is
> the new code for stylo IIRC (currently only on inbound).
Ugh, it sucks that this wasn't caught at review time. This code isn't even using the same environment variable name. Sigh. :(
Comment 7•8 years ago
|
||
FWIW I'm bringing up the static analysis builders slowly to clang 3.9.
Updated•7 years ago
|
Product: Core → Firefox Build System
Reporter | ||
Comment 8•7 years ago
|
||
andi, you might be interested in working on this :-) - Could be some nice cleanup!
Flags: needinfo?(bpostelnicu)
Updated•5 years ago
|
Assignee: ehsan → nobody
Assignee | ||
Comment 9•5 years ago
|
||
I accidentally wrote patches for this when diagnosing some sccache-dist issue.
Assignee: nobody → emilio
Assignee | ||
Comment 10•5 years ago
|
||
This is just drive-by, but it confused me. We require at least clang 4 to build
nowadays.
Assignee | ||
Comment 11•5 years ago
|
||
We require 4.0 to build since bug 1394825.
Comment 12•5 years ago
|
||
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88ad4b97fe78
Remove clang 3.8 compat code. r=andi
Comment 13•5 years ago
|
||
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98470c1a958c
Remove clang 3.9 compat code for the clang-plugin. r=andi
Comment 14•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/88ad4b97fe78
https://hg.mozilla.org/mozilla-central/rev/98470c1a958c
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox72:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Updated•5 years ago
|
Flags: needinfo?(bpostelnicu)
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•