Closed Bug 672210 Opened 13 years ago Closed 12 years ago

Build Firefox using clang

Categories

(Release Engineering :: General, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: espindola, Unassigned)

References

Details

(Keywords: sec-want, Whiteboard: [project][mozharness][sg:want])

We should do this at the very least for OS X as it is switching away from gcc. It should be good to build on Linux too as it is a nice developer tool on itself and other tools (like the new dxr) can be built on top of it.
(In reply to comment #0)
> We should do this at the very least for OS X as it is switching away from gcc.
> It should be good to build on Linux too as it is a nice developer tool on
> itself and other tools (like the new dxr) can be built on top of it.

Let me rephrase this.  We *definitely* want this on both OS X and Linux, as DXR will run on Linux, and we don't want our developers to break DXR.
Perhaps a good first step would be to do daily builds on OS X.
Not sure whether this is best handled as a project (a la valgrind), as a mozharness scripts, or something else...?
OS: Linux → Mac OS X
Priority: -- → P3
Hardware: x86_64 → x86
Summary: Set up build bots that use clang → Set up nightly builds that use clang
Whiteboard: [project][mozharness]
Doing debug builds blocks on reducing the stack usage or switching the debug builds to use optimizations.

Is it possible to enable only the nightly builds with clang? The version we have on the bots should be good for it and would let this bug progress in parallel.
Ehsan suggested that it might be easier for rel eng to get a dbg/opt build with no tests instead of a opt only build first. If that is the case, lets please do it.

In summary, this bug is about getting *one* automated clang build going as soon as possible.
Once we have address sanitizer running, we could also have a clang+asan build on top of this to run our tests under asan.
Whiteboard: [project][mozharness] → [project][mozharness][sg:want]
would it be possible to install the clang toolchain to all the linux slaves?  I believe it is a directory structure of tools that we install and update periodically as versions of clang are updated.  

My understanding is we need to do:
* obtain clang binaries (https://developer.mozilla.org/en/Building_Firefox_with_Address_Sanitizer#LLVM.2FClang)
* edit mozconfig to use clang instead of gcc
* build

To make this work, we could have a puppet script handle the installation of the tools.  If we were to hook this up to tbpl, then we would need to have a different build type 'linux-clang' which could be a new platform in the buildbotconfigs and tbpl.  

What seems logical is to stick with try server until we have green builds and tests then move to m-c.
> What seems logical is to stick with try server until we have green builds
> and tests then move to m-c.

For the switch we will be using the old but working process of requesting releng to push to all bots. For ideas on something more flexible, take a look at bug 683975
Summary: Set up nightly builds that use clang → Build Firefox using clang
We have switched the OS X builds to clang, we can have more specific bugs for any other builds (linux, asan) that we want.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.