flags to build mapsmobi projects for Android
@@ -5982,8 +5982,37 @@ when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT:"
YANDEX_EXPORT=__attribute__((visibility(\"default\")))
+ when ($BT_RELEASE || $BT_RELWITHDEBINFO) {
STRIP=yes
+ }
LDFLAGS+=-lc++_shared
+
+ CFLAGS+=-DANDROID -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fvisibility=hidden -Wa,--noexecstack
+ CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare
+
+ LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now
+ # Unless the problem of build of opensll for Android platform is completely solved
+ # -Wl,--no-undefined
+
+ when ($BT_RELEASE || $BT_RELWITHDEBINFO) {
+ CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -Oz
+ LDFLAGS+=-Wl,--gc-sections
+ }
+
+ when ($ARCH_ARM7) {
+ CFLAGS+=-mfpu=vfpv3-d16 -mfloat-abi=softfp
+ }
+ elsewhen ($ARCH_ARM64) {
+ }
+ elsewhen ($ARCH_I386) {
+ CFLAGS+=-fstrict-aliasing -mstackrealign
+ }
+ elsewhen ($ARCH_X86_64) {
+ CFLAGS+=-fstrict-aliasing -mstackrealign -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel
+ }
+ otherwise {
+ PEERDIR+=__unsupported_architecture_for_android__
+ }
}
when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) {
QT_REQUIRED=yes
