Skip to content

Commit

Permalink
bump glog to 0.3.5 (#19890)
Browse files Browse the repository at this point in the history
Summary:
bump glog to 0.3.5.

Version 0.3.4 added support for libc++ or clang. Starting with revision 11, Android NDK recommends and defaults to clang, so it'll add support for it.

notable changes in 0.3.4 and 0.3.5:
* add libc++ support
* reduce dynamic allocation from 3 to 1 per log message
* style fix for C++11
* Add CMake support
Closes #19890

Differential Revision: D8662179

Pulled By: hramos

fbshipit-source-id: ae2554d36e5b922e8649fc2ac7afc273a34cc127
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Jun 27, 2018
1 parent 0d78415 commit b5fca80
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
8 changes: 4 additions & 4 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
// - boost_1_63_0
// - double-conversion-1.1.6
// - folly-deprecate-dynamic-initializer
// - glog-0.3.3
// - glog-0.3.5
// - jsc-headers
def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES")

Expand Down Expand Up @@ -89,18 +89,18 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy
}

task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
src 'https://github.com/google/glog/archive/v0.3.3.tar.gz'
src 'https://github.com/google/glog/archive/v0.3.5.tar.gz'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'glog-0.3.3.tar.gz')
dest new File(downloadsDir, 'glog-0.3.5.tar.gz')
}

// Prepare glog sources to be compiled, this task will perform steps that normally should've been
// executed by automake. This way we can avoid dependencies on make/automake
task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) {
from dependenciesPath ?: tarTree(downloadGlog.dest)
from 'src/main/jni/third-party/glog/'
include 'glog-0.3.3/src/**/*', 'Android.mk', 'config.h'
include 'glog-0.3.5/src/**/*', 'Android.mk', 'config.h'
includeEmptyDirs = false
filesMatching('**/*.h.in') {
filter(ReplaceTokens, tokens: [
Expand Down
18 changes: 9 additions & 9 deletions ReactAndroid/src/main/jni/third-party/glog/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
glog-0.3.3/src/demangle.cc \
glog-0.3.3/src/logging.cc \
glog-0.3.3/src/raw_logging.cc \
glog-0.3.3/src/signalhandler.cc \
glog-0.3.3/src/symbolize.cc \
glog-0.3.3/src/utilities.cc \
glog-0.3.3/src/vlog_is_on.cc
glog-0.3.5/src/demangle.cc \
glog-0.3.5/src/logging.cc \
glog-0.3.5/src/raw_logging.cc \
glog-0.3.5/src/signalhandler.cc \
glog-0.3.5/src/symbolize.cc \
glog-0.3.5/src/utilities.cc \
glog-0.3.5/src/vlog_is_on.cc

LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/

LOCAL_CFLAGS += \
-Wall \
Expand Down
9 changes: 6 additions & 3 deletions ReactAndroid/src/main/jni/third-party/glog/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
/* define if the compiler implements namespaces */
#define HAVE_NAMESPACES 1

/* NDK android-16 provides ssize_t pread(int, void*, size_t, off_t) */
#define HAVE_PREAD 1

/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1

Expand Down Expand Up @@ -132,7 +135,7 @@
#define PACKAGE_NAME "glog"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "glog 0.3.3"
#define PACKAGE_STRING "glog 0.3.5"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "glog"
Expand All @@ -141,7 +144,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.3"
#define PACKAGE_VERSION "0.3.5"

/* How to access the PC from a struct ucontext */
/* #undef PC_FROM_UCONTEXT */
Expand All @@ -163,7 +166,7 @@
#define TEST_SRC_DIR "."

/* Version number of package */
#define VERSION "0.3.3"
#define VERSION "0.3.5"

/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
Expand Down

0 comments on commit b5fca80

Please sign in to comment.