mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-23 13:46:16 +00:00
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
--- a/build/moz.configure/rust.configure
|
|
+++ b/build/moz.configure/rust.configure
|
|
@@ -514,17 +514,27 @@
|
|
assert_rust_compile(host, rustc_target, rustc)
|
|
return rustc_target
|
|
|
|
+option("--custom-rust-target-triple", nargs=1, help="Customize Rust Target Triple")
|
|
+
|
|
+@depends("--custom-rust-target-triple")
|
|
+def get_custom_rust_target_triple(custom_rust_target_triple):
|
|
+ if custom_rust_target_triple:
|
|
+ return custom_rust_target_triple[0]
|
|
+ return None
|
|
|
|
@depends(
|
|
- rustc, target, c_compiler, rust_supported_targets, arm_target, when=rust_compiler
|
|
+ get_custom_rust_target_triple, rustc, target, c_compiler, rust_supported_targets, arm_target, when=rust_compiler
|
|
)
|
|
@checking("for rust target triplet")
|
|
def rust_target_triple(
|
|
- rustc, target, compiler_info, rust_supported_targets, arm_target
|
|
+ custom_rust_target_triple, rustc, target, compiler_info, rust_supported_targets, arm_target
|
|
):
|
|
- rustc_target = detect_rustc_target(
|
|
- target, compiler_info, arm_target, rust_supported_targets
|
|
- )
|
|
+ if custom_rust_target_triple:
|
|
+ rustc_target = custom_rust_target_triple
|
|
+ else:
|
|
+ rustc_target = detect_rustc_target(
|
|
+ target, compiler_info, arm_target, rust_supported_targets
|
|
+ )
|
|
assert_rust_compile(target, rustc_target, rustc)
|
|
return rustc_target
|
|
|
|
@@ -599,8 +599,6 @@
|
|
|
|
# ==============================================================
|
|
|
|
-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags")
|
|
-set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags))
|
|
|
|
|
|
# Rust compiler flags
|