V8在Mac上为Android构建 [英] V8 build for android on mac
问题描述
我尝试在Mac上为Android构建v8.我的步骤如下:
I try to build v8 for android on mac. My steps are below :
- 安装depot_tools
- 获取v8
- cd v8
- git checkout分支名称(Android的最后一个稳定版本)
-
echo "target_os = ['android']" >> ../.gclient && gclient sync --nohooks
-
make android_arm.release android_ndk_root=[full path to ndk]
- Install depot_tools
- fetch v8
- cd v8
- git checkout branch-name (last stable version for android)
echo "target_os = ['android']" >> ../.gclient && gclient sync --nohooks
make android_arm.release android_ndk_root=[full path to ndk]
说
没有存档符号表(运行ranlib)
no archive symbol table (run ranlib)
我搜索了这个问题.此状态有一个 bug .但这还没有解决.
I search this issue. There is a bug for this state. But it is not solved yet.
我尝试创建d8并推送android设备.我该怎么办?
I try to create d8 and push the android device. How can I do it?
编辑
v8指南提供了使用GN进行构建.
我使用gn gen out.gn/arm.release/ --args='is_debug=false android_ndk_root="/path/android-ndk" target_os="android" arm_arch="armv7-a" android_sdk_root="/path/android-sdk-r25" v8_static_library=true android_ndk_version="r11b"'
v8 guide provides building with GN.
I pass the ndk-root path using gn gen out.gn/arm.release/ --args='is_debug=false android_ndk_root="/path/android-ndk" target_os="android" arm_arch="armv7-a" android_sdk_root="/path/android-sdk-r25" v8_static_library=true android_ndk_version="r11b"'
然后我运行ninja -C out.gn/arm.release/
,错误如下:
Then I run ninja -C out.gn/arm.release/
, the error is below :
ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a',由'obj/libv8_base.a'所需,丢失,没有已知规则可以实现
ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a', needed by 'obj/libv8_base.a', missing and no known rule to make it
是的.因为我的libgcc在 4.9文件夹下,而不是4.9.x .如何设置libgcc路径?
That is right. Because my libgcc under 4.9 folder not 4.9.x. How can I set libgcc path?
推荐答案
您无需设置ANDROID_NDK.
you do not need to set ANDROID_NDK.
步骤5:"target_os = ['android']" >> ../.gclient&& gclient sync"会将ndk下载到"third_party/android_tools/ndk"
step 5:"target_os = ['android']" >> ../.gclient && gclient sync" will download ndk to "third_party/android_tools/ndk"
ndk_version必须> = 12.b
ndk_version must >= 12.b
这篇关于V8在Mac上为Android构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!