| 1 |
.. _mozinfo: |
| 2 |
|
| 3 |
======= |
| 4 |
mozinfo |
| 5 |
======= |
| 6 |
|
| 7 |
``mozinfo`` is a solution for representing a subset of build |
| 8 |
configuration and run-time data. |
| 9 |
|
| 10 |
``mozinfo`` data is typically accessed through a ``mozinfo.json`` file |
| 11 |
which is written to the :term:`object directory` during build |
| 12 |
configuration. The code for writing this file lives in |
| 13 |
:py:mod:`mozbuild.mozinfo`. |
| 14 |
|
| 15 |
``mozinfo.json`` is an object/dictionary of simple string values. |
| 16 |
|
| 17 |
The attributes in ``mozinfo.json`` are used for many purposes. One use |
| 18 |
is to filter tests for applicability to the current build. For more on |
| 19 |
this, see :ref:`test_manifests`. |
| 20 |
|
| 21 |
.. _mozinfo_attributes: |
| 22 |
|
| 23 |
mozinfo.json Attributes |
| 24 |
================================= |
| 25 |
|
| 26 |
``mozinfo`` currently records the following attributes. |
| 27 |
|
| 28 |
appname |
| 29 |
The application being built. |
| 30 |
|
| 31 |
Value comes from ``MOZ_APP_NAME`` from ``config.status``. |
| 32 |
|
| 33 |
Optional. |
| 34 |
|
| 35 |
asan |
| 36 |
Whether address sanitization is enabled. |
| 37 |
|
| 38 |
Values are ``true`` and ``false``. |
| 39 |
|
| 40 |
Always defined. |
| 41 |
|
| 42 |
bin_suffix |
| 43 |
The file suffix for binaries produced with this build. |
| 44 |
|
| 45 |
Values may be an empty string, as not all platforms have a binary |
| 46 |
suffix. |
| 47 |
|
| 48 |
Always defined. |
| 49 |
|
| 50 |
bits |
| 51 |
The number of bits in the CPU this build targets. |
| 52 |
|
| 53 |
Values are typically ``32`` or ``64``. |
| 54 |
|
| 55 |
Universal Mac builds do not have this key defined. |
| 56 |
|
| 57 |
Unknown processor architectures (see ``processor`` below) may not have |
| 58 |
this key defined. |
| 59 |
|
| 60 |
Optional. |
| 61 |
|
| 62 |
buildapp |
| 63 |
The path to the XUL application being built. |
| 64 |
|
| 65 |
For desktop Firefox, this is ``browser``. For Fennec, it's |
| 66 |
``mobile/android``. |
| 67 |
|
| 68 |
crashreporter |
| 69 |
Whether the crash reporter is enabled for this build. |
| 70 |
|
| 71 |
Values are ``true`` and ``false``. |
| 72 |
|
| 73 |
Always defined. |
| 74 |
|
| 75 |
datareporting |
| 76 |
Whether data reporting (MOZ_DATA_REPORTING) is enabled for this build. |
| 77 |
|
| 78 |
Values are ``true`` and ``false``. |
| 79 |
|
| 80 |
Always defined. |
| 81 |
|
| 82 |
debug |
| 83 |
Whether this is a debug build. |
| 84 |
|
| 85 |
Values are ``true`` and ``false``. |
| 86 |
|
| 87 |
Always defined. |
| 88 |
|
| 89 |
devedition |
| 90 |
Whether this is a devedition build. |
| 91 |
|
| 92 |
Values are ``true`` and ``false``. |
| 93 |
|
| 94 |
Always defined. |
| 95 |
|
| 96 |
healthreport |
| 97 |
Whether the Health Report feature is enabled. |
| 98 |
|
| 99 |
Values are ``true`` and ``false``. |
| 100 |
|
| 101 |
Always defined. |
| 102 |
|
| 103 |
mozconfig |
| 104 |
The path of the :ref:`mozconfig file <mozconfig>` used to produce this build. |
| 105 |
|
| 106 |
Optional. |
| 107 |
|
| 108 |
nightly_build |
| 109 |
Whether this is a nightly build. |
| 110 |
|
| 111 |
Values are ``true`` and ``false``. |
| 112 |
|
| 113 |
Always defined. |
| 114 |
|
| 115 |
os |
| 116 |
The operating system the build is produced for. Values for tier-1 |
| 117 |
supported platforms are ``linux``, ``win``, ``mac``, and |
| 118 |
``android``. For other platforms, the value is the lowercase version |
| 119 |
of the ``OS_TARGET`` variable from ``config.status``. |
| 120 |
|
| 121 |
Always defined. |
| 122 |
|
| 123 |
processor |
| 124 |
Information about the processor architecture this build targets. |
| 125 |
|
| 126 |
Values come from ``TARGET_CPU``, however some massaging may be |
| 127 |
performed. |
| 128 |
|
| 129 |
If the build is a universal build on Mac (it targets both 32-bit and |
| 130 |
64-bit), the value is ``universal-x86-x86_64``. |
| 131 |
|
| 132 |
If the value starts with ``arm``, the value is ``arm``. |
| 133 |
|
| 134 |
If the value starts with a string of the form ``i[3-9]86]``, the |
| 135 |
value is ``x86``. |
| 136 |
|
| 137 |
Always defined. |
| 138 |
|
| 139 |
release_or_beta |
| 140 |
Whether this is a release or beta build. |
| 141 |
|
| 142 |
Values are ``true`` and ``false``. |
| 143 |
|
| 144 |
Always defined. |
| 145 |
|
| 146 |
stylo |
| 147 |
Whether the Stylo styling system is being used. |
| 148 |
|
| 149 |
Values are ``true`` and ``false``. |
| 150 |
|
| 151 |
Always defined. |
| 152 |
|
| 153 |
tests_enabled |
| 154 |
Whether tests are enabled for this build. |
| 155 |
|
| 156 |
Values are ``true`` and ``false``. |
| 157 |
|
| 158 |
Always defined. |
| 159 |
|
| 160 |
toolkit |
| 161 |
The widget toolkit in case. The value comes from the |
| 162 |
``MOZ_WIDGET_TOOLKIT`` ``config.status`` variable. |
| 163 |
|
| 164 |
Always defined. |
| 165 |
|
| 166 |
topsrcdir |
| 167 |
The path to the source directory the build came from. |
| 168 |
|
| 169 |
Always defined. |
| 170 |
|
| 171 |
topobjdir |
| 172 |
The path to the obj directory the build came from. |
| 173 |
|
| 174 |
Always defined. |
| 175 |
|
| 176 |
webrender |
| 177 |
Whether or not WebRender is enabled as the Gecko compositor. |
| 178 |
|
| 179 |
Values are ``true`` and ``false``. |
| 180 |
|
| 181 |
Always defined. |