зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1541068
- add Rust compilation directories to GARBAGE_DIRS; r=nalexander
We add to `GARBAGE_DIRS` in the toplevel `Makefile.in` because all of our Rust libraries share a single `CARGO_TARGET_DIR`, located in topobjdir. We add to `GARBAGE_DIRS` for Rust programs because Rust programs currently do not share compilation artifacts with Rust libraries (as our libraries are built with `panic=abort` and our programs are not, sharing compilation artifacts between the two is a non-starter). Differential Revision: https://phabricator.services.mozilla.com/D26762 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
654fc0c672
Коммит
a780e0f5a1
|
@ -24,6 +24,13 @@ endif
|
|||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
GARBAGE_DIRS += _javagen _profile staticlib
|
||||
# To share compilation of dependencies, Rust libraries all set their
|
||||
# CARGO_TARGET_DIR as a subdirectory of topobjdir. Normally, we would add
|
||||
# RUST*TARGET to GARBAGE_DIRS for those directories building Rust libraries.
|
||||
# But the directories building Rust libraries don't actually have
|
||||
# subdirectories to remove. So we add to GARBAGE_DIRS once here, globally,
|
||||
# for it to have the desired effect.
|
||||
GARBAGE_DIRS += $(RUST_TARGET)
|
||||
DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
|
||||
config/autoconf.mk \
|
||||
mozilla-config.h \
|
||||
|
|
|
@ -290,6 +290,9 @@ force-cargo-host-library-check:
|
|||
endif # HOST_RUST_LIBRARY_FILE
|
||||
|
||||
ifdef RUST_PROGRAMS
|
||||
|
||||
GARBAGE_DIRS += $(RUST_TARGET)
|
||||
|
||||
force-cargo-program-build:
|
||||
$(REPORT_BUILD)
|
||||
$(call CARGO_BUILD) $(addprefix --bin ,$(RUST_CARGO_PROGRAMS)) $(cargo_target_flag)
|
||||
|
@ -303,6 +306,9 @@ force-cargo-program-check:
|
|||
@true
|
||||
endif # RUST_PROGRAMS
|
||||
ifdef HOST_RUST_PROGRAMS
|
||||
|
||||
GARBAGE_DIRS += $(RUST_HOST_TARGET)
|
||||
|
||||
force-cargo-host-program-build:
|
||||
$(REPORT_BUILD)
|
||||
$(call CARGO_BUILD) $(addprefix --bin ,$(HOST_RUST_CARGO_PROGRAMS)) $(cargo_host_flag)
|
||||
|
|
Загрузка…
Ссылка в новой задаче