mirror of
https://github.com/0xNikilite/oboromi.git
synced 2026-01-31 01:15:22 +01:00
fix(build): Update the way to build app
Make the architecture checked before running to avoid Zycore and Zydis while using something else than X86_X64 (NOP test fail for now)
This commit is contained in:
@@ -338,9 +338,17 @@ fn main() {
|
||||
.arg("--build")
|
||||
.arg(&dynarmic_build_dir)
|
||||
.arg("--config")
|
||||
.arg("Release")
|
||||
.arg("--target").arg("Zycore")
|
||||
.arg("--target").arg("Zydis")
|
||||
.arg("Release");
|
||||
|
||||
if target.contains("x86_64") {
|
||||
build_cmd.arg("--target").arg("Zycore");
|
||||
build_cmd.arg("--target").arg("Zydis");
|
||||
"x86_64"
|
||||
} else {
|
||||
"arm64"
|
||||
};
|
||||
|
||||
build_cmd
|
||||
.arg("--target").arg("dynarmic")
|
||||
.arg("--parallel")
|
||||
.arg(env::var("NUM_JOBS").unwrap_or_else(|_| "4".into()));
|
||||
@@ -554,8 +562,14 @@ fn main() {
|
||||
println!("cargo:rustc-link-lib=static=mcl");
|
||||
println!("cargo:rustc-link-lib=static=dynarmic");
|
||||
println!("cargo:rustc-link-lib=static=fmt");
|
||||
println!("cargo:rustc-link-lib=static=Zydis");
|
||||
println!("cargo:rustc-link-lib=static=Zycore");
|
||||
|
||||
if target.contains("x86_64") {
|
||||
println!("cargo:rustc-link-lib=static=Zydis");
|
||||
println!("cargo:rustc-link-lib=static=Zycore");
|
||||
println!("cargo:warning=Linking x86_64-specific libraries: Zydis, Zycore");
|
||||
} else {
|
||||
println!("cargo:warning=Skipping x86_64-specific libraries on ARM64");
|
||||
}
|
||||
|
||||
if is_windows {
|
||||
if is_msvc {
|
||||
|
||||
Reference in New Issue
Block a user