Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ad90793 authored by Dan Albert's avatar Dan Albert Committed by Gerrit Code Review
Browse files

Merge "Add support for LOCAL_NDK_STL_VARIANT := none."

parents 30cb36ff 0e2e71dc
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -107,15 +107,16 @@ ifdef LOCAL_SDK_VERSION
  ifeq (,$(LOCAL_NDK_STL_VARIANT))
  ifeq (,$(LOCAL_NDK_STL_VARIANT))
    LOCAL_NDK_STL_VARIANT := system
    LOCAL_NDK_STL_VARIANT := system
  endif
  endif
  ifneq (1,$(words $(filter system stlport_static stlport_shared c++_static c++_shared gnustl_static, $(LOCAL_NDK_STL_VARIANT))))
  ifneq (1,$(words $(filter none system stlport_static stlport_shared c++_static c++_shared gnustl_static, $(LOCAL_NDK_STL_VARIANT))))
    $(error $(LOCAL_PATH): Unknown LOCAL_NDK_STL_VARIANT $(LOCAL_NDK_STL_VARIANT))
    $(error $(LOCAL_PATH): Unknown LOCAL_NDK_STL_VARIANT $(LOCAL_NDK_STL_VARIANT))
  endif
  endif
  ifeq (system,$(LOCAL_NDK_STL_VARIANT))
  ifeq (system,$(LOCAL_NDK_STL_VARIANT))
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/system/include
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/system/include
    # for "system" variant, the shared library exists in the system library and -lstdc++ is added by default.
    my_system_shared_libraries += libstdc++
  else # LOCAL_NDK_STL_VARIANT is not system
  else # LOCAL_NDK_STL_VARIANT is not system
  ifneq (,$(filter stlport_%, $(LOCAL_NDK_STL_VARIANT)))
  ifneq (,$(filter stlport_%, $(LOCAL_NDK_STL_VARIANT)))
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/stlport/stlport
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/stlport/stlport
    my_system_shared_libraries += libstdc++
    ifeq (stlport_static,$(LOCAL_NDK_STL_VARIANT))
    ifeq (stlport_static,$(LOCAL_NDK_STL_VARIANT))
      my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_static.a
      my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(my_cpu_variant)/libstlport_static.a
    else
    else
@@ -134,11 +135,14 @@ ifdef LOCAL_SDK_VERSION
      my_ndk_stl_shared_lib := -lc++_shared
      my_ndk_stl_shared_lib := -lc++_shared
    endif
    endif
    my_ndk_stl_cppflags := -std=c++11
    my_ndk_stl_cppflags := -std=c++11
  else
  else # LOCAL_NDK_STL_VARIANT is not c++_* either
    # LOCAL_NDK_STL_VARIANT is gnustl_static
  ifneq (,$(filter gnustl_%, $(LOCAL_NDK_STL_VARIANT)))
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/include \
    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/include \
                               $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/include
                               $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/include
    my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/libgnustl_static.a
    my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_NDK_GCC_VERSION)/libs/$(my_cpu_variant)/libgnustl_static.a
  else # LOCAL_NDK_STL_VARIANT must be none
    # Do nothing.
  endif
  endif
  endif
  endif
  endif
  endif
  endif
+0 −3
Original line number Original line Diff line number Diff line
@@ -104,9 +104,6 @@ ifneq ($(filter $(my_cxx_stl),libc++ libc++_static),)
    endif
    endif
else ifeq ($(my_cxx_stl),ndk)
else ifeq ($(my_cxx_stl),ndk)
    # Using an NDK STL. Handled in binary.mk.
    # Using an NDK STL. Handled in binary.mk.
    ifndef LOCAL_IS_HOST_MODULE
        my_system_shared_libraries += libstdc++
    endif
else ifeq ($(my_cxx_stl),libstdc++)
else ifeq ($(my_cxx_stl),libstdc++)
    # Using bionic's basic libstdc++. Not actually an STL. Only around until the
    # Using bionic's basic libstdc++. Not actually an STL. Only around until the
    # tree is in good enough shape to not need it.
    # tree is in good enough shape to not need it.