2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2016-03-08 04:49:35 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2016-05-12 18:55:58 +00:00
|
|
|
imply_option("MOZ_PLACES", True)
|
2016-05-12 18:55:59 +00:00
|
|
|
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
|
2016-05-12 18:55:59 +00:00
|
|
|
imply_option("MOZ_SERVICES_SYNC", True)
|
2018-09-21 23:32:55 +00:00
|
|
|
imply_option("MOZ_DEDICATED_PROFILES", True)
|
|
|
|
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
|
2019-08-06 23:54:34 +00:00
|
|
|
imply_option("MOZ_NORMANDY", True)
|
2024-06-15 22:27:12 +00:00
|
|
|
imply_option("MOZ_PROFILE_MIGRATOR", True)
|
2016-05-12 18:55:58 +00:00
|
|
|
|
2024-06-14 13:44:58 +00:00
|
|
|
|
2024-06-14 13:44:58 +00:00
|
|
|
imply_option("MOZ_APP_VENDOR", "Mozilla")
|
2024-06-14 13:44:58 +00:00
|
|
|
imply_option("MOZ_APP_ID", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
|
2024-06-15 22:27:11 +00:00
|
|
|
# Include the DevTools client, not just the server (which is the default)
|
|
|
|
imply_option("MOZ_DEVTOOLS", "all")
|
2024-06-15 11:36:46 +00:00
|
|
|
imply_option("BROWSER_CHROME_URL", "chrome://browser/content/browser.xhtml")
|
2024-06-14 13:44:58 +00:00
|
|
|
|
2022-11-24 00:46:13 +00:00
|
|
|
with only_when(target_has_linux_kernel & compile_environment):
|
Bug 1079662 - Always enable PIE. r=froydnj
Last attempt, a few years ago, blatantly failed because nautilus (the
GNOME file manager) can't start PIE executables, which look like shared
libraries, and that it thus considers not being executables.
Downstreams don't actually have the problem, because users won't be
launching Firefox from a file manager, but for mozilla.org builds, it is
a problem because users would download, then extract, and then likely
try to run the Firefox executable from a file manager.
So for mozilla.org builds, we still need to find a way around the
nautilus problem.
A .desktop file could be a solution, but .desktop files have not
actually been designed for this use case, which leads to:
- having to use an awful one-liner shell wrapper to derive the path
to the executable from that of the .desktop file,
- not even being able to associate an icon,
- the .desktop file not being copiable to a location where .desktop
files would normally go, because it would then fail to find the
executable.
Another possibility is to go back to using a shell wrapper, but that's
not entirely appealing.
What we chose here is similar, where we have a small `firefox` wrapper
that launches the real `firefox-bin` (which is still leftover from those
old times where we had a shell wrapper, for reasons).
The small `firefox` wrapper is a minimalist C executable that just
finds the path to the `firefox-bin` executable and executes it with the
same args it was called with. The wrapper is only enabled when the
MOZ_NO_PIE_COMPAT environment variable is set, which we only take into
account on Linux. The variable is only really meant to be used for
mozilla.org builds, for the nautilus problem. Downstreams will just pick
the default, which is changed to build PIE.
On other platforms, PIE was already enabled by default, so we just
remove the --enable-pie configure flag.
Differential Revision: https://phabricator.services.mozilla.com/D5109
2018-09-06 04:27:49 +00:00
|
|
|
option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper")
|
|
|
|
|
|
|
|
set_config("MOZ_NO_PIE_COMPAT", depends_if("MOZ_NO_PIE_COMPAT")(lambda _: True))
|
|
|
|
|
2024-06-17 07:45:19 +00:00
|
|
|
|
|
|
|
@depends(target, update_channel, have_64_bit, moz_debug, "MOZ_AUTOMATION")
|
|
|
|
@imports(_from="os", _import="environ")
|
|
|
|
def requires_stub_installer(
|
|
|
|
target, update_channel, have_64_bit, moz_debug, moz_automation
|
|
|
|
):
|
|
|
|
if target.kernel != "WINNT":
|
|
|
|
return False
|
|
|
|
if have_64_bit:
|
|
|
|
return False
|
|
|
|
if update_channel not in ("nightly", "nightly-try", "aurora", "beta", "release"):
|
|
|
|
return False
|
|
|
|
|
|
|
|
if moz_debug:
|
|
|
|
return False
|
|
|
|
|
|
|
|
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
|
|
|
|
if moz_automation and not environ.get("USE_STUB_INSTALLER"):
|
|
|
|
die(
|
|
|
|
"STUB installer expected to be enabled but "
|
|
|
|
"USE_STUB_INSTALLER is not specified in the environment"
|
|
|
|
)
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
imply_option("MOZ_STUB_INSTALLER", True, when=requires_stub_installer)
|
|
|
|
|
2016-03-08 04:49:35 +00:00
|
|
|
include("../toolkit/moz.configure")
|