diff --git a/projects/firefox/Dockerfile b/projects/firefox/Dockerfile index 515e9df26..e5343c9ee 100644 --- a/projects/firefox/Dockerfile +++ b/projects/firefox/Dockerfile @@ -24,11 +24,16 @@ RUN apt-get update && \ gawk \ libstdc++6 \ m4 \ - python + python python3-pip python3-setuptools python3-wheel cmake git nasm +RUN pip3 install meson ninja # This wrapper of cargo seems to interfere with our build system. RUN rm -f /usr/local/bin/cargo +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $SRC/rustbuild.sh && \ + chmod +x $SRC/rustbuild.sh && \ + $SRC/rustbuild.sh -y + RUN git clone --depth 1 https://github.com/mozilla/gecko-dev mozilla-central RUN git clone --depth 1 https://github.com/mozillasecurity/fuzzdata WORKDIR mozilla-central diff --git a/projects/firefox/build.sh b/projects/firefox/build.sh index 8788e190e..71f7f6b12 100755 --- a/projects/firefox/build.sh +++ b/projects/firefox/build.sh @@ -15,6 +15,14 @@ # ################################################################################ +if [ "$SANITIZER" = "coverage" ] +then + touch $OUT/exit + exit 0 +fi + +source $HOME/.cargo/env + # Case-sensitive names of internal Firefox fuzzing targets. Edit to add more. FUZZ_TARGETS=( # WebRTC @@ -48,14 +56,7 @@ 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 +rustup default nightly ./mach --no-interactive bootstrap --application-choice browser diff --git a/projects/firefox/mozconfig.coverage b/projects/firefox/mozconfig.coverage index a99a37728..3e6101e0f 100644 --- a/projects/firefox/mozconfig.coverage +++ b/projects/firefox/mozconfig.coverage @@ -3,7 +3,6 @@ ac_add_options --disable-debug ac_add_options --disable-elf-hack ac_add_options --disable-jemalloc ac_add_options --disable-crashreporter -ac_add_options --disable-av1 ac_add_options --enable-fuzzing ac_add_options --enable-optimize=-O1 ac_add_options --enable-debug-symbols=-gline-tables-only