[bugfix] Android compile error on arm64 (#20128)

* add --no-warn-shared-textrel only in android/x86

* update comment position
This commit is contained in:
Arnold 2019-09-18 09:21:56 +08:00 committed by minggo
parent f3b09563f8
commit 96ae05d511
1 changed files with 6 additions and 2 deletions

View File

@ -98,8 +98,12 @@ else()
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/cpp-android)
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/cocos/lua-android)
#add `-Wl,--no-warn-shared-textrel` to fix warning "shared library text segment is not shareable clang"
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive -Wl,--no-warn-shared-textrel)
if(${CMAKE_ANDROID_ARCH_ABI} STREQUAL "x86")
#add `-Wl,--no-warn-shared-textrel` to fix warning "shared library text segment is not shareable clang"
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive -Wl,--no-warn-shared-textrel)
else()
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive)
endif()
endif()
target_link_libraries(${APP_NAME} luacocos2d)
target_include_directories(${APP_NAME} PRIVATE Classes)