diff --git a/android/build.gradle b/android/build.gradle index 8df7904384..dc6788c230 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -188,8 +188,9 @@ android { cmake { version '3.8.0+' - cppFlags '-fexceptions', '-frtti', '-std=c++17' - cFlags '-ffunction-sections', '-fdata-sections', + cppFlags '-fexceptions', '-frtti' + // There is no sense to enable sections without gcc's --gc-sections flag. + cFlags '-fno-function-sections', '-fno-data-sections', '-Wno-extern-c-compat' arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', "-DOS=$osName", '-DSKIP_TESTS=ON', "-DUSE_PCH=$pchFlag"