Skip to content

Commit

Permalink
添加 x86_64-linux-android
Browse files Browse the repository at this point in the history
  • Loading branch information
secext2022 committed Aug 21, 2023
1 parent e6cc48f commit 5c2daa4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/v8-0.75.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,47 @@ jobs:
name: librusty_v8_release_aarch64-linux-android.a
path: v8_src/target/aarch64-linux-android/release/gn_out/obj/librusty_v8.a

# build `rusty_v8 0.75` for `x86_64-linux-android`
build_x86_64:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- run: cargo fetch
# symlink `cargo_src` -> ~/.cargo/registry/src/XXX/
- run: cargo metadata | deno run -A get_cargo_src.js

# FIXME: we have to checkout v8 source, because there is missing files in rusty_v8
#### start checkout v8 source
- run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --single-branch --depth=1
- run: export PATH=$(pwd)/depot_tools:$PATH && echo $PATH && mkdir v8

# https://v8.dev/docs/source-code
- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && gclient
- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && fetch v8

# https://v8.dev/docs/cross-compile-arm
- run: echo "target_os = ['android']" >> v8/.gclient
- run: cat v8/.gclient

- run: export PATH=$(pwd)/depot_tools:$PATH && cd v8 && gclient sync
#### done checkout v8 source

# copy missing files
- run: cp -r cargo_src/v8-0.75.0 v8_src
- run: cp -rn v8/v8/build/android v8_src/build || true

# build
- run: cd v8_src && rustup target add x86_64-linux-android
- run: cd v8_src && V8_FROM_SOURCE=1 cargo build -vv --release --target x86_64-linux-android

- uses: actions/upload-artifact@v3
with:
name: librusty_v8_release_x86_64-linux-android.a
path: v8_src/target/x86_64-linux-android/release/gn_out/obj/librusty_v8.a

# TODO
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
本项目使用 github actions 编译 [rusty_v8](https://github.com/denoland/rusty_v8):

+ `librusty_v8_release_aarch64-linux-android.a`
+ `librusty_v8_release_x86_64-linux-android.a`


TODO

0 comments on commit 5c2daa4

Please sign in to comment.