Commit 26df6afc authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1888321 - Rename .cargo/config.in to .cargo/config.toml.in....

Bug 1888321 - Rename .cargo/config.in to .cargo/config.toml.in. r=firefox-build-system-reviewers,webdriver-reviewers,ahochheiden

Cargo 1.79 is emitting a warning when using .cargo/config.
.cargo/config.toml has been supported since cargo 1.39.

Differential Revision: https://phabricator.services.mozilla.com/D205974
parent ff68b67b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -113,9 +113,9 @@ replace-with = "vendored-sources"

# Take advantage of the fact that cargo will treat lines starting with #
# as comments to add preprocessing directives. This file can thus by copied
# as-is to $topsrcdir/.cargo/config with no preprocessing to be used there
# as-is to $topsrcdir/.cargo/config.toml with no preprocessing to be used there
# (for e.g. independent tasks building rust code), or be preprocessed by
# the build system to produce a .cargo/config with the right content.
# the build system to produce a .cargo/config.toml with the right content.
#define REPLACE_NAME vendored-sources
#define VENDORED_DIRECTORY third_party/rust
# We explicitly exclude the following section when preprocessing because
+1 −1
Original line number Diff line number Diff line
@@ -112,5 +112,5 @@ if CONFIG["COMPILE_ENVIRONMENT"] and CONFIG["CBINDGEN"]:
        "cbindgen-metadata.json",
        script="/build/RunCbindgen.py",
        entry_point="generate_metadata",
        inputs=["!/.cargo/config"],
        inputs=["!/.cargo/config.toml"],
    )
+3 −3
Original line number Diff line number Diff line
@@ -202,15 +202,15 @@ endif
$(addprefix build/unix/stdc++compat/,target host) build/clang-plugin/host: config/export

# Rust targets, and export targets that run cbindgen need
# $topobjdir/.cargo/config to be preprocessed first. Ideally, we'd only set it
# $topobjdir/.cargo/config.toml to be preprocessed first. Ideally, we'd only set it
# as a dependency of the rust targets, but unfortunately, that pushes Make to
# execute them much later than we'd like them to be when the file doesn't exist
# prior to Make running. So we also set it as a dependency of pre-export, which
# ensures it exists before recursing the rust targets and the export targets
# that run cbindgen, tricking Make into keeping them early.
$(rust_targets): $(DEPTH)/.cargo/config
$(rust_targets): $(DEPTH)/.cargo/config.toml
ifndef TEST_MOZBUILD
recurse_pre-export: $(DEPTH)/.cargo/config
recurse_pre-export: $(DEPTH)/.cargo/config.toml
endif

endif
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ rsync_filter_list = """
+ /config/**
+ /python/**

+ /.cargo/config.in
+ /.cargo/config.toml.in

+ /third_party/function2/**
- /third_party/python/gyp
+3 −1
Original line number Diff line number Diff line
@@ -183,7 +183,9 @@ if CONFIG["MOZ_BUILD_APP"]:
else:
    include("/toolkit/toolkit.mozbuild")

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

DEFINES["top_srcdir"] = TOPSRCDIR

Loading