summaryrefslogtreecommitdiffstats
path: root/config/recurse.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /config/recurse.mk
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'config/recurse.mk')
-rw-r--r--config/recurse.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/config/recurse.mk b/config/recurse.mk
index 6afad04c2e..7956578ac0 100644
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -208,9 +208,18 @@ $(addprefix build/unix/stdc++compat/,target host) build/clang-plugin/host: confi
# 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.toml
+# When $topobjdir/.cargo/config exists from an old build, we also remove it because
+# cargo will prefer to use it rather than config.toml.
+CARGO_CONFIG_DEPS = $(DEPTH)/.cargo/config.toml
+ifneq (,$(wildcard $(DEPTH)/.cargo/config))
+CARGO_CONFIG_DEPS += $(MDDEPDIR)/cargo-config-cleanup.stub
+endif
+$(rust_targets): $(CARGO_CONFIG_DEPS)
ifndef TEST_MOZBUILD
-recurse_pre-export: $(DEPTH)/.cargo/config.toml
+recurse_pre-export: $(CARGO_CONFIG_DEPS)
endif
+$(MDDEPDIR)/cargo-config-cleanup.stub:
+ rm $(DEPTH)/.cargo/config
+ touch $@
endif