Android Platfrom libbase => libc++
old platform/system/core/base/Android.mk
# Device
# ------------------------------------------------------------------------------
include $(CLEAR_VARS)
LOCAL_MODULE := libbase
LOCAL_CLANG := true
LOCAL_SRC_FILES := $(libbase_src_files)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CPPFLAGS := $(libbase_cppflags)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := libcutils
LOCAL_MULTILIB := both
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libbase
LOCAL_CLANG := true
LOCAL_WHOLE_STATIC_LIBRARIES := libbase
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
# ------------------------------------------------------------------------------
include $(CLEAR_VARS)
LOCAL_MODULE := libbase
LOCAL_CLANG := true
LOCAL_SRC_FILES := $(libbase_src_files)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CPPFLAGS := $(libbase_cppflags)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := libcutils
LOCAL_MULTILIB := both
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libbase
LOCAL_CLANG := true
LOCAL_WHOLE_STATIC_LIBRARIES := libbase
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
new platform/system/core/base/Android.bp
cc_library_static {
name: "libbase_ndk",
defaults: ["libbase_defaults"],
sdk_version: "current",
stl: "c++_static",
export_include_dirs: ["include"],
static_libs: ["fmtlib_ndk"],
whole_static_libs: ["fmtlib_ndk"],
export_static_lib_headers: ["fmtlib_ndk"],
}
name: "libbase_ndk",
defaults: ["libbase_defaults"],
sdk_version: "current",
stl: "c++_static",
export_include_dirs: ["include"],
static_libs: ["fmtlib_ndk"],
whole_static_libs: ["fmtlib_ndk"],
export_static_lib_headers: ["fmtlib_ndk"],
}
Android 10 platform/system/core/base/Android.bp
cc_library_static {
name: "libbase_ndk",
defaults: ["libbase_defaults"],
sdk_version: "current",
stl: "c++_static",
export_include_dirs: ["include"],
}
name: "libbase_ndk",
defaults: ["libbase_defaults"],
sdk_version: "current",
stl: "c++_static",
export_include_dirs: ["include"],
}
Android 10 platform/external/libcxx/Android.bp
// host + device dynamic libcc_library_shared {
name: "libc++",
host_supported: true,
vendor_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
recovery_available: true,
whole_static_libs: ["libc++_static"],
stl: "none",
target: {
android_arm: {
static_libs: ["libunwind_llvm"],
ldflags: ["-Wl,--exclude-libs,libunwind_llvm.a"],
},
darwin: {
unexported_symbols_list: "lib/libc++unexp.exp",
force_symbols_not_weak_list: "lib/notweak.exp",
force_symbols_weak_list: "lib/weak.exp",
ldflags: [
"-nodefaultlibs",
"-Wl,-undefined,dynamic_lookup",
],
},
linux_glibc: {
ldflags: ["-nodefaultlibs"],
},
linux_bionic: {
enabled: true,
},
},
}
留言
張貼留言