The officially official Devuan Forum!

You are not logged in.

#1 2025-11-27 18:47:37

igorzwx
Member
Registered: 2024-05-06
Posts: 491  

Chasing the Fox (Caccia alla volpe)

So after the fox, after the fox
Off to the hunt with chains and locks
So after the fox, after the fox
Someone is always chasing after the fox

After the Fox (1966) _https://www.youtube.com/watch?v=MrQl0VsQYtw

📖 Manual: "We Can’t Yet Prove Firefox Is Resampling… But We’ll Keep Trying"

For the truly dedicated — those who believe their audio deserves better.

🔧 Step 0: Lock It Down
Before we begin, disable the PulseAudio backend - yes, even the rusty one:

  1. Open Firefox and type about:config  in the address bar

  2. Search: media.cubeb.backend

  3. Click +, set type to string, value to alsa

Now Firefox talks directly to ALSA - no middlemen.

✅ You’ve just sidestepped a surveillance-level audio framework.

🕵️ Step 1: The Smoking Gun
Firefox uses Speex Resampler under the hood - yes, that Speex.
It’s in the code: AudioConverter.cpp includes <speex/speex_resampler.h>.

_https://searchfox.org/firefox-main/source/dom/media/AudioConverter.cpp

#include "AudioConverter.h"

#include <speex/speex_resampler.h> 

But here’s the twist:

  • On macOS, cubeb logs:
    Input and output sample-rate match, target rate of 48000Hz

  • On Linux? Silence.
    Nothing. Nada. Zilch.

🚨 Suspicious?
Or is Mozilla simply not telling Linux users what it’s up to?

macOS Firefox logs:

