Skip to content

Commit

Permalink
Bug 1864624: Support building gkrust in mozilla-central derived proje…
Browse files Browse the repository at this point in the history
…cts. r=glandium

Allow overriding the .cargo/config.in source location to permit projects such
as comm-central to provide their own vendor configuration and tree, as well as
conditionally building gkrust.

It is expected in comm-central that we still export and provide a gkrust build
by including the existing `/toolkit/library/rust/moz.build` into our build system,
such that gtest linkage and mozilla-central expectations are correctly met.

Differential Revision: https://phabricator.services.mozilla.com/D193536
ikeycode committed Nov 17, 2023
1 parent ddea906 commit 546384e
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moz.build
Original file line number Diff line number Diff line change
@@ -183,7 +183,7 @@ if CONFIG["MOZ_BUILD_APP"]:
else:
include("/toolkit/toolkit.mozbuild")

OBJDIR_PP_FILES[".cargo"] += [".cargo/config.in"]
OBJDIR_PP_FILES[".cargo"] += [CONFIG["MOZ_OVERRIDE_CARGO_CONFIG"] or ".cargo/config.in"]

DEFINES["top_srcdir"] = TOPSRCDIR

7 changes: 4 additions & 3 deletions toolkit/toolkit.mozbuild
Original file line number Diff line number Diff line change
@@ -31,9 +31,10 @@ if CONFIG['ENABLE_TESTS']:
'/toolkit/library/gtest/rust',
]

DIRS += [
'/toolkit/library/rust',
]
if not CONFIG['MOZ_OVERRIDE_GKRUST']:
DIRS += [
'/toolkit/library/rust',
]

if CONFIG['MOZ_SANDBOX']:
DIRS += ['/security/sandbox']

0 comments on commit 546384e

Please sign in to comment.