mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
folly: 2026.01.19.00 -> 2026.07.27.00
Diff: https://github.com/facebook/folly/compare/v2026.01.19.00...v2026.07.27.00
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
diff --git a/folly/memory/test/UninitializedMemoryHacksTest.cpp b/folly/memory/test/UninitializedMemoryHacksTest.cpp
|
||||
index 38e27c3..17424af 100644
|
||||
--- a/folly/memory/test/UninitializedMemoryHacksTest.cpp
|
||||
+++ b/folly/memory/test/UninitializedMemoryHacksTest.cpp
|
||||
@@ -283,7 +283,7 @@ TEST(UninitializedMemoryHacks, simpleStringWChar) {
|
||||
}
|
||||
|
||||
TEST(UninitializedMemoryHacks, simpleStringSChar) {
|
||||
- testSimple<std::basic_string<signed char>>();
|
||||
+ testSimple<std::basic_string<char>>();
|
||||
}
|
||||
|
||||
TEST(UninitializedMemoryHacks, simpleVectorChar) {
|
||||
@@ -307,7 +307,7 @@ TEST(UninitializedMemoryHacks, randomStringWChar) {
|
||||
}
|
||||
|
||||
TEST(UninitializedMemoryHacks, randomStringSChar) {
|
||||
- testRandom<std::basic_string<signed char>>();
|
||||
+ testRandom<std::basic_string<char>>();
|
||||
}
|
||||
|
||||
TEST(UninitializedMemoryHacks, randomVectorChar) {
|
||||
@@ -323,5 +323,5 @@ TEST(UninitializedMemoryHacks, randomVectorInt) {
|
||||
}
|
||||
|
||||
// We are deliberately putting this at the bottom to make sure it can follow use
|
||||
-FOLLY_DECLARE_STRING_RESIZE_WITHOUT_INIT(signed char)
|
||||
+//FOLLY_DECLARE_STRING_RESIZE_WITHOUT_INIT(char)
|
||||
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(int)
|
||||
15
pkgs/by-name/fo/folly/cmake-asm-shared-library.patch
Normal file
15
pkgs/by-name/fo/folly/cmake-asm-shared-library.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/folly/external/aor/CMakeLists.txt b/folly/external/aor/CMakeLists.txt
|
||||
index e07e58745..1429f54e9 100644
|
||||
--- a/folly/external/aor/CMakeLists.txt
|
||||
+++ b/folly/external/aor/CMakeLists.txt
|
||||
@@ -20,6 +20,10 @@
|
||||
# Linux ELF directives (.size, etc.) that Darwin's assembler doesn't support
|
||||
if(IS_AARCH64_ARCH)
|
||||
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
|
||||
+endif()
|
||||
+
|
||||
folly_add_library(
|
||||
NAME memcpy_aarch64
|
||||
SRCS
|
||||
@@ -1,18 +0,0 @@
|
||||
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
|
||||
index c72273a73..d0408f2b3 100644
|
||||
--- a/CMake/folly-deps.cmake
|
||||
+++ b/CMake/folly-deps.cmake
|
||||
@@ -61,10 +61,9 @@ if(LIBGFLAGS_FOUND)
|
||||
set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
-find_package(Glog MODULE)
|
||||
-set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
|
||||
-list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY})
|
||||
-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
|
||||
+find_package(Glog CONFIG REQUIRED)
|
||||
+set(FOLLY_HAVE_LIBGLOG True)
|
||||
+list(APPEND FOLLY_LINK_LIBRARIES glog::glog)
|
||||
|
||||
find_package(LibEvent MODULE REQUIRED)
|
||||
list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB})
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/folly/test/MemsetBenchmark.cpp
|
||||
+++ b/folly/test/MemsetBenchmark.cpp
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
template <void* memset_impl(void*, int, size_t)>
|
||||
void bmMemset(void* buf, size_t length, size_t iters) {
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__APPLE__)
|
||||
__asm__ volatile(".align 64\n");
|
||||
#endif
|
||||
#pragma unroll(1)
|
||||
@@ -1,39 +1,8 @@
|
||||
From 9acd1ec8e6890c7f5d86a0dd6941ae3b8692ac9c Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Krenz <lkrenz@nvidia.com>
|
||||
Date: Tue, 20 Jan 2026 05:59:00 -0800
|
||||
Subject: [PATCH] Fix memset/memcpy linkage on aarch64
|
||||
|
||||
Otherwise memcpy and memset benchmarks won't compile
|
||||
---
|
||||
folly/CMakeLists.txt | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt
|
||||
index a1bcbdd6e92..51280821a24 100644
|
||||
index dc77e24731..cd6635ffd6 100644
|
||||
--- a/folly/CMakeLists.txt
|
||||
+++ b/folly/CMakeLists.txt
|
||||
@@ -879,6 +879,9 @@ folly_add_library(
|
||||
NAME memset-impl
|
||||
SRCS
|
||||
FollyMemset.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memset_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memset_aarch64>
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
@@ -894,12 +897,20 @@ folly_add_library(
|
||||
EXCLUDE_FROM_MONOLITH
|
||||
SRCS
|
||||
FollyMemset.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memset_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memset_aarch64-use>
|
||||
+ COMPILE_OPTIONS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:-DFOLLY_MEMSET_IS_MEMSET>
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
@@ -807,6 +807,9 @@
|
||||
NAME memcpy-impl
|
||||
SRCS
|
||||
FollyMemcpy.cpp
|
||||
@@ -43,15 +12,13 @@ index a1bcbdd6e92..51280821a24 100644
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
@@ -915,6 +926,11 @@ folly_add_library(
|
||||
EXCLUDE_FROM_MONOLITH
|
||||
@@ -860,6 +868,9 @@
|
||||
NAME memset-impl
|
||||
SRCS
|
||||
FollyMemcpy.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memcpy_select_aarch64.cpp>
|
||||
FollyMemset.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memset_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memcpy_aarch64-use>
|
||||
+ COMPILE_OPTIONS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:-DFOLLY_MEMCPY_IS_MEMCPY>
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memset_aarch64>
|
||||
)
|
||||
|
||||
# x86 assembly memcpy implementation (not supported on MSVC)
|
||||
folly_add_library(
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "folly";
|
||||
version = "2026.01.19.00";
|
||||
version = "2026.07.27.00";
|
||||
|
||||
# split outputs to reduce downstream closure sizes
|
||||
outputs = [
|
||||
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "facebook";
|
||||
repo = "folly";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-gfmN/9LizPdacUd1eJxFx79I63SwqX0NaWFgbe6vbFk=";
|
||||
hash = "sha256-xxS1FU3thl8UA1DzumVEazelISayLioabFjKlXX67Yk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -134,28 +134,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# `dev` output’s CMake files.
|
||||
./install-test-certs.patch
|
||||
|
||||
# The base template for std::char_traits has been removed in LLVM 19
|
||||
# https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html
|
||||
./char_traits.patch
|
||||
|
||||
# <https://github.com/facebook/folly/issues/2171>
|
||||
./folly-fix-glog-0.7.patch
|
||||
|
||||
# https://github.com/facebook/folly/pull/2561
|
||||
./memset-memcpy-aarch64.patch
|
||||
|
||||
# `.align 64` is invalid on x86_64 Mach-O, where `.align` takes a
|
||||
# power-of-two exponent (64 means 2^64). The guard only excluded
|
||||
# aarch64, so add !__APPLE__ to also skip x86_64-darwin.
|
||||
./memset-benchmark-darwin.patch
|
||||
|
||||
# Use feature detection directly instead of private standard library
|
||||
# macros to detect the presence of ASAN and otherwise fallback to
|
||||
# _not_ having ASAN.
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/facebook/folly/commit/fdde9bc360d525a1b2889b9ba89d671c3a13e72e.patch?full_index=1";
|
||||
hash = "sha256-+1XJRAl4o9YubjqdIgQZpyrMmcb2imBfQUmiHNmFMRE=";
|
||||
})
|
||||
# https://github.com/Homebrew/homebrew-core/blob/1bebfe2c3e393a65c27f3e74f254770219b126f3/Formula/f/folly.rb#L83
|
||||
./cmake-asm-shared-library.patch
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/144170
|
||||
@@ -167,19 +150,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
--replace-fail \
|
||||
${lib.escapeShellArg "\${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"} \
|
||||
'@CMAKE_INSTALL_FULL_INCLUDEDIR@'
|
||||
''
|
||||
# Fix duplicate symbol errors on aarch64-linux caused by both
|
||||
# memcpy_aarch64 and memcpy_aarch64-use (same for memset) being linked
|
||||
# into libfolly.so. Add EXCLUDE_FROM_MONOLITH to -use variants.
|
||||
# https://github.com/facebook/folly/pull/2562
|
||||
+ lib.optionalString stdenv.hostPlatform.isAarch64 ''
|
||||
substituteInPlace folly/external/aor/CMakeLists.txt \
|
||||
--replace-fail \
|
||||
"NAME memcpy_aarch64-use" \
|
||||
"NAME memcpy_aarch64-use EXCLUDE_FROM_MONOLITH" \
|
||||
--replace-fail \
|
||||
"NAME memset_aarch64-use" \
|
||||
"NAME memset_aarch64-use EXCLUDE_FROM_MONOLITH"
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
|
||||
Reference in New Issue
Block a user