Bug 1175359 - Enable rust in linux64 automation builds. r=mshal
authorRalph Giles <giles@mozilla.com>
Tue, 03 Nov 2015 14:57:43 -0800
changeset 308912 8674e97c395307e1e878acab383632cbaef62ac2
parent 308911 17a33fbe0c031193d1ed1ab7b07959a21ac18ce1
child 308913 b53875f2fbb680d615dfc9dc1f5459161029a852
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1175359
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1175359 - Enable rust in linux64 automation builds. r=mshal Write a mozconfig.rust fragment which makes the rust toolchain provided by tooltool available for linux builds, similar to what we do for MacOS X. Include this in linux64 mozconfigs to enable rust for official nightly builds of that target. These aren't used outside of automation builds, so including rust there will verify code on check-in without requiring developers to install rust. We must whitelist the mozconfig fragment to pass the consistency check since we're not ready to let this feature ride the trains to beta and release. The tooltool reference is to a custom build of rustc 1.4 with --enable-rpath to avoid having to add the rustc lib directory to LD_LIBRARY_PATH which somehow conflicts with the gtk3 build we also install through tooltool. It is also built with --enable-llvm-static-stdcpp on a rust-buildbot dist docker image (centos:5 + script updates) to avoid issues with GLIBCXX and GLIBC symbol versions.
browser/config/mozconfigs/linux64/debug
browser/config/mozconfigs/linux64/nightly
browser/config/mozconfigs/whitelist
browser/config/tooltool-manifests/linux64/releng.manifest
build/unix/mozconfig.rust
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -13,10 +13,11 @@ export MOZILLA_OFFICIAL=1
 # Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
 ac_add_options --enable-warnings-as-errors
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
+. "$topsrcdir/build/unix/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/nightly
@@ -5,10 +5,11 @@ ac_add_options --enable-verify-mar
 
 # This will overwrite the default of stripping everything and keep the symbol table.
 # This is useful for profiling and debugging and only increases the package size
 # by 2 MBs.
 STRIP_FLAGS="--strip-debug"
 
 ac_add_options --with-branding=browser/branding/nightly
 
+. "$topsrcdir/build/unix/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/whitelist
+++ b/browser/config/mozconfigs/whitelist
@@ -35,16 +35,17 @@ whitelist['nightly']['linux32'] += [
 
 whitelist['nightly']['linux64'] += [
     'export MOZILLA_OFFICIAL=1',
     'export MOZ_TELEMETRY_REPORTING=1',
     "mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
     'STRIP_FLAGS="--strip-debug"',
     'ac_add_options --with-ccache=/usr/bin/ccache',
     '. "$topsrcdir/build/mozconfig.cache"',
+    '. "$topsrcdir/build/unix/mozconfig.rust"',
 ]
 
 whitelist['nightly']['macosx-universal'] += [
     'if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then',
     'ac_add_options --with-macbundlename-prefix=Firefox',
     'fi',
     'mk_add_options MOZ_MAKE_FLAGS="-j12"',
     'ac_add_options --with-ccache',
--- a/browser/config/tooltool-manifests/linux64/releng.manifest
+++ b/browser/config/tooltool-manifests/linux64/releng.manifest
@@ -14,10 +14,17 @@
 "unpack": true
 },
 {
 "size": 167175,
 "digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
 "algorithm": "sha512",
 "filename": "sccache.tar.bz2",
 "unpack": true
+},
+{
+"size": 73029932,
+"digest": "ef1818acf065838dcb72554e521f9fd7098f0a3690cb6a3106d7bf18f46c342bfdd5a2b7d86e92ee3ddb9e478380343e58ecf8fd242807b8881a2d53fbec5ab3",
+"algorithm": "sha512",
+"filename": "rustc.tar.xz",
+"unpack": true
 }
 ]
new file mode 100644
--- /dev/null
+++ b/build/unix/mozconfig.rust
@@ -0,0 +1,9 @@
+# Options to enable rust in automation builds.
+
+# Tell configure to use the tooltool rustc.
+# Assume this is compiled with --enable-rpath so we don't
+# have to set LD_LIBRARY_PATH.
+RUSTC="$topsrcdir/rustc/bin/rustc"
+
+# Enable rust in the build.
+ac_add_options --enable-rust