forked from mirrors/gecko-dev
This is the first time we pin a specific Cranelift commit hash to use in Gecko. The target-lexicon hack is removed and instead we introduce a vendor patch for cranelift-codegen/cranelift-wasm themselves. Notable changes happen in top-level Cargo.toml, .cargo/config.in and js/src/wasm/cranelift/Cargo.toml; the rest has been generated by `mach vendor rust`. Differential Revision: https://phabricator.services.mozilla.com/D27316 --HG-- extra : moz-landing-system : lando
14 lines
405 B
Rust
14 lines
405 B
Rust
extern crate target_lexicon;
|
|
|
|
use core::str::FromStr;
|
|
use target_lexicon::{Triple, HOST};
|
|
|
|
fn main() {
|
|
println!("The host triple is {}.", HOST);
|
|
|
|
let e = Triple::from_str("riscv32-unknown-unknown")
|
|
.expect("expected to recognize the RISC-V target")
|
|
.endianness()
|
|
.expect("expected to know the endianness of RISC-V");
|
|
println!("The endianness of RISC-V is {:?}.", e);
|
|
}
|