ReleaseEngineering/How To/Clang update

From MozillaWiki
Jump to: navigation, search

Intro

Clang packages use tooltool to deploy itself run time. The binaries are hosted on relengweb1.dmz.scl3.mozilla.com (use your LDAP account) and accessible from http://runtime-binaries.pvt.build.mozilla.org/tooltool/.

Clang build is made by http://hg.mozilla.org/mozilla-central/file/tip/build/unix/build-clang/build-clang.py script. You may want to use this script to discover the recent used version of clang.

Compilation

MacOS X builders have everything installed to build clang.

Linux64 (Centos 6.2) needs the following packages installed:

yum install make gcc gcc-c++ mercurial subversion patch \
 http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/gcc473_0moz1-4.7.3-0moz1.x86_64.rpm \
 http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/mozilla-python27-2.7.3-1.el6.x86_64.rpm

Linux32 (Centos 6.2) needs the following packages installed:

yum install make gcc gcc-c++ mercurial subversion patch \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/gcc473_0moz1-4.7.3-0moz1.i686.rpm \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/mozilla-python27-2.7.3-1.el6.i686.rpm

Alternatively you can use vagrant with the following vagrant VMs:

Passwords for root and vagrant users are "vagrant". You can create your vagrant VMs similar to this (in 64bit or 32bit directory):

vagrant up
# ignore timeout warnings
vagrant ssh
# use "vagrant" as a password

Note: The current vagrant image doesn't have the gcc 4.7 and python 2.7 packages installed, you need to install them first using yum (see above).

You also need to install the argparse package. In order to do that, run the following commands:

sudo yum install python-setuptools
sudo easy_install argparse

To build clang clone mozilla-central and run the build script:

hg clone https://hg.mozilla.org/mozilla-central
cd mozilla-central/build/unix/build-clang
# adjust revision in build-clang.py if needed
time PATH=/tools/python27/bin:$PATH /tools/python27/bin/python2.7 build-clang.py -c clang-trunk.json
# go and drink something

Once the build is finished you can find 2 not tracked files (hg st) in the current directory. clang.manifest should be attached to the bug and $SHA512 should be uploaded to the tooltool server (see below).

How to add a new version

See How To Upload To Tooltool

See Also