Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[folly] add libunwind back #41699

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ports/folly/fix-libunwind.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index 0702380..984c749 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
@@ -99,6 +99,13 @@ if (BZIP2_FOUND)
list(APPEND FOLLY_LINK_LIBRARIES ${BZIP2_LIBRARIES})
endif()

+find_package(LibUnwind)
+if (LIBUNWIND_FOUND)
+ set(FOLLY_HAVE_LIBUNWIND ON)
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
+endif()
+
find_package(LibLZMA MODULE)
set(FOLLY_HAVE_LIBLZMA ${LIBLZMA_FOUND})
if (LIBLZMA_FOUND)
@@ -166,12 +173,6 @@ if (PYTHON_EXTENSIONS)
find_package(Cython 0.26 REQUIRED)
endif ()

-find_package(LibUnwind)
-if (LIBUNWIND_FOUND)
- set(FOLLY_HAVE_LIBUNWIND ON)
- list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
-endif()
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
list(APPEND FOLLY_LINK_LIBRARIES "execinfo")
endif ()
3 changes: 1 addition & 2 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ vcpkg_from_github(
fix-deps.patch
disable-uninitialized-resize-on-new-stl.patch
fix-unistd-include.patch
fix-libunwind.patch
)

file(REMOVE "${SOURCE_PATH}/CMake/FindFmt.cmake")
Expand All @@ -29,7 +30,6 @@ file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGMock.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGflags.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGlog.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibEvent.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibUnwind.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindSodium.cmake")
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindZstd.cmake")

Expand All @@ -46,7 +46,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"libaio" WITH_libaio
INVERTED_FEATURES
"bzip2" CMAKE_DISABLE_FIND_PACKAGE_BZip2
"lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA
"lz4" CMAKE_DISABLE_FIND_PACKAGE_LZ4
"zstd" CMAKE_DISABLE_FIND_PACKAGE_Zstd
"snappy" CMAKE_DISABLE_FIND_PACKAGE_Snappy
Expand Down
6 changes: 6 additions & 0 deletions ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "folly",
"version-string": "2024.10.14.00",
"port-version": 1,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand All @@ -25,6 +26,11 @@
"gflags",
"glog",
"libevent",
"liblzma",
{
"name": "libunwind",
"platform": "linux"
},
"openssl",
{
"name": "vcpkg-cmake",
Expand Down
1 change: 1 addition & 0 deletions ports/libunwind/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vcpkg_configure_make(
AUTOCONFIG
OPTIONS
--disable-tests
--enable-minidebuginfo
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
Expand Down
7 changes: 5 additions & 2 deletions ports/libunwind/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "libunwind",
"version": "1.8.1",
"port-version": 1,
"port-version": 2,
"description": "Unix libray for portable stack unwinding",
"homepage": "https://www.nongnu.org/libunwind",
"license": "MIT",
"supports": "linux"
"supports": "linux",
"dependencies": [
"liblzma"
]
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@
},
"folly": {
"baseline": "2024.10.14.00",
"port-version": 0
"port-version": 1
},
"font-chef": {
"baseline": "1.1.0",
Expand Down Expand Up @@ -5234,7 +5234,7 @@
},
"libunwind": {
"baseline": "1.8.1",
"port-version": 1
"port-version": 2
},
"liburing": {
"baseline": "2.7",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/folly.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2f7ed360ddd1e7bf4dd0c9b35aaa9a8bd7e3fc92",
"version-string": "2024.10.14.00",
"port-version": 1
},
{
"git-tree": "0cd7435de58f63add1ed638ac479505fbbc3a26d",
"version-string": "2024.10.14.00",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libunwind.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d9bd4526e93e77c007518879e00a2cc163a87d20",
"version": "1.8.1",
"port-version": 2
},
{
"git-tree": "e96e575a728361e6c29a57287a0050ad325e88fb",
"version": "1.8.1",
Expand Down