【发布时间】:2017-09-15 09:15:22
【问题描述】:
关于这个问题有一些问题。但答案没有帮助。我尝试为 android 生成 D8。 The v8 guide 表示不推荐使用 gyp。我的步骤在这里:
- git 克隆https://chromium.googlesource.com/chromium/tools/depot_tools.git
- 导出 PATH='pwd'/depot_tools:"$PATH"
- 下载ndk-r14b
- 获取 v8
- cd v8
- echo "target_os = ['android']" >> ../.gclient && gclient sync --nohooks
- tools/dev/v8gen.py arm.release
- gn gen out.gn/arm.release --args='android_ndk_root="/path/android-ndk-r14b" android_ndk_version="r14" v8_static_library=true android_sdk_root="/path/android-sdk-r25" target_os = "android" target_cpu = "arm" v8_target_cpu = "arm" is_component_build = false'
- ninja -C out.gn/arm.release d8
编译会引发一些错误。
In file included from ../../third_party/icu/source/common/unicode/unistr.h:33:0,
from ../../third_party/icu/source/common/unicode/locid.h:36,
from ../../third_party/icu/source/i18n/unicode/dcfmtsym.h:36,
from ../../third_party/icu/source/i18n/unicode/decimfmt.h:38,
from ../../third_party/icu/source/i18n/digitlst.h:32,
from ../../third_party/icu/source/i18n/visibledigits.cpp:18:
../../third_party/icu/source/common/unicode/std_string.h:35:18: fatal error: string: No such file or directory
#include <string>
^
compilation terminated.
[6/939] CC obj/third_party/icu/icui18n/utmscale.o
ninja: build stopped: subcommand failed.
我该如何解决?
【问题讨论】:
-
您需要查看您的链接,您为链接指定了 4 v8 指南,但是没有 4,您的问题中有 1 和 2 .你能纠正他们吗?
-
大概你需要指定一个STL来使用。不确定如何在 gn 中执行此操作,但在 ndk-build 中这将是
APP_STL。
标签: android macos android-ndk cross-compiling v8