diff --git a/android/third-party/native.gradle b/android/third-party/native.gradle index ccc07535e..7da80076d 100644 --- a/android/third-party/native.gradle +++ b/android/third-party/native.gradle @@ -4,7 +4,7 @@ import org.apache.tools.ant.filters.ReplaceTokens // Increment this when making changes to any of the native // dependencies. // !!! -final def CACHE_REVISION = 0 +final def CACHE_REVISION = 1 final def externalDir = new File("$projectDir/external") final def downloadsDir = new File("$buildDir/downloads") @@ -109,7 +109,7 @@ task prepareBoost(dependsOn: [downloadBoost], type: Copy) { } 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 overwrite false dest new File(downloadsDir, 'folly-' + getDownloadFileName(src)) @@ -119,14 +119,21 @@ task prepareFolly(dependsOn: [downloadFolly], type: Copy) { onlyIf { isCacheOutOfDate(CACHE_REVISION) } from tarTree(downloadFolly.dest) from './overrides/Folly/' - include 'folly-2018.06.18.00/folly/**/*', 'build.gradle', 'CMakeLists.txt', 'ApplicationManifest.xml' - eachFile { it.path = it.path - "folly-2018.06.18.00/" } + include 'folly-2018.09.10.00/folly/**/*', 'build.gradle', 'CMakeLists.txt', 'ApplicationManifest.xml' + eachFile { it.path = it.path - "folly-2018.09.10.00/" } includeEmptyDirs = false into "$externalDir/folly" } //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/' include 'AsyncServerSocket.cpp' into "$externalDir/folly/folly/io/async/" diff --git a/android/third-party/overrides/Folly/CMakeLists.txt b/android/third-party/overrides/Folly/CMakeLists.txt index 5e9b7f482..635432281 100644 --- a/android/third-party/overrides/Folly/CMakeLists.txt +++ b/android/third-party/overrides/Folly/CMakeLists.txt @@ -106,8 +106,8 @@ list(APPEND SRC_FILES ${FOLLY_DIR}/io/async/HHWheelTimer.cpp ${FOLLY_DIR}/dynamic.cpp ${FOLLY_DIR}/ScopeGuard.cpp ${FOLLY_DIR}/json_pointer.cpp - ${FOLLY_DIR}/FormatArg.cpp ${FOLLY_DIR}/Format.cpp + ${FOLLY_DIR}/String.cpp ${FOLLY_DIR}/memory/detail/MallocImpl.cpp ) diff --git a/android/third-party/overrides/Folly/Demangle.h b/android/third-party/overrides/Folly/Demangle.h new file mode 100644 index 000000000..fab2eb79c --- /dev/null +++ b/android/third-party/overrides/Folly/Demangle.h @@ -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 + +// #if __has_include() +// #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