|
@@ -41,14 +41,14 @@ impl std::str::FromStr for Architecture {
|
|
|
|
|
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
|
|
Ok(match s {
|
|
|
- "mips" => Architecture::Mips,
|
|
|
- "x86_64" => Architecture::X86_64,
|
|
|
- "armv7" => Architecture::ARMv7,
|
|
|
"aarch64" => Architecture::AArch64,
|
|
|
- "riscv64" => Architecture::RISCV64,
|
|
|
+ "armv7" => Architecture::ARMv7,
|
|
|
+ "loongarch64" => Architecture::LoongArch64,
|
|
|
+ "mips" => Architecture::Mips,
|
|
|
"powerpc64" => Architecture::PowerPC64,
|
|
|
+ "riscv64" => Architecture::RISCV64,
|
|
|
"s390x" => Architecture::S390X,
|
|
|
- "loongarch64" => Architecture::LoongArch64,
|
|
|
+ "x86_64" => Architecture::X86_64,
|
|
|
_ => return Err("invalid architecture"),
|
|
|
})
|
|
|
}
|
|
@@ -57,14 +57,14 @@ impl std::str::FromStr for Architecture {
|
|
|
impl std::fmt::Display for Architecture {
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
f.write_str(match self {
|
|
|
- Architecture::Mips => "mips",
|
|
|
- Architecture::X86_64 => "x86_64",
|
|
|
- Architecture::ARMv7 => "armv7",
|
|
|
Architecture::AArch64 => "aarch64",
|
|
|
- Architecture::RISCV64 => "riscv64",
|
|
|
+ Architecture::ARMv7 => "armv7",
|
|
|
+ Architecture::LoongArch64 => "loongarch64",
|
|
|
+ Architecture::Mips => "mips",
|
|
|
Architecture::PowerPC64 => "powerpc64",
|
|
|
+ Architecture::RISCV64 => "riscv64",
|
|
|
Architecture::S390X => "s390x",
|
|
|
- Architecture::LoongArch64 => "loongarch64",
|
|
|
+ Architecture::X86_64 => "x86_64",
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -73,29 +73,29 @@ impl std::fmt::Display for Architecture {
|
|
|
// libc6-dev-{arm64,armel}-cross packages.
|
|
|
#[derive(Parser)]
|
|
|
pub struct SysrootOptions {
|
|
|
- #[arg(long, default_value = "/usr/include/x86_64-linux-gnu", action)]
|
|
|
- x86_64_sysroot: PathBuf,
|
|
|
-
|
|
|
#[arg(long, default_value = "/usr/aarch64-linux-gnu/include", action)]
|
|
|
aarch64_sysroot: PathBuf,
|
|
|
|
|
|
#[arg(long, default_value = "/usr/arm-linux-gnueabi/include", action)]
|
|
|
armv7_sysroot: PathBuf,
|
|
|
|
|
|
- #[arg(long, default_value = "/usr/riscv64-linux-gnu/include", action)]
|
|
|
- riscv64_sysroot: PathBuf,
|
|
|
+ #[arg(long, default_value = "/usr/loongarch64-linux-gnu/include", action)]
|
|
|
+ loongarch64_sysroot: PathBuf,
|
|
|
+
|
|
|
+ #[arg(long, default_value = "/usr/mips-linux-gnu/include", action)]
|
|
|
+ mips_sysroot: PathBuf,
|
|
|
|
|
|
#[arg(long, default_value = "/usr/powerpc64le-linux-gnu/include", action)]
|
|
|
powerpc64_sysroot: PathBuf,
|
|
|
|
|
|
+ #[arg(long, default_value = "/usr/riscv64-linux-gnu/include", action)]
|
|
|
+ riscv64_sysroot: PathBuf,
|
|
|
+
|
|
|
#[arg(long, default_value = "/usr/s390x-linux-gnu/include", action)]
|
|
|
s390x_sysroot: PathBuf,
|
|
|
|
|
|
- #[arg(long, default_value = "/usr/mips-linux-gnu/include", action)]
|
|
|
- mips_sysroot: PathBuf,
|
|
|
-
|
|
|
- #[arg(long, default_value = "/usr/loongarch64-linux-gnu/include", action)]
|
|
|
- loongarch64_sysroot: PathBuf,
|
|
|
+ #[arg(long, default_value = "/usr/include/x86_64-linux-gnu", action)]
|
|
|
+ x86_64_sysroot: PathBuf,
|
|
|
}
|
|
|
|
|
|
#[derive(Parser)]
|