Skip to content

Commit d7982c7

Browse files
committed
Update and fix bundled boost build
1 parent 5b5465a commit d7982c7

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

third-party/boost/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
option(FORCE_BUNDLED_BOOST "Always build boost, instead of using system version" OFF)
33
set(
44
BOOST_COMPONENTS
5+
chrono
56
context
7+
date_time
68
fiber
79
filesystem
810
iostreams
@@ -11,7 +13,7 @@ set(
1113
system
1214
thread
1315
)
14-
if(FORCE_BUNDLED_BOOST)
16+
if(FORCE_BUNDLED_BOOST OR CLANG_FORCE_LIBCPP)
1517
set(Boost_FOUND false)
1618
else()
1719
find_package(Boost 1.69.0 COMPONENTS ${BOOST_COMPONENTS})

third-party/boost/bundled_boost.cmake

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
include(ExternalProject)
1+
include(ExternalProject)
22
include(HPHPFunctions)
33
# We usually use SHA512, but given the SHA256 is on the boost.org download
44
# page, use that for transparency/ease of confirmation.
55
SET_HHVM_THIRD_PARTY_SOURCE_ARGS(
66
BOOST_DOWNLOAD_ARGS
77
SOURCE_URL
8-
"https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2"
8+
"https://archives.boost.io/release/1.83.0/source/boost_1_83_0.tar.gz"
99
SOURCE_HASH
10-
"SHA256=4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402"
10+
"SHA256=c0685b68dd44cc46574cce86c4e17c0f611b15e195be9848dfd0769a0a207628"
1111
)
1212
set(
1313
COMMON_ARGS
1414
--prefix=<INSTALL_DIR>
1515
--libdir=<INSTALL_DIR>/lib
1616
)
17+
1718
set(
1819
B2_ARGS
1920
${COMMON_ARGS}
@@ -22,9 +23,13 @@ set(
2223
variant=release
2324
threading=multi
2425
runtime-link=static
25-
cxxflags=-std=gnu++14
26+
cxxstd=${CMAKE_CXX_STANDARD}
2627
)
2728

29+
if (CLANG_FORCE_LIBCPP)
30+
list(APPEND B2_ARGS toolset=clang stdlib=libc++)
31+
endif()
32+
2833
string(REPLACE ";" "," BOOST_COMPONENTS_CSV "${BOOST_COMPONENTS}")
2934
# We pass --with-libraires to bootstrap.sh, but that does not consistently
3035
# affect b2
@@ -36,12 +41,11 @@ if (APPLE)
3641
set(BOOST_CXX_FLAGS "-isysroot${CMAKE_OSX_SYSROOT}")
3742
endif()
3843

39-
ExternalProject_Add(
44+
ExternalProject_Add(
4045
bundled_boost
4146
${BOOST_DOWNLOAD_ARGS}
42-
PATCH_COMMAND
43-
cd tools/build && patch -p1 < "${CMAKE_CURRENT_SOURCE_DIR}/b3a59d265929a213f02a451bb6-macos-coalesce-template.patch"
4447
CONFIGURE_COMMAND
48+
${CMAKE_COMMAND} -E env
4549
CXX=${CMAKE_CXX_COMPILER}
4650
CXXFLAGS=${BOOST_CXX_FLAGS}
4751
NO_CXX11_CHECK=true # we have c++17 (at least), and the check ignores CXXFLAGS, including `-isysroot` on macos

0 commit comments

Comments
 (0)