浏览代码

Merge pull request #30966 from akien-mga/android-remove-stl-no

Android: Remove unusable android_stl=no option
Rémi Verschelde 6 年之前
父节点
当前提交
5544ea4a17
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      platform/android/detect.py

+ 6 - 5
platform/android/detect.py

@@ -28,7 +28,6 @@ def get_opts():
         ('ndk_platform', 'Target platform (android-<api>, e.g. "android-18")', "android-18"),
         ('ndk_platform', 'Target platform (android-<api>, e.g. "android-18")', "android-18"),
         EnumVariable('android_arch', 'Target architecture', "armv7", ('armv7', 'arm64v8', 'x86', 'x86_64')),
         EnumVariable('android_arch', 'Target architecture', "armv7", ('armv7', 'arm64v8', 'x86', 'x86_64')),
         BoolVariable('android_neon', 'Enable NEON support (armv7 only)', True),
         BoolVariable('android_neon', 'Enable NEON support (armv7 only)', True),
-        BoolVariable('android_stl', 'Enable Android STL support (for modules)', True)
     ]
     ]
 
 
 
 
@@ -207,11 +206,13 @@ def configure(env):
 
 
     ## Compile flags
     ## Compile flags
 
 
+    env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"])
+    env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
+    env.Append(CXXFLAGS=["-std=gnu++14"])
+
     # Disable exceptions and rtti on non-tools (template) builds
     # Disable exceptions and rtti on non-tools (template) builds
-    if env['tools'] or env['android_stl']:
-        env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"])
-        env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
-        env.Append(CXXFLAGS=['-frtti', "-std=gnu++14"])
+    if env['tools']:
+        env.Append(CXXFLAGS=['-frtti'])
     else:
     else:
         env.Append(CXXFLAGS=['-fno-rtti', '-fno-exceptions'])
         env.Append(CXXFLAGS=['-fno-rtti', '-fno-exceptions'])
         # Don't use dynamic_cast, necessary with no-rtti.
         # Don't use dynamic_cast, necessary with no-rtti.