Bug 1927301 - Support using mailnews rust components in suite. r=frg

See Bug 1860654 "Support Rust for Thunderbird development".
This commit is contained in:
Bill Gianopoulos 2024-07-28 00:41:10 +00:00
Родитель ba462ef93b
Коммит 3cfee6729b
3 изменённых файлов: 40 добавлений и 0 удалений

Просмотреть файл

@ -23,3 +23,13 @@ libs:: $(DIST)/bin/platform.ini
sed -e "s/^\(SourceStamp=\).*/\1$(MOZ_REV)/" $(DIST)/bin/platform.ini \
> $(DIST)/bin/platform.ini~
mv -f $(DIST)/bin/platform.ini~ $(DIST)/bin/platform.ini
vendored-rust-check:
ifdef MOZ_THUNDERBIRD_RUST
@echo "Checking vendored Rust libs"
$(PYTHON3) $(commtopsrcdir)/python/rocbuild/rocbuild/rust.py verify_vendored_dependencies
endif
export:: vendored-rust-check

Просмотреть файл

@ -21,6 +21,14 @@ DIRS += [
"themes/modern",
]
if CONFIG["MOZ_THUNDERBIRD_RUST"]:
DEFINES["MOZ_THUNDERBIRD_RUST"] = 1
if CONFIG["MOZ_OVERRIDE_GKRUST"]:
DIRS += [
"../rust",
]
if CONFIG['MOZ_IRC']:
DIRS += ['chatzilla']

Просмотреть файл

@ -79,6 +79,28 @@ set_defconf("SEAMONKEY_VERSION_DISPLAY", seamonkey_version.version_display)
imply_option("MOZ_PLACES", True)
imply_option("MOZ_SERVICES_SYNC", False)
# Thunderbird Rust code is now the default
option("--disable-thunderbird-rust", help="Enable Rust support within Thunderbird")
set_config("MOZ_THUNDERBIRD_RUST", True, when="--enable-thunderbird-rust")
set_define("MOZ_THUNDERBIRD_RUST", True, when="--enable-thunderbird-rust")
set_config("MOZ_OVERRIDE_GKRUST", True, when="--enable-thunderbird-rust")
@depends("--enable-thunderbird-rust")
def moz_override_cargo_config(enable_rust):
rust_override = "comm/rust/.cargo/config.toml.in"
if enable_rust:
log.info(f"Using {rust_override} for Rust code.")
return rust_override
set_config(
"MOZ_OVERRIDE_CARGO_CONFIG",
moz_override_cargo_config,
when="--enable-thunderbird-rust",
)
# Building extensions is disabled by default.
# =========================================================