mirror of https://github.com/axmolengine/axmol.git
Fixed compiling and linking error of new lua projects when using NDK r10 above.
This commit is contained in:
parent
d78b1b8ff0
commit
3025e937f6
|
@ -43,20 +43,14 @@ def check_environment_variables():
|
||||||
return NDK_ROOT
|
return NDK_ROOT
|
||||||
|
|
||||||
def select_toolchain_version():
|
def select_toolchain_version():
|
||||||
'''Because ndk-r8e uses gcc4.6 as default. gcc4.6 doesn't support c++11. So we should select gcc4.7 when
|
|
||||||
using ndk-r8e. But gcc4.7 is removed in ndk-r9, so we should determine whether gcc4.7 exist.
|
|
||||||
Conclution:
|
|
||||||
ndk-r8e -> use gcc4.7
|
|
||||||
ndk-r9 -> use gcc4.8
|
|
||||||
'''
|
|
||||||
|
|
||||||
ndk_root = check_environment_variables()
|
ndk_root = check_environment_variables()
|
||||||
if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")):
|
if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.9")):
|
||||||
|
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.9'
|
||||||
|
print "The Selected NDK toolchain version was 4.9 !"
|
||||||
|
elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")):
|
||||||
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8'
|
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8'
|
||||||
print "The Selected NDK toolchain version was 4.8 !"
|
print "The Selected NDK toolchain version was 4.8 !"
|
||||||
elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.7")):
|
|
||||||
os.environ['NDK_TOOLCHAIN_VERSION'] = '4.7'
|
|
||||||
print "The Selected NDK toolchain version was 4.7 !"
|
|
||||||
else:
|
else:
|
||||||
print "Couldn't find the gcc toolchain."
|
print "Couldn't find the gcc toolchain."
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -150,4 +144,6 @@ if __name__ == '__main__':
|
||||||
help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html')
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
|
|
||||||
|
print "We will remove this script next version,you should use cocos console to build android project.\n"
|
||||||
|
|
||||||
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
|
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
APP_STL := c++_static
|
APP_STL := gnustl_static
|
||||||
NDK_TOOLCHAIN_VERSION=clang
|
|
||||||
|
|
||||||
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
|
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
|
||||||
APP_LDFLAGS := -latomic
|
APP_LDFLAGS := -latomic
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
APP_STL := c++_static
|
APP_STL := gnustl_static
|
||||||
NDK_TOOLCHAIN_VERSION=clang
|
|
||||||
|
|
||||||
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
|
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
|
||||||
APP_LDFLAGS := -latomic
|
APP_LDFLAGS := -latomic
|
||||||
|
|
Loading…
Reference in New Issue