➤ MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL /Applications/Firefox\ Developer\ Edition.app/Contents/MacOS/firefox 2>&1 https://youtu.be/uO6jfQ5tQHM | ggrep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware" | ggrep -v "hasVideo=0"
[Child 4501: Main Thread]: D/MediaDecoder MediaDecoder[11631e700] MetadataLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1
[Child 4501: Main Thread]: D/MediaDecoder MediaDecoder[116f37300] MetadataLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1
[Child 4501: Main Thread]: D/MediaDecoder MediaDecoder[116f37300] FirstFrameLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1
[Child 4501: MediaDecoderStateMachine #1]: I/cubeb CubebStreamInit output stream rate 48000
[Parent 4486: AudioIPC Server RPC]: E/cubeb mod.rs:3995: (0x183e31c00) Output hardware description: AudioStreamBasicDescription { mSampleRate: 96000.0, mFormatID: 1819304813, mFormatFlags: 9, mBytesPerPacket: 8, mFramesPerPacket: 1, mBytesPerFrame: 8, mChannelsPerFrame: 2, mBitsPerChannel: 32, mReserved: 0 }
[Parent 4486: AudioIPC Server RPC]: E/cubeb cubeb_resampler_internal.h:553:Input and output sample-rate match, target rate of 48000Hz

On macOS, Firefox appears to feign transparency and user-friendliness. But macOS isn’t quite Linux: applications ought to behave in a civilised manner.

Right. So Firefox has its own resampler, and cubeb has its own as well - meaning the audio could be quietly upsampled and downsampled like some sort of secret internal game of pass-the-parcel, and we’d never even see it in the logs.

Typical, really. Everything’s transparent and user-friendly - just not actually.

What's Actually Happening

  1. Resampling: Cubeb uses its Speex-based resampler (cubeb_resampler_internal.h:199–207).

  2. Stream initialisation: Once the target rate is determined, Cubeb sets up the stream at 48kHz (cubeb_resampler_internal.h:561–577).

  3. Passthrough mode: When input and output rates match, Cubeb uses a passthrough resampler that simply forwards buffers without conversion (cubeb_resampler_internal.h:548–556).

The resampler selection logic in cubeb_resampler_create_internal() confirms this:

// Check if rates match - if so, use passthrough  
if (((input_params && input_params->rate == target_rate) &&  
     (output_params && output_params->rate == target_rate)) ||  
    (input_params && !output_params && (input_params->rate == target_rate)) ||  
    (output_params && !input_params &&  
     (output_params->rate == target_rate))) {  
  LOG("Input and output sample-rate match, target rate of %dHz", target_rate);  
  return new passthrough_resampler<T>(...);  
}

When rates don’t match, it creates a cubeb_resampler_speex_one_way for conversion (cubeb_resampler_internal.h:187–203).

🔍 Step 2: The Bit Depth Conspiracy
Firefox converts everything to 32-bit float - internally.

But let’s be honest:

  • 20 years ago, fftrate used 64-bit float.

  • Today, serious audio tools use 128-bit float or more.

And what does Firefox do?

sample spec: float32le 2ch 48000Hz

🧠 32-bit float - the Stone Age of precision.
It works, but is it good enough?

This isn’t about whether it functions — it’s whether it respects the medium. Firefox settles for the lowest common denominator, even when the hardware and OS are ready to do better.

🧩 Step 3: Who’s Really Resampling?
You’ve set:

media.resampling.enabled   false

So Firefox should not resample.

Logs show:

MetadataLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1
FirstFrameLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1 
CubebStreamInit output stream rate 48000

🛠️ Final Command: Firefox logging together with fftrate logging

➤ MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL firefox 2>&1 https://youtu.be/uO6jfQ5tQHM | grep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware|Input|Output|Rates" | grep -v "hasVideo=0"
[Child 13197: Main Thread]: D/MediaDecoder MediaDecoder[7f6c62c17900] MetadataLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
[Child 13197: Main Thread]: D/MediaDecoder MediaDecoder[7f6c62c17900] FirstFrameLoaded, channels=2 rate=48000 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1
[Child 13197: MediaDecoderStateMachine #1]: I/cubeb CubebStreamInit output stream rate 48000
Input:  48000 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)

This reflects only the observable behaviour. The full pipeline? Still hidden. As usual.

The Mystery Audio Stream

Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764

The Short and Curious Tale
Right then, here's what's happening: Firefox, being a proper gentleman, politely taps your audio system on the shoulder to ask, "I say, what sample rate do you prefer?" This happens through Cubeb's alsa_get_preferred_sample_rate() function.

Firefox tries 44.1kHz first (a rather common rate, don't you know), but your dmix plugin, being a bit of a stickler for rules, insists on 48kHz. So ALSA’s resampler steps in like a proper butler, converting the stream—even though Firefox requested SND_PCM_NO_AUTO_RESAMPLE.

The "dummy = 0" in your logs? That's just ALSA's way of saying "This is a real device, gov'nor, not some test dummy."

Why This Isn't Your YouTube Video
This probing happens before any actual playback — it's merely Firefox checking what your audio system can handle. The actual YouTube stream will use whatever rate this probe determines (likely 48kHz in your case).

The Bottom Line
Perfectly normal behaviour, old chap! Just Firefox being thorough and your dmix plugin being particular. The resampling you see is ALSA doing its thing, completely separate from Cubeb's internal workings. Your hardware supporting 44.1kHz doesn't stop dmix from having its own ideas about proper audio rates.

Notes

  • This probe stream mechanism is used across all Cubeb backends for capability detection.

  • The format 's32_le' is 32-bit signed integer.

  • The "T: FFT" indicates ALSA's FFT-based resampling algorithm.

  • "J: 0.00%" shows minimal jitter — the conversion is working rather well indeed.

🧙♂️ Conclusion
We cannot prove Firefox is resampling — because it doesn’t log it.

But we know:

  • It uses Speex resampler.

  • It hides resampling logs on Linux.

So is it resampling?

🔎 We may never know.
But we’ll keep watching.

Citations

File: src/cubeb_alsa.c (L1228-1272)

static int
alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
{
  (void)ctx;
  int r, dir;
  snd_pcm_t * pcm;
  snd_pcm_hw_params_t * hw_params;

  snd_pcm_hw_params_alloca(&hw_params);

  /* get a pcm, disabling resampling, so we get a rate the
   * hardware/dmix/pulse/etc. supports. */
  r = WRAP(snd_pcm_open)(&pcm, CUBEB_ALSA_PCM_NAME, SND_PCM_STREAM_PLAYBACK,
                         SND_PCM_NO_AUTO_RESAMPLE);
  if (r < 0) {
    return CUBEB_ERROR;
  }

  r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
  if (r < 0) {
    WRAP(snd_pcm_close)(pcm);
    return CUBEB_ERROR;
  }

  r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
  if (r >= 0) {
    /* There is a default rate: use it. */
    WRAP(snd_pcm_close)(pcm);
    return CUBEB_OK;
  }

  /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */
  *rate = 44100;

  r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
  if (r < 0) {
    WRAP(snd_pcm_close)(pcm);
    return CUBEB_ERROR;
  }

  WRAP(snd_pcm_close)(pcm);

  return CUBEB_OK;
}

Offline

#2 Yesterday 21:05:13

igorzwx
Member
Registered: 2024-05-06
Posts: 491  

Re: Chasing the Fox (Caccia alla volpe)

To summare "secret knowledge":

Configuration Editor for Firefox
_https://support.mozilla.org/en-US/kb/about-config-editor-firefox

Firefox settings for better sound quality

about:config

media.resampling.enabled            false
media.webm.enabled                  false
media.mediasource.webm.enabled	   false  # it might be deprecated
media.cubeb.backend		   alsa   # if ALSA backend  is available
media.cubeb_latency_playback_ms		160 

NOTE: Firefox's default value (for all platforms):

media.cubeb_latency_playback_ms		100 

This is because Firefox is optimized for macOS, not for Linux with ALSA.

media.encoder.webm.enabled       false   # Disable WebM recording
media.mediasource.vp9.enabled    false   # Disable WebM in MSE 

Media Source Extensions (MSE)
_https://en.wikipedia.org/wiki/Media_Source_Extensions

Verification:

1. about:support  - search for "Audio Backend"

2. MOZ_LOG="MediaDecoder:4,cubeb:5"

On both Linux and macOS, you need Firefox logs to detect unwanted resampling, or to verify that Firefox does not resample.

Linux logs:

MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL firefox 2>&1 https://www.youtube.com/watch?v=X0lwWwJJfXk | grep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware|Input|Output|Rates" | grep -vE "hasVideo=0|hasAudio=0" 
$ MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL firefox 2>&1 https://www.youtube.com/watch?v=X0lwWwJJfXk | grep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware|Input|Output|Rates" | grep -vE "hasVideo=0|hasAudio=0" 
[Child 25647: Main Thread]: D/MediaDecoder MediaDecoder[7f2a416c2e00] MetadataLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1
[Child 25647: Main Thread]: D/MediaDecoder MediaDecoder[7f2a416c2e00] FirstFrameLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1
[Child 25647: Main Thread]: D/MediaDecoder MediaDecoder[7f2a2c7d7d00] MetadataLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1
[Child 25647: Main Thread]: D/MediaDecoder MediaDecoder[7f2a2c7d7d00] FirstFrameLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1
[Child 25647: MediaDecoderStateMachine #1]: I/cubeb CubebStreamInit output stream rate 44100
[fftrate ALSA plugin log: 44100 --> 48000 Hz]
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis) 

macOS Firefox logs:

about:support
Name 	Firefox
Version 	151.0b3
Audio Backend	audiounit-rust
Max Channels	2
Preferred Sample Rate	44100

about:config
media.resampling.enabled     false
media.webm.enabled           false   # Disable WebM playback 

[grep = GNU grep]

MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL /Applications/FirefoIf you notice a significant difference in Firefox audio logs between Linux and macOS, file a bug.x\ Developer\ Edition.app/Contents/MacOS/firefox 2>&1 https://youtu.be/qeUcGD4rRRc | ggrep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware" | ggrep -vE "hasVideo=0|hasAudio=0"
➤ MOZ_LOG="MediaDecoder:4,cubeb:5" stdbuf -oL /Applications/Firefox\ Developer\ Edition.app/Contents/MacOS/firefox 2>&1 https://youtu.be/qeUcGD4rRRc | ggrep  --line-buffered -E "MetadataLoaded.*rate=|FirstFrameLoaded.*rate=|CubebStreamInit output stream rate|target rate|Output hardware" | ggrep -vE "hasVideo=0|hasAudio=0"
[Child 2125: Main Thread]: D/MediaDecoder MediaDecoder[133ffa100] MetadataLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1
[Child 2125: Main Thread]: D/MediaDecoder MediaDecoder[133ffa100] FirstFrameLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1
[Child 2125: MediaDecoderStateMachine #1]: I/cubeb CubebStreamInit output stream rate 44100
[Parent 2109: AudioIPC Server RPC]: E/cubeb mod.rs:4077: (0x14d932800) Output hardware description: AudioStreamBasicDescription { mSampleRate: 44100.0, mFormatID: 1819304813, mFormatFlags: 9, mBytesPerPacket: 8, mFramesPerPacket: 1, mBytesPerFrame: 8, mChannelsPerFrame: 2, mBitsPerChannel: 32, mReserved: 0 }
[Parent 2109: AudioIPC Server RPC]: E/cubeb cubeb_resampler_internal.h:555:Input and output sample-rate match, target rate of 44100Hz

Explanation:

Input Source Media Rate: 44100 Hz (from YouTube AAC metadata)

[Child 2125: Main Thread]: D/MediaDecoder MediaDecoder[133ffa100] MetadataLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1  
[Child 2125: Main Thread]: D/MediaDecoder MediaDecoder[133ffa100] FirstFrameLoaded, channels=2 rate=44100 hasAudio=1 hasVideo=1 mPlayState=PLAY_STATE_LOADING transportSeekable=1 

Output Stream Rate: 44100 Hz (Cubeb initialization)

[Child 2125: MediaDecoderStateMachine #1]: I/cubeb CubebStreamInit output stream rate 44100 

Conclusion: Since input source rate (44100 Hz) = output stream rate (44100 Hz), no resampling is occurring in Firefox's audio pipeline.

NOTE: To prevent software resampling by the macOS software mixer, set the sample rate to 44100Hz using the Audio MIDI Setup utility:

open -a Audio\ MIDI\ Setup.app 

Reference media files:
Robert de Visée Prélude et Allemande, Jonas Nordberg, theorbo
_https://youtu.be/qeUcGD4rRRc
The 10 Questions Everyone Asks About My 6-Foot, 14-String Lute [Theorbo]
_https://www.youtube.com/watch?v=X0lwWwJJfXk
The coolest LUTE I've ever seen!
_https://www.youtube.com/watch?v=4YmELV5p6ZY

Building Firefox On Linux
_https://firefox-source-docs.mozilla.org/setup/linux_build.html
_https://firefox-source-docs.mozilla.org/build/buildsystem/mozconfigs.html

A secret mozconfig to disable pulse-rust backend

$ cat .mozconfig
# Default: sourcedir/browser/config/mozconfig
. $topsrcdir/browser/config/mozconfig  
mk_add_options MOZ_MAKE_FLAGS="-j$(expr $(nproc) + 2)" 
mk_add_options MOZ_OBJDIR="$(dirname $topsrcdir)"/build_dir_ALSA  
mk_add_options MOZ_APP_DISPLAYNAME="Firefox ALSA"  
mk_add_options MOZ_SIMPLE_PACKAGE_NAME=firefox-alsa  
ac_add_options --with-app-basename="Firefox ALSA"  
ac_add_options --with-app-name=firefox-alsa  
ac_add_options --prefix=/usr  
ac_add_options --without-sysroot  # classified
ac_add_options --enable-audio-backends=alsa 
export LDFLAGS="-Wl,--no-keep-memory" 
cd firefox
git pull
./mach clobber
./mach configure 
./mach build -v --priority normal
./mach run --version
./mach run
DESTDIR="$(dirname $(pwd))"/debdir_ALSA ./mach install 

NOTE: The documented configure options can be listed with ./configure --help, but some may not work depending on undocumented options. To understand which options are actually functional, you need to study the source code.

$ ./configure --help

Usage: configure.py [options]

Options: [defaults in brackets after descriptions]
  Help options:
    --help                    Print this message

  Options from build/moz.configure/init.configure:
    --enable-application      Application to build. Same as --enable-project
    --enable-project          Project to build [browser]
    --enable-artifact-builds  Download and use prebuilt binary artifacts
    --host                    Define the system type performing the build
    --target                  Define the system type where the resulting executables will be used
    --with-version-file-path  Specify a custom path to app version files instead of auto-detecting
    --as-milestone={early-beta,late-beta,release}
                              Build with another milestone configuration (e.g., as release)
    --enable-update-channel   Select application update channel [default]
    --with-app-basename       Typically stays consistent for multiple branded versions of a given application (e.g. Aurora and Firefox both use "Firefox"), but may vary for full rebrandings (e.g. Iceweasel). Used for application.ini's "Name" field, which controls profile location in the absence of a "Profile" field (see below), and various system integration hooks (Unix remoting, Windows MessageWindow name, etc
    --prefix=PREFIX           Install files using PREFIX as root directory [/usr/local]
    --includedir=DIR          C header files in DIR [/usr/include]
    --libdir=DIR              Object code libraries in DIR [/usr/lib]

  Options from moz.configure:
    --enable-artifact-build-symbols[={full}]
                              Download symbols when artifact builds are enabled
    --disable-compile-environment
                              Disable compiler/library checks
    --disable-tests           Do not build test libraries & programs
    --enable-debug            Enable building with developer debug info (using the given compiler flags)
    --with-debug-label        Debug DEBUG_<value> for each comma-separated value given
    --enable-release          Build with more conservative, release engineering-oriented options. This may slow down builds.
    --disable-unified-build   Enable building modules in non unified context
    --enable-valgrind         Enable Valgrind integration hooks
    --enable-build-backend={Clangd,ChromeMap,CompileDB,CppEclipse,FasterMake,FasterMake+RecursiveMake,RecursiveMake,StaticAnalysis,TestManifest,VisualStudio},...
                              Deprecated
    --build-backends={Clangd,ChromeMap,CompileDB,CppEclipse,FasterMake,FasterMake+RecursiveMake,RecursiveMake,StaticAnalysis,TestManifest,VisualStudio},...
                              Build backends to generate [RecursiveMake,FasterMake,Clangd]
    --enable-gtest-in-build   Enable building the gtest libxul during the build
    --enable-ui-locale        Select the user interface locale (default: en-US) [en-US]
    --enable-strip            Enable stripping of libs & executables
    --disable-install-strip   Enable stripping of libs & executables when packaging
    --with-system-zlib        Use system libz

  Options from build/moz.configure/bootstrap.configure:
    --disable-bootstrap       Disable bootstrap or update of toolchains

  Options from build/moz.configure/toolchain.configure:
    --disable-optimize        Disable optimizations via compiler flags
    --with-toolchain-prefix   Prefix for the target toolchain
    --with-compiler-wrapper   Enable compiling with wrappers such as distcc and ccache
    --with-ccache             Enable compiling with ccache
    --enable-gold             Deprecated
    --enable-linker           Select the linker {bfd, gold, ld64, lld, lld-*, mold}
    --disable-debug-symbols   Disable debug symbols using the given compiler flags
    --enable-address-sanitizer
                              Enable Address Sanitizer
    --enable-memory-sanitizer
                              Enable Memory Sanitizer
    --enable-thread-sanitizer
                              Enable Thread Sanitizer
    --enable-undefined-sanitizer
                              Enable UndefinedBehavior Sanitizer
    --enable-signed-overflow-sanitizer
                              Enable UndefinedBehavior Sanitizer (Signed Integer Overflow Parts)
    --enable-unsigned-overflow-sanitizer
                              Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts)
    --enable-hardening        Enables security hardening compiler options
    --enable-stl-hardening    Enable C++ STL hardening
    --enable-frame-pointers   Enable frame pointers
    --enable-coverage         Enable code coverage
    --enable-clang-plugin     Enable building with the Clang plugin (gecko specific static analyzers)
    --enable-fuzzing          Enable fuzzing support
    --enable-snapshot-fuzzing
                              Enable experimental snapshot fuzzing support
    --enable-cpp-rtti         Enable C++ RTTI
    --enable-path-remapping[={c,rust},...]
                              Enable remapping source and object paths in compiled outputs
    --enable-dtrace           Build with dtrace support

  Options from build/moz.configure/memory.configure:
    --enable-jemalloc         Replace memory allocator with jemalloc

  Options from build/moz.configure/warnings.configure:
    --enable-warnings-as-errors
                              Enable treating warnings as errors

  Options from build/moz.configure/flags.configure:
    --enable-icf              Enable Identical Code Folding
    --disable-new-pass-manager
                              Use the legacy LLVM pass manager in clang builds

  Options from build/moz.configure/lto-pgo.configure:
    --enable-profile-generate[={cross}]
                              Build a PGO instrumented binary
    --enable-profile-use[={cross}]
                              Use a generated profile during the build
    --with-pgo-profile-path   Path to the directory with unmerged profile data to use during the build, or to a merged profdata file
    --with-pgo-jarlog         Use the provided jarlog file when packaging during a profile-use build
    --enable-lto[={full,thin,cross},...]
                              Enable LTO

  Options from browser/moz.configure:
    --disable-browser-newtab-as-addon
                              Disable bundling newtab as a built-in addon

  Options from toolkit/moz.configure:
    --with-distribution-id    Set distribution-specific id [org.mozilla]
    --disable-gecko-profiler  Disable the Gecko profiler
    --enable-dmd              Enable Dark Matter Detector (heap profiler). Also enables jemalloc, replace-malloc and profiling
    --enable-audio-backends={aaudio,alsa,audiounit,jack,opensl,oss,pulseaudio,sndio,sunaudio,wasapi},...
                              Enable various cubeb backends [pulseaudio]
    --enable-alsa             Enable ALSA audio backend
    --enable-jack             Enable JACK audio backend
    --enable-pulseaudio       Enable PulseAudio audio backend
    --enable-sndio            Enable sndio audio backend
    --with-l10n-base          Path to l10n repositories
    --enable-default-toolkit={cairo-gtk3,cairo-gtk3-wayland,cairo-gtk3-x11-wayland,cairo-gtk3-wayland-only,cairo-gtk3-x11-only}
                              Select default toolkit [cairo-gtk3]
    --with-system-pipewire    Use system PipeWire
    --with-system-gbm         Use system gbm
    --with-system-libdrm      Use system libdrm
    --with-gl-provider        Set GL provider backend type
    --disable-wmf             Disable support for Windows Media Foundation
    --disable-ffmpeg          Disable FFmpeg for fragmented H264/AAC decoding
    --disable-av1             Disable av1 video support
    --with-system-av1         Use system av1 (located with pkg-config)
    --disable-jxl             Disable jxl image support
    --disable-real-time-tracing
                              Disable tracing of real-time audio callbacks
    --enable-openmax          Enable OpenMAX IL for video/audio decoding
    --enable-chrome-format={omni,jar,flat}
                              Select FORMAT of chrome files during packaging [omni]
    --enable-minify[={properties,js},...]
                              Select types of files to minify during packaging [properties]
    --with-mozilla-api-keyfile
                              Use the secret key contained in the given keyfile for Mozilla API requests
    --with-google-location-service-api-keyfile
                              Use the secret key contained in the given keyfile for Google Location Service API requests
    --with-google-safebrowsing-api-keyfile
                              Use the secret key contained in the given keyfile for Google Safebrowsing API requests
    --with-bing-api-keyfile   Use the client id and secret key contained in the given keyfile for Bing API requests
    --with-adjust-sdk-keyfile
                              Use the secret key contained in the given keyfile for Adjust SDK requests
    --with-leanplum-sdk-keyfile
                              Use the client id and secret key contained in the given keyfile for Leanplum SDK requests
    --with-pocket-api-keyfile
                              Use the secret key contained in the given keyfile for Pocket API requests
    --enable-webrender-debugger
                              Build the websocket debug server in WebRender
    --enable-app-system-headers
                              Use additional system headers defined in $MOZ_BUILD_APP/app-system-headers.mozbuild
    --disable-printing        Disable printing support
    --disable-synth-speechd   Disable speech-dispatcher support
    --disable-webspeech       Disable support for HTML Speech API
    --disable-webspeechtestbackend
                              Disable support for HTML Speech API Test Backend
    --disable-skia-pdf        Disable Skia PDF
    --with-system-webp        Use system libwebp (located with pkgconfig)
    --disable-webdriver       Disable support for WebDriver remote protocols
    --disable-geckodriver     Do not build geckodriver
    --enable-webrtc           Enable support for WebRTC
    --enable-raw              Enable support for RAW media
    --enable-address-sanitizer-reporter
                              Enable Address Sanitizer Reporter Extension
    --enable-proxy-bypass-protection
                              Prevent suspected or confirmed proxy bypasses
    --disable-proxy-direct-failover
                              Disable direct failover for system requests
    --disable-accessibility   Disable accessibility support
    --with-unsigned-addon-scopes={app,system},...
                              Addon scopes where signature is not required
    --allow-addon-sideload    Addon sideloading is allowed
    --disable-extensions-webidl-bindings
                              Disable building experimental WebExtensions WebIDL bindings
    --enable-launcher-process
                              Enable launcher process by default
    --enable-bundled-fonts    Enable support for bundled fonts on desktop platforms
    --enable-reflow-perf      Enable reflow performance tracing
    --enable-layout-debugger  Enable layout debugger
    --with-system-libvpx      Use system libvpx (located with pkgconfig)
    --with-system-jpeg        Use system libjpeg (installed at given prefix)
    --with-system-png         Use system libpng
    --with-wasm-sandboxed-libraries={graphite,ogg,hunspell,expat,woff2,soundtouch},...
                              Enable wasm sandboxing for the selected libraries
    --enable-disk-remnant-avoidance
                              Prevent persistence of auxiliary files on application close
    --enable-forkserver       Enable fork server
    --disable-backgroundtasks
                              Disable running in background task mode
    --enable-mobile-optimize  Enable mobile optimizations
    --disable-pref-extensions
                              Disable pref extensions such as autoconfig
    --disable-startupcache    Disable startup cache
    --enable-official-branding
                              Enable Official mozilla.org Branding. Do not distribute builds with --enable-official-branding unless you have permission to use trademarks per http://www.mozilla.org/foundation/trademarks/
    --with-branding=DIR       Use branding from directory DIR
    --with-crashreporter-url  Set an alternative crashreporter url [https://crash-reports.mozilla.com/]
    --with-system-libevent    Use system libevent
    --enable-crashreporter    Enable crash reporting
    --disable-dbus            Disable dbus support
    --enable-debug-js-modules
                              Enable debug mode for frontend JS libraries
    --enable-dump-painting    Enable paint debugging
    --enable-libproxy         Enable libproxy support
    --enable-logrefcnt        Enable logging of refcounts
    --disable-negotiateauth   Disable GSS-API negotiation
    --disable-parental-controls
                              Do not build parental controls
    --enable-sandbox          Enable sandboxing support
    --disable-system-extension-dirs
                              Disable searching system- and account-global directories for extensions of any kind; use only profile-specific extension directories
    --with-system-pixman      Use system pixman (located with pkgconfig)
    --disable-universalchardet
                              Disable universal encoding detection
    --disable-zipwriter       Disable zipwriter component
    --with-user-appdir        Set user-specific appdir [.mozilla]
    --enable-uniffi-fixtures  Enable UniFFI Fixtures/Examples
    --disable-system-policies
                              Disable reading policies from Windows registry, macOS's file system attributes, and /etc/firefox
    --disable-legacy-profile-creation
                              Disable the creation a legacy profile, to be used by old versions of Firefox, when no profiles exist
    --with-onnx-runtime       Location of the ONNX Runtime

  Options from js/moz.configure:
    --with-app-name           Used for e.g. the binary program file name. If not set, defaults to a lowercase form of MOZ_APP_BASENAME
    --enable-js-shell         Build the JS shell
    --enable-decorators       Enable experimental JS Decorators support
    --disable-explicit-resource-management
                              Disable explicit resource management
    --enable-portable-baseline-interp
                              Enable the portable baseline interpreter
    --enable-portable-baseline-interp-force
                              Enable forcing use of the portable baseline interpreter
    --enable-aot-ics          Enable including ahead-of-time corpus of CacheIR IC bodies
    --enable-aot-ics-force    Enable forcing the AOT ICs option on without additional configuration
    --enable-aot-ics-enforce  Enable enforcing that only AOT IC corpus is used, crashing otherwise (TEST ONLY)
    --enable-jit              Enable use of the JITs
    --enable-ion              Deprecated
    --enable-simulator={arm,arm64,mips64,loong64,riscv64}
                              Enable a JIT code simulator for the specified architecture
    --enable-instruments      Enable instruments remote profiling
    --enable-callgrind        Enable callgrind profiling
    --disable-profiling       Do not set compile flags necessary for using sampling profilers (e.g. shark, perf)
    --disable-execution-tracing
                              Do not set compile flags necessary for running the JS execution tracer
    --enable-vtune            Enable VTune profiling
    --enable-gc-probes        Turn on probes for allocation and finalization
    --enable-gczeal           Enable zealous GCing
    --enable-oom-breakpoint   Enable a breakpoint function for artificial OOMs
    --disable-jitdump         Disable perf jitdump integration
    --enable-jitspew          Enable the Jit spew and IONFLAGS environment variable
    --enable-masm-verbose     Enable MacroAssembler verbosity of generated code
    --disable-ctypes          Disable js-ctypes
    --enable-rust-simd        Enable explicit SIMD in Rust code
    --disable-spidermonkey-telemetry
                              Disable performance telemetry for SpiderMonkey (e.g. compile and run times)
    --enable-wasm-codegen-debug
                              Enable debugging for wasm codegen
    --wasm-no-experimental    Force disable all wasm experimental features for testing
    --enable-wasm-jspi        Enable WebAssembly JS PI
    --disable-shared-memory   Disable JS/WebAssembly shared memory and atomics
    --enable-wasm-simd        Enable WebAssembly SIMD
    --enable-wasm-avx         Enable AVX support for WebAssembly SIMD
    --enable-wasm-relaxed-simd
                              Enable WebAssembly relaxed SIMD
    --enable-wasm-moz-intgemm
                              Enable WebAssembly intgemm private intrinsics
    --disable-wasm-memory-control
                              Disable WebAssembly fine-grained memory control instructions
    --disable-wasm-branch-hinting
                              Disable WebAssembly Branch hints
    --with-sixgill            Enable static checking of code using sixgill
    --with-jitreport-granularity[={0,1,2,3}]
                              Default granularity at which to report JIT code to external tools (0 - no info, 1 - code ranges for while functions only, 2 - per-line information, 3 - per-op information) [3]
    --with-system-icu         Use system ICU
    --without-intl-api        Disable ECMAScript Internationalization API
    --disable-icu4x           Disable using ICU4X
    --disable-wasm-type-reflections
                              Disable type reflection in WASM JS-API
    --disable-wasm-resizable-arraybuffer
                              Disable resizable ArrayBuffer in WASM

  Options from build/moz.configure/nspr.configure:
    --with-system-nspr        Use system NSPR

  Options from build/moz.configure/rust.configure:
    --enable-rust-tests       Enable building and running of Rust tests during `make check`
    --enable-rust-debug       Build Rust code with debug assertions turned on
    --disable-cargo-incremental
                              Disable incremental rust compilation

  Options from build/moz.configure/bindgen.configure:
    --with-libclang-path      Absolute path to a directory containing Clang/LLVM libraries for bindgen (version 3.9.x or above)
    --with-clang-path         Absolute path to a Clang binary for bindgen (version 3.9.x or above)

  Options from js/ffi.configure:
    --with-system-ffi         Use system libffi (located with pkgconfig)

  Options from build/moz.configure/node.configure:
    --disable-nodejs          Require Node.js to build

  Options from build/moz.configure/nss.configure:
    --with-system-nss         Use system NSS

  Options from build/moz.configure/update-programs.configure:
    --disable-updater         Disable building the updater
    --enable-unverified-updates
                              Enable application update without verifying MAR or updater binary signatures
    --enable-default-browser-agent
                              Enable building the default browser agent

Environment variables:
  Options from build/moz.configure/init.configure:
    MOZ_AUTOMATION            Enable options for automated builds
    MOZCONFIG                 Mozconfig location
    MOZILLABUILD              Path to Mozilla Build (Windows-only)
    CONFIG_SHELL              Path to a POSIX shell
    GIT                       Path to the git program
    MOZILLA_OFFICIAL          Build an official release
    MOZBUILD_STATE_PATH       Path to a persistent state directory for the build system and related tools

  Options from moz.configure:
    MOZ_BUILD_HOOK            Path to the moz.build file that will be executed as if it were appended to every moz.build in the tree
    MOZ_COPY_PDBS             For builds that do not support symbols in the normal fashion, generate and copy them into the resulting build archive
    MOZ_PGO                   Build with profile guided optimizations
    READELF                   Path to the readelf program
    OBJCOPY                   Path to the objcopy program
    AWK                       Path to the awk program
    MAKE                      Path to GNU make
    GMAKE                     Path to the gmake program
    WATCHMAN                  Path to the watchman program
    XARGS                     Path to the xargs program
    MKFSHFS                   Path to the mkfshfs program
    HFS_TOOL                  Path to the hfs_tool program
    STRIP_FLAGS               Flags for the strip command
    STRIP                     Path to the strip program
    USE_LIBZ_RS               Use libz-rs-sys instead of zlib

  Options from build/moz.configure/toolchain.configure:
    HOST_CPPFLAGS             Extra flags for Preprocessing host sources []
    HOST_CFLAGS               Extra flags for compiling host C sources []
    HOST_CXXFLAGS             Extra flags for compiling host C++ sources []
    HOST_LDFLAGS              Extra flags for linking host object files []
    CPPFLAGS                  Extra flags for preprocessing sources []
    CFLAGS                    Extra flags for compiling C sources []
    CXXFLAGS                  Extra flags for compiling C++ sources []
    ASFLAGS                   Extra flags for assembling sources []
    LDFLAGS                   Extra flags for linking object files []
    LIBS                      Extra libraries for linking object files []
    MOZ_OPTIMIZE_FLAGS        Extra optimization flags
    MOZ_HAZARD                Build for the GC rooting hazard analysis
    CCACHE_PREFIX             Compiler prefix to use when using ccache
    RUSTC_WRAPPER             Wrap rust compilation with given tool
    SCCACHE_VERBOSE_STATS     Print verbose sccache stats after build
    CC                        Path to the target C compiler
    LD                        Deprecated
    CXX                       Path to the target C++ compiler
    HOST_CC                   Path to the host C compiler
    HOST_LD                   Deprecated
    HOST_CXX                  Path to the host C++ compiler
    MOZ_DEBUG_FLAGS           Debug compiler flags
    AS                        Path to the assembler
    LLVM_OBJDUMP              Path to llvm-objdump
    AR                        Path to the ar program
    HOST_AR                   Path to the host_ar program

  Options from build/moz.configure/pkg.configure:
    PKG_CONFIG                Path to the pkg_config program

  Options from build/moz.configure/lto-pgo.configure:
    LLVM_PROFDATA             Path to the llvm_profdata program
    MOZ_LD64_KNOWN_GOOD       Indicate that ld64 is free of symbol aliasing bugs

  Options from toolkit/moz.configure:
    MOZ_STUB_INSTALLER        Produce a stub installer
    MOZ_SOURCE_REPO           Project source repository
    MOZ_SOURCE_CHANGESET      Source changeset
    MOZ_INCLUDE_SOURCE_INFO   Include build repository informations
    USE_FC_FREETYPE           Force-enable the use of fontconfig freetype
    MOZ_TELEMETRY_REPORTING   Enable telemetry reporting
    TAR                       Path to the tar program
    UNZIP                     Path to the unzip program
    MIDL_FLAGS                Extra flags to pass to MIDL
    MOZ_REQUIRE_SIGNING       Enforce that add-ons are signed by the trusted root
    DUMP_SYMS                 Path to the dump_syms program
    MOZ_BRANDING_DIRECTORY    Path to the directory used for branding resources
    MOZ_OFFICIAL_BRANDING_DIRECTORY
                              Path to the directory used for official branding resources
    MOZ_APP_DISPLAYNAME       Branded application name
    MOZ_DEV_EDITION           Whether this a dev edition build
    MOZ_MACBUNDLE_ID          ID of the associated mac bundle
    MOZ_APP_REMOTINGNAME      Used for the internal program name, which affects profile name and remoting. If not set, defaults to MOZ_APP_NAME if the update channel is release, and MOZ_APP_NAME-MOZ_UPDATE_CHANNEL otherwise
    MOZ_WINCONSOLE            Whether we can create a console window
    MOZ_CRASHREPORTER_MOCK    Mock the crashreporter to test native GUIs
    MOZ_SIMPLE_PACKAGE_NAME   Package name override
    MOZ_PKG_SPECIAL           Name of special moz flavor
    MOZ_PACKAGE_JSSHELL       Whether the installer bundles the JS shell

  Options from build/moz.configure/rust.configure:
    RUSTC                     Path to the rust compiler
    CARGO                     Path to the Cargo package manager
    RUSTDOC                   Path to the rustdoc program
    RUSTDOCFLAGS              Extra options for the rustdoc program
    RUSTFLAGS                 Rust compiler flags
    RUSTC_OPT_LEVEL           Rust compiler optimization level (-C opt-level=%s) [2]

  Options from build/moz.configure/bindgen.configure:
    CBINDGEN                  Path to cbindgen
    RUSTFMT                   Path to the rustfmt program
    BINDGEN_CFLAGS            Options bindgen should pass to the C/C++ parser

  Options from build/moz.configure/node.configure:
    NODEJS                    Path to nodejs

  Options from build/moz.configure/update-programs.configure:
    MAR_CHANNEL_ID            MAR channel identifier
    ACCEPTED_MAR_CHANNEL_IDS  Accepted MAR channel identifiers

Last edited by igorzwx (Yesterday 21:07:12)

Offline

Board footer