depends: Define Rust target in a single location
This commit is contained in:
parent
54af6cd781
commit
1bb543414a
|
@ -117,7 +117,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
|
|||
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
|
||||
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
|
||||
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
|
||||
-e 's|@rust_target@|$(if $(rust_rust_target_$(canonical_host)),$(rust_rust_target_$(canonical_host)),$(canonical_host))|' \
|
||||
-e 's|@rust_target@|$(call rust_target,rust,$(canonical_host))|' \
|
||||
-e 's|@no_wallet@|$(NO_WALLET)|' \
|
||||
-e 's|@debug@|$(DEBUG)|' \
|
||||
$< > $@
|
||||
|
|
|
@ -18,8 +18,12 @@ $(package)_rust_std_sha256_hash_aarch64-unknown-linux-gnu=22bfc32b5003c3d5259bab
|
|||
$(package)_rust_std_sha256_hash_x86_64-apple-darwin=7c6806809e010e5fba1780007ecff5c31f0ad2fcac1b414b98ca3baa0fb41b36
|
||||
$(package)_rust_std_sha256_hash_x86_64-pc-windows-gnu=3657c361f5d6048c2cb814f1773fece07b840276d60f012d0bf70993fa95a77e
|
||||
|
||||
define rust_target
|
||||
$(if $($(1)_rust_target_$(2)),$($(1)_rust_target_$(2)),$(2))
|
||||
endef
|
||||
|
||||
ifneq ($(canonical_host),$(build))
|
||||
$(package)_rust_target=$(if $($(package)_rust_target_$(canonical_host)),$($(package)_rust_target_$(canonical_host)),$(canonical_host))
|
||||
$(package)_rust_target=$(call rust_target,$(package),$(canonical_host))
|
||||
$(package)_exact_file_name=rust-std-$($(package)_version)-$($(package)_rust_target).tar.gz
|
||||
$(package)_exact_sha256_hash=$($(package)_rust_std_sha256_hash_$($(package)_rust_target))
|
||||
$(package)_build_subdir=buildos
|
||||
|
|
Loading…
Reference in New Issue