ReleaseEngineering/How To/Clang update: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 6: Line 6:


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.
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/gcc472_0moz1-4.7.2-0moz1.x86_64.rpm \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/mozilla-python27-2.7.3-0.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/gcc472_0moz1-4.7.2-0moz1.i686.rpm \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/mozilla-python27-2.7.3-0.el6.src.rpm
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 /tools/python27/bin/python2.7 build-clang.py # go and drink something
Once the build is finished you can find 2 not tracked files (hg st) in the current directory. <tt>clang.manifest</tt> should be attached to the bug and $SHA512 should be uploaded to the tooltool server (see below).


= How to add a new version =
= How to add a new version =

Revision as of 02:04, 16 May 2013

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/gcc472_0moz1-4.7.2-0moz1.x86_64.rpm \
 http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/x86_64/mozilla-python27-2.7.3-0.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/gcc472_0moz1-4.7.2-0moz1.i686.rpm \
  http://puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public/CentOS/6/i386/mozilla-python27-2.7.3-0.el6.src.rpm

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 /tools/python27/bin/python2.7 build-clang.py # 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

  • Manifests should be attached to the bug by a developer
  • ssh to relengweb1.dmz.scl3.mozilla.com
  • Download files
mkdir ~/tooltool
cd ~/tooltool
rm -i *
# get latest setup.sh if its manifest was changed
wget https://hg.mozilla.org/mozilla-central/raw-file/default/build/unix/build-clang/setup.sh
# download new clang packages
wget http://people.mozilla.org/~user/clang-linux.tar.bz2
wget http://people.mozilla.org/~user/clang-linux64.tar.bz2
wget http://people.mozilla.org/~user/clang-osx.tar.bz2
# Fix permissions
chmod 644 *
  • Copy files to the tooltool directory. Use the "digest" field from the generated manifests as target file name:
for f in clang-*.tar.bz2; do
  ls -l $f
  sudo cp -vi $f /var/www/html/runtime-binaries/tooltool/sha512/$(sha512sum $f | cut -f1 -d " ")
done
  • repeat the same step for setup.sh if needed

See Also