prepare 32
This commit is contained in:
parent
44f6233df0
commit
d03172e2f3
@ -10,18 +10,23 @@ fn find_package(name: &str) -> Vec<PathBuf> {
|
|||||||
let mut target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
let mut target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||||
if target_arch == "x86_64" {
|
if target_arch == "x86_64" {
|
||||||
target_arch = "x64".to_owned();
|
target_arch = "x64".to_owned();
|
||||||
|
} else if target_arch == "i686" {
|
||||||
|
target_arch = "x86".to_owned();
|
||||||
} else if target_arch == "aarch64" {
|
} else if target_arch == "aarch64" {
|
||||||
target_arch = "arm64".to_owned();
|
target_arch = "arm64".to_owned();
|
||||||
} else {
|
} else {
|
||||||
target_arch = "arm".to_owned();
|
target_arch = "arm".to_owned();
|
||||||
}
|
}
|
||||||
let target = if target_os == "macos" {
|
let mut target = if target_os == "macos" {
|
||||||
"x64-osx".to_owned()
|
"x64-osx".to_owned()
|
||||||
} else if target_os == "windows" {
|
} else if target_os == "windows" {
|
||||||
"x64-windows-static".to_owned()
|
"x64-windows-static".to_owned()
|
||||||
} else {
|
} else {
|
||||||
format!("{}-{}", target_arch, target_os)
|
format!("{}-{}", target_arch, target_os)
|
||||||
};
|
};
|
||||||
|
if target_arch == "i686" {
|
||||||
|
target = target.replace("x64", "x86");
|
||||||
|
}
|
||||||
println!("cargo:info={}", target);
|
println!("cargo:info={}", target);
|
||||||
path.push("installed");
|
path.push("installed");
|
||||||
path.push(target);
|
path.push(target);
|
||||||
@ -88,7 +93,7 @@ fn main() {
|
|||||||
// then set x64 to default by "rustup default stable-x86_64-pc-windows-msvc"
|
// then set x64 to default by "rustup default stable-x86_64-pc-windows-msvc"
|
||||||
let target = target_build_utils::TargetInfo::new();
|
let target = target_build_utils::TargetInfo::new();
|
||||||
if target.unwrap().target_pointer_width() != "64" {
|
if target.unwrap().target_pointer_width() != "64" {
|
||||||
panic!("Only support 64bit system");
|
// panic!("Only support 64bit system");
|
||||||
}
|
}
|
||||||
env::remove_var("CARGO_CFG_TARGET_FEATURE");
|
env::remove_var("CARGO_CFG_TARGET_FEATURE");
|
||||||
env::set_var("CARGO_CFG_TARGET_FEATURE", "crt-static");
|
env::set_var("CARGO_CFG_TARGET_FEATURE", "crt-static");
|
||||||
|
@ -66,7 +66,7 @@ macro_rules! call_vpx {
|
|||||||
macro_rules! call_vpx_ptr {
|
macro_rules! call_vpx_ptr {
|
||||||
($x:expr) => {{
|
($x:expr) => {{
|
||||||
let result = unsafe { $x }; // original expression
|
let result = unsafe { $x }; // original expression
|
||||||
let result_int = unsafe { std::mem::transmute::<_, i64>(result) };
|
let result_int = unsafe { std::mem::transmute::<_, isize>(result) };
|
||||||
if result_int == 0 {
|
if result_int == 0 {
|
||||||
return Err(Error::BadPtr(format!(
|
return Err(Error::BadPtr(format!(
|
||||||
"errcode={} {}:{}:{}:{}",
|
"errcode={} {}:{}:{}:{}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user