在Mac OSX 10.9上构建Android源代码

时间:2014-05-09 16:44:40

标签: macos android-source

我正在尝试在Mac OS X 10.9.2上构建Android源代码https://source.android.com/source/building-running.html,并且使用Command Line Developer Tools版本为5.1

构建时我收到此错误:

host C++: v8_tools_gyp_v8_base_arm64_arm64_host_gyp <= external/chromium_org/v8/src/accessors.cc
cc1plus: error: unrecognized command line option "-Wno-unused-local-typedefs"
build/core/binary.mk:583: recipe for target 'out/host/darwin-x86/obj/STATIC_LIBRARIES/v8_tools_gyp_v8_base_arm64_arm64_host_gyp_intermediates/v8/src/accessors.o' failed

如何获取此编译器选项Wno-unused-local-typedefs?或绕过这个选项?

我计划通过mac端口安装GCC 4.8或更高版本,并参考此GCC,如果您有任何解决方案,请告诉我。

1 个答案:

答案 0 :(得分:0)

您可能需要查看http://forum.xda-developers.com/showthread.php?t=2510898

构建makefile需要进行一些更改才能使构建在Darwin上运行。上面指南的最后一节。这可能是原因。看看这个补丁: https://github.com/CyanogenMod/android_external_chromium_org/commit/5130af630390487b37d99941887883647c67f37a

希望这有帮助。