Update Folly version

Summary: Updated Folly version for android

Reviewed By: passy

Differential Revision: D9754662

fbshipit-source-id: 487a2cab4114e42672a431edfdfbe79bdb412076
This commit is contained in:
Pritesh Nandgaonkar
2018-09-11 04:36:59 -07:00
committed by Facebook Github Bot
parent 39c933afc5
commit ea840e230e
3 changed files with 49 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
// Increment this when making changes to any of the native // Increment this when making changes to any of the native
// dependencies. // dependencies.
// !!! // !!!
final def CACHE_REVISION = 0 final def CACHE_REVISION = 1
final def externalDir = new File("$projectDir/external") final def externalDir = new File("$projectDir/external")
final def downloadsDir = new File("$buildDir/downloads") final def downloadsDir = new File("$buildDir/downloads")
@@ -109,7 +109,7 @@ task prepareBoost(dependsOn: [downloadBoost], type: Copy) {
} }
task downloadFolly(dependsOn: createNativeDepsDirectories, type: Download) { task downloadFolly(dependsOn: createNativeDepsDirectories, type: Download) {
src 'https://github.com/facebook/folly/archive/v2018.06.18.00.tar.gz' src 'https://github.com/facebook/folly/archive/v2018.09.10.00.tar.gz'
onlyIfNewer true onlyIfNewer true
overwrite false overwrite false
dest new File(downloadsDir, 'folly-' + getDownloadFileName(src)) dest new File(downloadsDir, 'folly-' + getDownloadFileName(src))
@@ -119,14 +119,21 @@ task prepareFolly(dependsOn: [downloadFolly], type: Copy) {
onlyIf { isCacheOutOfDate(CACHE_REVISION) } onlyIf { isCacheOutOfDate(CACHE_REVISION) }
from tarTree(downloadFolly.dest) from tarTree(downloadFolly.dest)
from './overrides/Folly/' from './overrides/Folly/'
include 'folly-2018.06.18.00/folly/**/*', 'build.gradle', 'CMakeLists.txt', 'ApplicationManifest.xml' include 'folly-2018.09.10.00/folly/**/*', 'build.gradle', 'CMakeLists.txt', 'ApplicationManifest.xml'
eachFile { it.path = it.path - "folly-2018.06.18.00/" } eachFile { it.path = it.path - "folly-2018.09.10.00/" }
includeEmptyDirs = false includeEmptyDirs = false
into "$externalDir/folly" into "$externalDir/folly"
} }
//TODO: Get rid off this hack. //TODO: Get rid off this hack.
task finalizeFolly(dependsOn: [prepareFolly], type: Copy) { task finalizeFollyWithDemangle(dependsOn: [prepareFolly], type: Copy) {
from './overrides/Folly/'
include 'Demangle.h'
into "$externalDir/folly/folly/detail/"
}
//TODO: Get rid off this hack.
task finalizeFolly(dependsOn: [finalizeFollyWithDemangle], type: Copy) {
from './overrides/Folly/' from './overrides/Folly/'
include 'AsyncServerSocket.cpp' include 'AsyncServerSocket.cpp'
into "$externalDir/folly/folly/io/async/" into "$externalDir/folly/folly/io/async/"

View File

@@ -106,8 +106,8 @@ list(APPEND SRC_FILES ${FOLLY_DIR}/io/async/HHWheelTimer.cpp
${FOLLY_DIR}/dynamic.cpp ${FOLLY_DIR}/dynamic.cpp
${FOLLY_DIR}/ScopeGuard.cpp ${FOLLY_DIR}/ScopeGuard.cpp
${FOLLY_DIR}/json_pointer.cpp ${FOLLY_DIR}/json_pointer.cpp
${FOLLY_DIR}/FormatArg.cpp
${FOLLY_DIR}/Format.cpp ${FOLLY_DIR}/Format.cpp
${FOLLY_DIR}/String.cpp
${FOLLY_DIR}/memory/detail/MallocImpl.cpp ${FOLLY_DIR}/memory/detail/MallocImpl.cpp
) )

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <cstddef>
// #if __has_include(<demangle.h>)
// #define FOLLY_DETAIL_HAVE_DEMANGLE_H 1
// #else
#define FOLLY_DETAIL_HAVE_DEMANGLE_H 0
// #endif
namespace folly {
namespace detail {
extern int cplus_demangle_v3_callback_wrapper(
char const* mangled,
void (*cbref)(char const*, std::size_t, void*),
void* opaque);
} // namespace detail
} // namespace folly