aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/firefox/build.sh13
-rw-r--r--projects/firefox/mozconfig.address5
2 files changed, 17 insertions, 1 deletions
diff --git a/projects/firefox/build.sh b/projects/firefox/build.sh
index aebd619bd..8788e190e 100755
--- a/projects/firefox/build.sh
+++ b/projects/firefox/build.sh
@@ -42,8 +42,21 @@ FUZZ_TARGETS=(
export MOZ_OBJDIR=$WORK/obj-fuzz
export MOZCONFIG=$SRC/mozconfig.$SANITIZER
+# Without this, a host tool used during Rust part of the build will fail
+export ASAN_OPTIONS="detect_leaks=0"
+
# Install remaining dependencies.
export SHELL=/bin/bash
+
+# Firefox might not be buildable on the latest Rust Nightly, so we should try
+# to use the same version that we use in our CI.
+RUST_NIGHTLY_VERSION=$(sed -n 's/^.*--channel.*\(nightly-[0-9-]*\).*$/\1/p' \
+ $SRC/mozilla-central/taskcluster/ci/toolchain/rust.yml
+)
+
+rustup toolchain install ${RUST_NIGHTLY_VERSION}
+rustup default ${RUST_NIGHTLY_VERSION}-x86_64-unknown-linux-gnu
+
./mach --no-interactive bootstrap --application-choice browser
# Skip patches for now
diff --git a/projects/firefox/mozconfig.address b/projects/firefox/mozconfig.address
index c9eb33d0b..0bc2c36c4 100644
--- a/projects/firefox/mozconfig.address
+++ b/projects/firefox/mozconfig.address
@@ -1,4 +1,7 @@
. $SRC/mozconfig.coverage
ac_add_options --enable-address-sanitizer
-mk_add_options CFLAGS= CXXFLAGS=
+
+# Don't use standard CFLAGS/CXXFLAGS provided by oss-fuzz
+export CFLAGS=""
+export CXXFLAGS=""