[build] use optional polyfill on Android, and upgrade to NDK r19

<experimental/optional> is not available anymore in newer STL versions, e.g. according to libc++'s TS deprecation policy: https://libcxx.llvm.org/TS_deprecation.html
This commit is contained in:
Konstantin Käfer
2018-10-08 16:09:35 +03:00
parent d0e7326e5d
commit d53c7860cd
4 changed files with 11 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ workflows:
- android-arm-v7-template:
name: android-gnustl-arm-v7
stl: gnustl_shared
image: android-ndk-r17c:1d5db0eb34
- android-release:
filters:
tags:
@@ -519,8 +520,11 @@ jobs:
stl:
type: string
default: "c++_static"
image:
type: string
default: android-ndk-r19:8e91a7ebab
docker:
- image: mbgl/android-ndk-r17c:dd161efed6
- image: mbgl/<< parameters.image >>
resource_class: large
working_directory: /src
environment:
@@ -582,7 +586,7 @@ jobs:
# ------------------------------------------------------------------------------
android-release:
docker:
- image: mbgl/android-ndk-r17c:dd161efed6
- image: mbgl/android-ndk-r19:8e91a7ebab
resource_class: large
working_directory: /src
environment:

View File

@@ -139,6 +139,7 @@ target_include_directories(example-custom-layer
)
target_link_libraries(example-custom-layer
PRIVATE optional
PRIVATE -llog
PRIVATE -lGLESv2
)

View File

@@ -4,7 +4,7 @@ ext {
minSdkVersion : 14,
targetSdkVersion : 27,
compileSdkVersion: 27,
buildToolsVersion: '27.0.3'
buildToolsVersion: '28.0.3'
]
versions = [

View File

@@ -1,9 +1,8 @@
add_library(optional INTERFACE)
# This polyfill is really only needed for
# Windows. We need to be careful to not leak
# it into any of our public interfaces.
if(WIN32)
# This polyfill is needed for Windows and Android since these standard libraries don't ship with
# usable versions of <experimental/optional>
if(WIN32 OR MBGL_PLATFORM STREQUAL "android")
target_include_directories(optional SYSTEM INTERFACE
${CMAKE_SOURCE_DIR}/vendor/optional/include
)