Initial commit 🎉

fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
This commit is contained in:
Daniel Büchele
2018-04-13 08:38:06 -07:00
committed by Daniel Buchele
commit fbbf8cf16b
659 changed files with 87130 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.doubleconversion">
</manifest>

View File

@@ -0,0 +1,12 @@
cmake_minimum_required (VERSION 3.6.0)
PROJECT(doubleconversion CXX)
enable_language(CXX)
set(PACKAGE_NAME doubleconversion)
set(doubleconversion_DIR double-conversion-3.0.0/double-conversion)
include_directories(${doubleconversion_DIR})
file(GLOB SRCFILES ${doubleconversion_DIR}/*.cc)
message(STATUS "SRC FILES :- " ${SRCFILES})
add_library(${PACKAGE_NAME} SHARED ${SRCFILES})
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
target_link_libraries(${PACKAGE_NAME})

View File

@@ -0,0 +1,34 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile './ApplicationManifest.xml'
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.folly">
</manifest>

View File

@@ -0,0 +1,81 @@
cmake_minimum_required (VERSION 3.6.0)
PROJECT(folly CXX)
enable_language(CXX)
set(PACKAGE_NAME folly)
set(FOLLY_DIR ${PROJECT_SOURCE_DIR}/folly)
list(APPEND dir_list ./)
list(APPEND dir_list ${FOLLY_DIR}/lang)
list(APPEND dir_list ${FOLLY_DIR}/hash/)
list(APPEND dir_list ${FOLLY_DIR}/detail)
list(APPEND dir_list ${FOLLY_DIR}/memory/detail)
set(BOOST_DIR ../boost/boost_1_63_0/)
set(GLOG_DIR ../glog/)
set(DOUBLECONVERSION_DIR ../double-conversion/double-conversion-3.0.0/)
list(APPEND dir_list ${BOOST_DIR})
list(APPEND dir_list ${BOOST_DIR}/../)
include_directories(${dir_list})
add_compile_options(
-DFOLLY_NO_CONFIG=1
-DFOLLY_HAVE_MEMRCHR
-DFOLLY_MOBILE=1
-DFOLLY_USE_LIBCPP=1
-DFOLLY_HAVE_LIBJEMALLOC=0
-DFOLLY_HAVE_PREADV=0
-frtti
-fexceptions
-std=c++14
-Wno-error
-Wno-unused-local-typedefs
-Wno-unused-variable
-Wno-sign-compare
-Wno-comment
-Wno-return-type
-Wno-tautological-constant-compare
)
list(APPEND SRC_FILES ${FOLLY_DIR}/Executor.cpp
${FOLLY_DIR}/lang/ColdClass.cpp
${FOLLY_DIR}/lang/Assume.cpp
${FOLLY_DIR}/json.cpp
${FOLLY_DIR}/Unicode.cpp
${FOLLY_DIR}/Conv.cpp
${FOLLY_DIR}/Demangle.cpp
${FOLLY_DIR}/memory/detail/MallocImpl.cpp
${FOLLY_DIR}/String.cpp
${FOLLY_DIR}/dynamic.cpp
${FOLLY_DIR}/ScopeGuard.cpp
${FOLLY_DIR}/json_pointer.cpp
${FOLLY_DIR}/FormatArg.cpp
${FOLLY_DIR}/Format.cpp
)
add_library(${PACKAGE_NAME} SHARED ${SRC_FILES})
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
set(libglog_build_DIR ${build_DIR}/libglog/${ANDROID_ABI})
set(doubleconversion_build_DIR ${build_DIR}/doubleconversion/${ANDROID_ABI})
file(MAKE_DIRECTORY ${build_DIR})
add_subdirectory(${GLOG_DIR} ${libglog_build_DIR})
add_subdirectory(${DOUBLECONVERSION_DIR} ${doubleconversion_build_DIR})
target_include_directories(${PACKAGE_NAME} PRIVATE
${BOOST_DIR}
${BOOST_DIR}/../
${GLOG_DIR}/../
${GLOG_DIR}/glog-0.3.5/src/
${DOUBLECONVERSION_DIR})
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
target_link_libraries(${PACKAGE_NAME} glog double-conversion)

39
android/third-party/Folly/build.gradle vendored Normal file
View File

@@ -0,0 +1,39 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile './ApplicationManifest.xml'
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
dependencies {
implementation project(':glog')
implementation project(':doubleconversion')
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.glog">
</manifest>

45
android/third-party/glog/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,45 @@
cmake_minimum_required (VERSION 3.6.0)
PROJECT(glog CXX)
enable_language(CXX)
set(PACKAGE_NAME glog)
set(glog_DIR glog-0.3.5)
list(APPEND dir_list ./../)
list(APPEND dir_list ./)
list(APPEND dir_list ${glog_DIR}/)
list(APPEND dir_list ${glog_DIR}/src)
list(APPEND dir_list ${glog_DIR}/glog)
list(APPEND dir_list ${glog_DIR}/base)
message(STATUS "dir_list = " ${dir_list})
include_directories(${dir_list})
add_compile_options(
-std=c++11
-Wno-macro-redefined
-Wno-macro-redefined
-Wall
-Wwrite-strings
-Woverloaded-virtual
-Wno-sign-compare
-DNDEBUG
-g
-O2
-D_START_GOOGLE_NAMESPACE_="namespace google {"
-D_END_GOOGLE_NAMESPACE_="}"
)
list(APPEND src_files ${glog_DIR}/src/demangle.cc
${glog_DIR}/src/logging.cc
${glog_DIR}/src/raw_logging.cc
${glog_DIR}/src/signalhandler.cc
${glog_DIR}/src/symbolize.cc
${glog_DIR}/src/utilities.cc
${glog_DIR}/src/vlog_is_on.cc
)
add_library(${PACKAGE_NAME} SHARED ${src_files})
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
target_link_libraries(${PACKAGE_NAME})

34
android/third-party/glog/build.gradle vendored Normal file
View File

@@ -0,0 +1,34 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile './ApplicationManifest.xml'
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
}

179
android/third-party/glog/config.h vendored Normal file
View File

@@ -0,0 +1,179 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* define if glog doesn't use RTTI */
#define DISABLE_RTTI 1
/* Namespace for Google classes */
#define GOOGLE_NAMESPACE google
/* Define if you have the `dladdr' function */
#define HAVE_DLADDR 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef HAVE_EXECINFO_H */
/* Define if you have the `fcntl' function */
#define HAVE_FCNTL 1
/* Define to 1 if you have the <glob.h> header file. */
/* #undef HAVE_GLOB_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
/* #undef HAVE_LIBPTHREAD */
/* Define to 1 if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* define if you have google gflags library */
/* #undef HAVE_LIB_GFLAGS */
/* define if you have google gmock library */
/* #undef HAVE_LIB_GMOCK */
/* define if you have google gtest library */
/* #undef HAVE_LIB_GTEST */
/* define if you have libunwind */
/* #undef HAVE_LIB_UNWIND */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* define if the compiler implements namespaces */
#define HAVE_NAMESPACES 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* define if the compiler implements pthread_rwlock_* */
#define HAVE_RWLOCK 1
/* Define if you have the `sigaltstack' function */
#define HAVE_SIGALTSTACK 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syscall.h> header file. */
/* #undef HAVE_SYSCALL_H */
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/ucontext.h> header file. */
/* #undef HAVE_SYS_UCONTEXT_H */
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the <ucontext.h> header file. */
/* #undef HAVE_UCONTEXT_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <unwind.h> header file. */
#define HAVE_UNWIND_H 1
/* define if the compiler supports using expression for operator */
#define HAVE_USING_OPERATOR 1
/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1
/* define if your compiler has __builtin_expect */
#define HAVE___BUILTIN_EXPECT 1
/* define if your compiler has __sync_val_compare_and_swap */
#define HAVE___SYNC_VAL_COMPARE_AND_SWAP 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "glog"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "opensource@google.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "glog"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "glog 0.3.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "glog"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.3"
/* How to access the PC from a struct ucontext */
/* #undef PC_FROM_UCONTEXT */
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std
/* location of source code */
#define TEST_SRC_DIR "."
/* Version number of package */
#define VERSION "0.3.3"
/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {
/* TODO(vjn/dreiss): revisit these when use the android-21 (or newer) NDK platform. */
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_LINUX
#undef OS_MACOSX

2088
android/third-party/glog/logging.cc vendored Normal file

File diff suppressed because it is too large Load Diff