Skip to content
Snippets Groups Projects
Commit f5b95abf authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1801738 - Use --enable-project instead of --enable-application....

Bug 1801738 - Use --enable-project instead of --enable-application. r=firefox-build-system-reviewers,geckoview-reviewers,calu,ahochheiden

--enable-application is the historic flag, and --enable-project was
added to handle the non-application things we build, while encompassing
the meaning of --enable-application. --enable-project has been preferred
for a while and we should reflect that more consistently in mozconfigs,
documentation, etc.

Differential Revision: https://phabricator.services.mozilla.com/D162625
parent 9c90edb7
No related branches found
No related tags found
No related merge requests found
Showing
with 45 additions and 42 deletions
......@@ -6,4 +6,4 @@
# . $topsrcdir/browser/config/mozconfig
# to the top of your mozconfig file.
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
# Use at least -O1 for optimization to avoid stack space
# exhaustions caused by Clang function inlining.
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
ac_add_options --enable-debug
ac_add_options --enable-optimize="-O1"
......
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2"
......
......@@ -18,7 +18,7 @@ including options not usable from the command-line, may appear in
Using a ``mozconfig`` configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The choice of which Mozilla application to build and other configuration
The choice of which Mozilla project to build and other configuration
options can be configured in a ``mozconfig`` file. (It is possible to
manually call ``configure`` with command-line options, but this is not
recommended). The ``mozconfig`` file should be in your source directory
......@@ -34,7 +34,7 @@ If your mozconfig isn't in your source directory, you can also use the
``MOZCONFIG`` environment variable to specify the path to your
``mozconfig``. The path you specify **must** be an **absolute** path or
else ``client.mk`` will not find it. This is useful if you choose to
have multiple ``mozconfig`` files for different applications or
have multiple ``mozconfig`` files for different projects or
configurations (see below for a full example). Note that in the
``export`` example below the filename was not ``mozconfig``. Regardless
of the name of the actual file you use, we refer to this file as the
......@@ -60,7 +60,7 @@ Setting the ``mozconfig`` path:
- Options prefixed with ``mk_add_options`` are passed to
``client.mk``. The most important of these is ``MOZ_OBJDIR``, which
controls where your application gets built (also known as the object
controls where your project gets built (also known as the object
directory).
- Options prefixed with ``ac_add_options`` are passed to ``configure``,
and affect the build process.
......@@ -70,7 +70,7 @@ Building with an objdir
~~~~~~~~~~~~~~~~~~~~~~~
This means that the source code and object files are not intermingled in
your directory system and you can build multiple applications (e.g.,
your directory system and you can build multiple projects (e.g.,
Firefox and Thunderbird) from the same source tree. If you do not
specify a ``MOZ_OBJDIR``, it will be automatically set to
``@TOPSRCDIR@/obj-@CONFIG_GUESS@``.
......@@ -148,18 +148,18 @@ number of cores on your system.
If your machine is overheating, you might want to try a lower value.
Choose an application
~~~~~~~~~~~~~~~~~~~~~
Choose a project
~~~~~~~~~~~~~~~~
The ``--enable-application=application`` flag is used to select an
application to build. Firefox is the default.
The ``--enable-project=project`` flag is used to select a project to
build. Firefox is the default.
Choose one of the following options to add to your ``mozconfig`` file:
Browser (Firefox)
.. code::
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
.. note::
......@@ -168,24 +168,24 @@ Browser (Firefox)
Mail (Thunderbird)
.. code::
ac_add_options --enable-application=comm/mail
ac_add_options --enable-project=comm/mail
Mozilla Suite (SeaMonkey)
.. code::
ac_add_options --enable-application=suite
ac_add_options --enable-project=suite
Calendar (Lightning Extension, uses Thunderbird)
.. code::
ac_add_options --enable-application=comm/mail
ac_add_options --enable-project=comm/mail
ac_add_options --enable-calendar
Selecting build options
~~~~~~~~~~~~~~~~~~~~~~~
The build options you choose depends on what application you are
The build options you choose depends on what project you are
building and what you will be using the build for. If you want to use
the build regularly, you will want a release build without extra
debugging information; if you are a developer who wants to hack the
......@@ -195,7 +195,7 @@ debugging macros.
There are many options recognized by the configure script which are
special-purpose options intended for embedders or other special
situations, and should not be used to build the full suite/XUL
applications. The full list of options can be obtained by running
projects. The full list of options can be obtained by running
``./mach configure -- --help``.
.. warning::
......@@ -281,7 +281,7 @@ Tests
^^^^^
``ac_add_options --disable-tests``
By default, many auxiliary test applications are built, which can
By default, many auxiliary test programs are built, which can
help debug and patch the mozilla source. Disabling these tests can
speed build time and reduce disk space considerably. Developers
should generally not use this option.
......@@ -337,12 +337,12 @@ directory within each repository.
64bits) <http://hg.mozilla.org/mozilla-central/file/tip/browser/config/mozconfigs/macosx64/debug>`__
:name: Firefox.2C_Default_Release_Configuration
Building multiple applications from the same source tree
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Building multiple projects from the same source tree
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to build multiple applications from the same source tree,
It is possible to build multiple projects from the same source tree,
as long as you `use a different objdir <#Building_with_an_Objdir>`__ for
each application.
each project.
You need to create multiple ``mozconfig`` files.
......@@ -366,7 +366,7 @@ Thunderbird. You should first create three ``mozconfig`` files.
# Build Firefox
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
``mozconfig-thunderbird``:
......@@ -377,7 +377,7 @@ Thunderbird. You should first create three ``mozconfig`` files.
# Build Thunderbird
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-thunderbird
ac_add_options --enable-application=comm/mail
ac_add_options --enable-project=comm/mail
To build Firefox, run the following commands:
......
{
"configure-args": "--enable-application=js --target=wasm32-unknown-wasi --disable-stdcxx-compat --without-system-zlib --without-intl-api --disable-jit --disable-shared-js --disable-shared-memory --disable-tests --disable-clang-plugin --disable-debug-symbols --enable-jitspew",
"configure-args": "--enable-project=js --target=wasm32-unknown-wasi --disable-stdcxx-compat --without-system-zlib --without-intl-api --disable-jit --disable-shared-js --disable-shared-memory --disable-tests --disable-clang-plugin --disable-debug-symbols --enable-jitspew",
"optimize": true,
"debug": false,
"nspr": false,
......
......@@ -313,12 +313,15 @@ def inner_compile(command_context, **kwargs):
# Validate the mozconfig.
# Require an explicit --enable-application=APP (even if you just
# Require an explicit --enable-project/application=APP (even if you just
# want to build the default browser application.)
loader = MozconfigLoader(command_context.topsrcdir)
mozconfig = loader.read_mozconfig(mozconfig_path)
configure_args = mozconfig["configure_args"]
if "--enable-application=%s" % app not in configure_args:
if (
"--enable-project=%s" % app not in configure_args
and "--enable-application=%s" % app not in configure_args
):
raise Exception("mozconfig %s builds wrong project" % mozconfig_path)
if not any("--with-compiler-wrapper" in a for a in configure_args):
raise Exception("mozconfig must wrap compiles")
......
......@@ -6,7 +6,7 @@
# for GC rooting hazards. See
# <https://wiki.mozilla.org/Javascript:SpiderMonkey:ExactStackRooting>.
ac_add_options --enable-application=browser
ac_add_options --enable-project=browser
ac_add_options --enable-js-shell
# the sixgill wrapper is not compatible with building wasm objects with clang.
......
......@@ -9,7 +9,7 @@
ac_add_options --enable-ctypes
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-application=js
ac_add_options --enable-project=js
ac_add_options --enable-nspr-build
if [ -n "$AUTOMATION" ]; then
......
......@@ -6,7 +6,7 @@
# GC rooting hazards. See
# <https://wiki.mozilla.org/Javascript:SpiderMonkey:ExactStackRooting>.
ac_add_options --enable-application=js
ac_add_options --enable-project=js
# Also compile NSPR to see through its part of the control flow graph (not
# currently needed, but also helps with weird problems finding the right
......
......@@ -38,7 +38,7 @@ A basic ``MOZCONFIG`` file for doing a debug build, put into ``$HOME/mozconfigs/
.. code::
# Build only the JS shell
ac_add_options --enable-application=js
ac_add_options --enable-project=js
# Enable the debugging tools: Assertions, debug only code etc.
ac_add_options --enable-debug
......@@ -122,7 +122,7 @@ have an optimized build ``MOZCONFIG``, and then activate it. An example
.. code::
# Build only the JS shell
ac_add_options --enable-application=js
ac_add_options --enable-project=js
# Enable optimization for speed
ac_add_options --enable-optimize
......
......@@ -5,7 +5,7 @@
. "$topsrcdir/build/mozconfig.common"
# Build Fennec
ac_add_options --enable-application=mobile/android
ac_add_options --enable-project=mobile/android
ac_add_options --with-gradle="$MOZ_FETCHES_DIR/android-gradle-dependencies/gradle-dist/bin/gradle"
export GRADLE_MAVEN_REPOSITORIES="file://$MOZ_FETCHES_DIR/android-gradle-dependencies/mozilla","file://$MOZ_FETCHES_DIR/android-gradle-dependencies/google","file://$MOZ_FETCHES_DIR/android-gradle-dependencies/central","file://$MOZ_FETCHES_DIR/android-gradle-dependencies/gradle-plugins"
......
......@@ -63,7 +63,7 @@ printed out a recommended ``mozconfig`` that looks something like this:
::
# Build GeckoView/Firefox for Android:
ac_add_options --enable-application=mobile/android
ac_add_options --enable-project=mobile/android
# Targeting the following architecture.
# For regular phones, no --target is needed.
......
......@@ -74,7 +74,7 @@ output as packages are downloaded and installed.
MOBILE_ANDROID_MOZCONFIG_TEMPLATE = """
# Build GeckoView/Firefox for Android:
ac_add_options --enable-application=mobile/android
ac_add_options --enable-project=mobile/android
# Targeting the following architecture.
# For regular phones, no --target is needed.
......@@ -90,7 +90,7 @@ ac_add_options --enable-application=mobile/android
MOBILE_ANDROID_ARTIFACT_MODE_MOZCONFIG_TEMPLATE = """
# Build GeckoView/Firefox for Android Artifact Mode:
ac_add_options --enable-application=mobile/android
ac_add_options --enable-project=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --enable-artifact-builds
......
......@@ -143,7 +143,7 @@ ac_add_options --enable-artifact-builds
JS_MOZCONFIG_TEMPLATE = """\
# Build only the SpiderMonkey JS test shell
ac_add_options --enable-application=js
ac_add_options --enable-project=js
"""
# Upgrade Mercurial older than this.
......
......@@ -215,8 +215,8 @@ class BuildBackend(LoggingMixin):
invalidate the XUL cache (which includes some JS) at application
startup-time. The application checks for .purgecaches in the
application directory, which varies according to
--enable-application. There's a further wrinkle on macOS, where
the real application directory is part of a Cocoa bundle
--enable-application/--enable-project. There's a further wrinkle on
macOS, where the real application directory is part of a Cocoa bundle
produced from the regular application directory by the build
system. In this case, we write to both locations, since the
build system recreates the Cocoa bundle from the contents of the
......
......@@ -3,7 +3,7 @@ source $GECKO_PATH/taskcluster/scripts/misc/source-test-common.sh
# Write custom mozconfig
MOZCONFIG=$GECKO_PATH/mozconfig
echo "ac_add_options --enable-application=mobile/android" > $MOZCONFIG
echo "ac_add_options --enable-project=mobile/android" > $MOZCONFIG
echo "ac_add_options --target=arm-linux-androideabi" >> $MOZCONFIG
echo "ac_add_options --with-android-sdk=${MOZ_FETCHES_DIR}/android-sdk-linux" >> $MOZCONFIG
echo "ac_add_options --with-android-ndk=${MOZ_FETCHES_DIR}/android-ndk" >> $MOZCONFIG
......
......@@ -9,7 +9,7 @@ MOZ_AUTOMATION_PACKAGE=0
MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0
MOZ_AUTOMATION_UPLOAD=0
MOZ_AUTOMATION_CHECK=0
ac_add_options --enable-application=tools/rusttests
ac_add_options --enable-project=tools/rusttests
. "$topsrcdir/build/mozconfig.common"
. "$topsrcdir/build/mozconfig.common.override"
......
......@@ -16,4 +16,4 @@ following will be built:
3. the Windows Default Browser Agent (when `--enable-default-browser-agent`);
Packaging the installer and uninstaller is not yet supported: instead,
use an (artifact) build with `--enable-application=browser`.
use an (artifact) build with `--enable-project=browser`.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment