aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorChristian Holler (:decoder) <choller@mozilla.com>2021-03-20 16:34:44 +0100
committerGitHub <noreply@github.com>2021-03-20 08:34:44 -0700
commitde52eac2b06b9cf91efd526a43dd910105d0b14f (patch)
treebeba8e0df9ce8df366be98391e9c5b25220c79d6 /projects
parent849965d539350c20e7cda05f7045f8da74e6f9ee (diff)
downloadoss-fuzz-de52eac2b06b9cf91efd526a43dd910105d0b14f.tar.gz
[firefox] Fix various build problems (#5456)
* [firefox] Suppress LSan errors during build * [firefox] Properly ignore CFLAGS/CXXFLAGS * [firefox] Use the same Rust Nightly version as in Mozilla CI
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=""