Code Monkey home page Code Monkey logo

android-v8's Introduction

android-v8

Contains the Google's V8 build used in android runtime.

How to build (linux)

  • get depot tools more :
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

export PATH=`pwd`/depot_tools:"$PATH"
  • Make sure you have these packages installed (Linux only)
sudo apt-get install curl libc6-dev-i386 g++-multilib
  • Download and extract Android NDK r22b

Linux:

curl -O https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
unzip android-ndk-r22b-linux-x86_64.zip -d ndkr22b
  • Export ANDROID_NDK_HOME environment variable
export ANDROID_NDK_HOME=`pwd`/ndkr22b/android-ndk-r22b
  • fetch v8 (this will create a v8 repo folder and add a .gclient file)

  • Add target_os to the .gclient file:

This will ensure that the required build dependencies are fetched by depot_tools

solutions = [
  {
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "managed": False,
    "name": "v8",
    "deps_file": "DEPS",
    "custom_deps": {},
  },
]
target_os = ['android']
  • checkout tag 9.7.106.13
cd v8
git checkout 9.7.106.13
  • Run sync
gclient sync
  • Create symlinks
cp third_party/android_ndk/BUILD.gn $ANDROID_NDK_HOME
rm -rf third_party/android_tools third_party/android_ndk
mkdir third_party/android_tools
ln -s $ANDROID_NDK_HOME third_party/android_tools/ndk
ln -s $ANDROID_NDK_HOME third_party/android_ndk
  • Apply patch running the following command
cd ..
./apply_patch.sh
  • run the following command in the root folder command
cd ..
./build.sh

you can run: ../build_v8 debug if you want to build v8 in debug, by default it's built in release.

Outputs

The output folder is called dist and it's created at v8 root level.

HOW TO CREATE A NEW PATCH file

git diff --cached > patch.diff

What to do next

android-v8's People

Contributors

atanasovg avatar blagoev avatar darind avatar farfromrefug avatar nathanaela avatar petekanev avatar plamen5kov avatar triniwiz avatar vtrifonov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-v8's Issues

*.o: No such file or directory

When i follow the md and build the v8 on macOS, i have this issue(as follow) ...

build finished in 1776 seconds /Documents/2nd_Project/dev/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/ar: creating ./dist//arm-release/libv8.a /Documents/2nd_Project/dev/android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/ar: outgn/arm-release/obj/buildtools/third_party/libc++/libc++/*.o: No such file or directory
In the end i check the outgn dir and found mksnapshot under dist dir and no other items(.a static library) at all.
What did i missing? Thanks.

Could not find Ninja in the third_party of the current project

./scripts/setup-build.sh android
37>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "2c2138e811487b13020eb331482fb991fd399d4e" "--no-tags"' in /home/11/android-v8/v8/third_party/requests failed; will retry after a short nap...
37>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "2c2138e811487b13020eb331482fb991fd399d4e" "--no-tags"' in /home/11/android-v8/v8/third_party/requests failed; will retry after a short nap...
Syncing projects: 100% (42/42) v8/third_party/requests
v8/third_party/requests (ERROR)

[0:00:07] Started.
[0:00:07] Finished running: git rev-list -n 1 HEAD
[0:00:07] Finished running: git rev-parse --abbrev-ref=strict HEAD
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:09] fatal: the remote end hung up unexpectedly
[0:00:12] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:00:12] fatal: the remote end hung up unexpectedly

./scripts/build.android.sh
Done. Made 231 targets from 115 files in 219ms
Done. Made 231 targets from 116 files in 241ms
Done. Made 230 targets from 115 files in 226ms
Done. Made 230 targets from 116 files in 236ms
depot_tools/ninja.py: Could not find Ninja in the third_party of the current project, nor in your PATH.
Please take one of the following actions to install Ninja:

  • If your project has DEPS, add a CIPD Ninja dependency to DEPS.
  • Otherwise, add Ninja to your PATH after depot_tools.

5.1.xtimeline?

@jasssonpet - are we really thinking of jumping to the Canary v8 Engine? I'm all for running bleeding edge; but I can't imagine that running canary for my released application as this is the least tested versions of the v8's and if you are going to run canary; why are we picking .150 instead of 300ish you are missing about 150 potential fixes (& new bugs ).

So I guess the question is what is the time line for this engine being released for android; or are you going to wait until 5.1 gets moved into the beta channel and then upgrade to the current 5.1 at that point?

undefined reference to 'v8::platform::NewDefaultPlatform

I followed the README.md and build v8 successfully on linux, But when i added libv8.a and all the needed header to my own project, i have this issue(as follow):

JNI_OnLoad: error: undefined reference to 'v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__ndkCr::unique_ptr<v8::TracingController, std::__ndkCr::default_deletev8::TracingController >)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Build Instructions?

Are their any specific build instructions for it for the NativeScript versions; or do we just follow the Android building instructions @ googles site. Which version of the Android runtimes are you building into the Android-runtimes?

These are the current valid v8 runtimes:
android_ia32
android_x64
android_arm
android_arm64
android_mipsel
android_x87

I assume it is ia32 & arm?
Any specific flags?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.