Bug 1830039 - Remove mach support for REQUIRES_UNIFIED_BUILD r=andi,glandium

As a consequence, rename hybrid builds into non-unified builds in tree
herder.

Differential Revision: https://phabricator.services.mozilla.com/D176545
This commit is contained in:
serge-sans-paille 2023-05-05 12:10:39 +00:00
parent f781ded94d
commit 77973c6ab3
12 changed files with 19 additions and 35 deletions

View file

@ -36,14 +36,10 @@ Building outside of the unified environment
As described above, unified builds can cause source files to implicitly depend on each other, which
not only causes unexpected build failures but also can cause issues when using source-analysis tools.
To combat this, we'll use a "hybrid" build that attempts to perform a build with as many files compiled
To combat this, we'll use a "non-unified" build that attempts to perform a build with as many files compiled
individually as possible.
Due to the implicit dependency problem, not all modules are able to be compiled in a non-unified
environment yet. To designate these for the hybrid build, the ``REQUIRES_UNIFIED_BUILD`` option can be
set in their corresponding ``moz.build`` file.
To build in the hybrid mode, set the following flag in your ``mozconfig``:
To build in the non unified mode, set the following flag in your ``mozconfig``:
``ac_add_options --disable-unified-build``

View file

@ -181,7 +181,7 @@ set_config("DEVELOPER_OPTIONS", developer_options)
option(
"--disable-unified-build",
help="Enable building modules that are not marked with `REQUIRES_UNIFIED_BUILD` in non unified context",
help="Enable building modules in non unified context",
)
set_config("ENABLE_UNIFIED_BUILD", True, when="--disable-unified-build")

View file

@ -1435,12 +1435,6 @@ VARIABLES = {
""",
),
"REQUIRES_UNIFIED_BUILD": (
bool,
bool,
"""Whether this module requires building in unified environment.
""",
),
"IS_RUST_LIBRARY": (
bool,
bool,

View file

@ -1121,9 +1121,7 @@ class UnifiedSources(BaseSources):
self, context, static_files, generated_files, canonical_suffix
)
unified_build = context.config.substs.get(
"ENABLE_UNIFIED_BUILD", False
) or context.get("REQUIRES_UNIFIED_BUILD", False)
unified_build = context.config.substs.get("ENABLE_UNIFIED_BUILD", False)
files_per_unified_file = (
context.get("FILES_PER_UNIFIED_FILE", 16) if unified_build else 1
)

View file

@ -28,5 +28,3 @@ UNIFIED_SOURCES += [
]
FILES_PER_UNIFIED_FILE = 1
REQUIRES_UNIFIED_BUILD = True

View file

@ -28,5 +28,3 @@ UNIFIED_SOURCES += [
]
FILES_PER_UNIFIED_FILE = 32
REQUIRES_UNIFIED_BUILD = True

View file

@ -125,19 +125,19 @@ linux64-plain/opt:
optimization:
skip-unless-expanded: null
linux64-hybrid/plain:
linux64-non-unified/plain:
description: "Linux64 Plain Hybrid"
index:
product: firefox
job-name: linux64-hybrid-plain
job-name: linux64-non-unified-plain
treeherder:
platform: linux64/plain
symbol: Bp-hybrid
symbol: Bp-nu
tier: 1
worker:
max-run-time: 5400
env:
PERFHERDER_EXTRA_OPTIONS: hybrid
PERFHERDER_EXTRA_OPTIONS: non-unified
run:
using: mozharness
actions: [get-secrets, build]
@ -149,7 +149,7 @@ linux64-hybrid/plain:
tooltool-downloads: public
extra-config:
disable_package_metrics: true
mozconfig-variant: hybrid
mozconfig-variant: non-unified
run-on-projects: ['integration']
use-sccache: true
fetches:

View file

@ -53,23 +53,23 @@ macosx64/debug:
- macosx64-sdk
- sysroot-wasm32-wasi
macosx64-hybrid/plain:
macosx64-non-unified/plain:
description: "MacOS X x64 Hybrid Cross-compile"
index:
job-name: macosx64-hybrid
job-name: macosx64-non-unified
treeherder:
platform: osx-cross/plain
symbol: Bp-hybrid
symbol: Bp-nu
tier: 1
worker:
max-run-time: 5400
env:
PERFHERDER_EXTRA_OPTIONS: hybrid
PERFHERDER_EXTRA_OPTIONS: non-unified
run:
config:
- builds/releng_base_firefox.py
- builds/releng_base_mac_64_cross_builds.py
mozconfig-variant: hybrid
mozconfig-variant: non-unified
extra-config:
disable_package_metrics: true
use-sccache: true

View file

@ -205,20 +205,20 @@ win64/debug:
fetch:
- upx-3.95-win
win64-hybrid/plain:
win64-non-unified/plain:
description: "Win64 Hybrid Plain"
index:
product: firefox
job-name: win64-hybrid-plain
job-name: win64-non-unified-plain
treeherder:
platform: windows2012-64/debug
symbol: Bp-hybrid
symbol: Bp-nu
tier: 1
worker-type: b-linux-gcp
worker:
max-run-time: 7200
env:
PERFHERDER_EXTRA_OPTIONS: hybrid
PERFHERDER_EXTRA_OPTIONS: non-unified
run:
options: [append-env-variables-from-configs]
actions: [get-secrets, build]
@ -227,7 +227,7 @@ win64-hybrid/plain:
config:
- builds/releng_base_firefox.py
- builds/releng_base_linux_64_builds.py
mozconfig-variant: hybrid
mozconfig-variant: non-unified
extra-config:
mozconfig_platform: win64
use-sccache: true