Skip to content

Commit

Permalink
fix x86_64 android (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
secext2022 committed Aug 22, 2023
1 parent f284b90 commit 5f30da0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions patch/p1.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff '--color=auto' -ru -x Cargo.lock workdir-1/v8-0.75.0/build.rs workdir/v8-0.75.0/build.rs
--- workdir-1/v8-0.75.0/build.rs 2023-08-21 13:43:23.899828209 +0800
+++ workdir/v8-0.75.0/build.rs 2023-08-22 14:50:01.136960948 +0800
+++ workdir/v8-0.75.0/build.rs 2023-08-22 15:10:35.935818835 +0800
@@ -145,7 +145,7 @@
let clang_base_path = clang_download();
gn_args.push(format!("clang_base_path={:?}", clang_base_path));
Expand All @@ -10,11 +10,12 @@ diff '--color=auto' -ru -x Cargo.lock workdir-1/v8-0.75.0/build.rs workdir/v8-0.
gn_args.push("treat_warnings_as_errors=false".to_string());
}
}
@@ -180,9 +180,15 @@
@@ -180,9 +180,19 @@
maybe_install_sysroot("arm64");
maybe_install_sysroot("amd64");
};
+ if target_triple == "x86_64-linux-android" {
+ gn_args.push(r#"target_cpu="x64""#.to_string());
+ gn_args.push("use_sysroot=true".to_string());
+ maybe_install_sysroot("amd64");
+ }
Expand All @@ -24,6 +25,9 @@ diff '--color=auto' -ru -x Cargo.lock workdir-1/v8-0.75.0/build.rs workdir/v8-0.
+ if target_triple.contains("android") {
+ if target_triple == "aarch64-linux-android" {
+ gn_args.push(r#"v8_target_cpu="arm64""#.to_string());
+ }
+ if target_triple == "x86_64-linux-android" {
+ gn_args.push(r#"v8_target_cpu="x64""#.to_string());
+ }
gn_args.push(r#"target_os="android""#.to_string());

Expand Down

0 comments on commit 5f30da0

Please sign in to comment.