no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / docs / setup / building_with_debug_symbols.rst
blob596bd9010b232076ec399c5feb53083c43a184dd
1 Building with Debug Symbols
2 ===========================
4 +--------------------------------------------------------------------+
5 | This page is an import from MDN and the contents might be outdated |
6 +--------------------------------------------------------------------+
8 By default, a release build of Firefox will not generate debug symbols
9 suitable for debugging or post-processing into the
10 :ref:`breakpad <Crash reporting>` symbol format. Use the
11 following :ref:`mozconfig <Configuring Build Options>` settings
12 to do a build with symbols:
16 Building Firefox with symbols
17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 There is a single configure option to enable building with symbols on
20 all platforms. This is enabled by default so unless you have explicitly
21 disabled it your build you should include symbols.
25    ac_add_options --enable-debug-symbols
27 This can optionally take an argument for the type of symbols that need
28 to be produced (like "-g3"). By default it uses "-g" on Linux and MacOS.
29 This value takes precedence over the flags set in ``MOZ_DEBUG_FLAGS``
31 Note that this will override the values provided for ``CFLAGS`` and
32 ``CXXFLAGS``.
35 Breakpad symbol files
36 ~~~~~~~~~~~~~~~~~~~~~
38 After the build is complete, run the following command to generate an
39 archive of :ref:`Breakpad <Crash reporting>` symbol files:
41 .. code:: bash
43    mach buildsymbols
45 Treeherder uses an additional ``uploadsymbols`` target to upload
46 symbols to a socorro server. See
47 https://searchfox.org/mozilla-central/source/toolkit/crashreporter/tools/upload_symbols.py
48 for more information about the environment variables used by this
49 target.
52 ``make package``
53 ~~~~~~~~~~~~~~~~
55 If you use ``make package`` to package your build, symbols will be
56 stripped. If you want to keep the symbols in the patches, you need to
57 add this to your mozconfig:
59 .. code::
61     ac_add_options --disable-install-strip