Skip to content

Commit

Permalink
Bug 1679938 - Don't recurse the build into mfbt for projects that don…
Browse files Browse the repository at this point in the history
…'t need it. r=firefox-build-system-reviewers,mhentges

While all toolkit and js-based projects make use of mfbt, some others,
like tools/crashreporter and tools/update-packaging, don't.

So instead of including mfbt from the top-level directory, include it
from the relevant project top-level mozbuilds.

This allows to remove the dependency on mfbt files in the hash for the
minidump-stackwalk and mar-tools toolchains.

Differential Revision: https://phabricator.services.mozilla.com/D98378
  • Loading branch information
glandium committed Dec 1, 2020
1 parent b661d17 commit a5c8f7f
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions js/app.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DIRS += [
'/config/external/nspr',
'/config/external/zlib',
'/memory',
'/mfbt',
'/mozglue',
]

Expand Down
1 change: 1 addition & 0 deletions memory/app.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ EXPORTS.mozilla += [

DIRS += [
'/memory',
'/mfbt',
]
2 changes: 0 additions & 2 deletions mfbt/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ UNIFIED_SOURCES += [

if CONFIG["MOZ_BUILD_APP"] not in (
"memory",
"tools/crashreporter",
"tools/update-packaging",
"tools/update-programs",
):
# Building MFBT tests adds a large overhead when building.
Expand Down
2 changes: 1 addition & 1 deletion modules/zlib/src/mozzconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#ifndef MOZZCONF_H
#define MOZZCONF_H

#if defined(ZLIB_IN_MOZGLUE)
#include "mozilla/Types.h"

#if defined(ZLIB_IN_MOZGLUE)
#define ZEXTERN MFBT_API
#endif

Expand Down
4 changes: 0 additions & 4 deletions moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ if not CONFIG["JS_STANDALONE"] or not CONFIG["MOZ_BUILD_APP"]:
GENERATED_FILES["buildid.h"].script = "build/variables.py:buildid_header"
GENERATED_FILES["source-repo.h"].script = "build/variables.py:source_repo_header"

DIRS += [
"mfbt",
]

if CONFIG["MOZ_BUILD_APP"]:
# Bring in the configuration for the configured application.
include("/" + CONFIG["MOZ_BUILD_APP"] + "/app.mozbuild")
Expand Down
1 change: 0 additions & 1 deletion taskcluster/ci/toolchain/minidump_stackwalk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ job-defaults:
resources:
- 'build/moz.configure'
- 'config/external/zlib'
- 'mfbt'
- 'moz.configure'
- 'toolkit/crashreporter'
- 'toolkit/crashreporter/google-breakpad/src/common'
Expand Down
1 change: 0 additions & 1 deletion taskcluster/ci/toolchain/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ linux64-mar-tools:
toolchain-artifact: public/build/mar-tools.tar.xz
resources:
- build/moz.configure
- mfbt
- modules/libmar/
- moz.configure
- other-licenses/bsdiff/
Expand Down
1 change: 1 addition & 0 deletions tools/update-programs/app.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if CONFIG['MOZ_UPDATER']:
'/config/external/sqlite',
'/config/external/zlib',
'/memory',
'/mfbt',
'/mozglue',
'/security',
]
Expand Down

0 comments on commit a5c8f7f

Please sign in to comment.