diff --git a/third-party/boost/CMakeLists.txt b/third-party/boost/CMakeLists.txt index 6f6417a97c6f4..8d74aab40e762 100644 --- a/third-party/boost/CMakeLists.txt +++ b/third-party/boost/CMakeLists.txt @@ -2,7 +2,9 @@ option(FORCE_BUNDLED_BOOST "Always build boost, instead of using system version" OFF) set( BOOST_COMPONENTS + chrono context + date_time fiber filesystem iostreams @@ -11,7 +13,7 @@ set( system thread ) -if(FORCE_BUNDLED_BOOST) +if(FORCE_BUNDLED_BOOST OR CLANG_FORCE_LIBCPP) set(Boost_FOUND false) else() find_package(Boost 1.69.0 COMPONENTS ${BOOST_COMPONENTS}) diff --git a/third-party/boost/b3a59d265929a213f02a451bb6-macos-coalesce-template.patch b/third-party/boost/b3a59d265929a213f02a451bb6-macos-coalesce-template.patch deleted file mode 100644 index ece17df4dd5b7..0000000000000 --- a/third-party/boost/b3a59d265929a213f02a451bb6-macos-coalesce-template.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b3a59d265929a213f02a451bb63cea75d668a4d9 Mon Sep 17 00:00:00 2001 -From: Bo Anderson -Date: Thu, 2 Apr 2020 01:31:47 +0100 -Subject: [PATCH] Fix compiler version check on macOS (#560) - -Fixes #440. ---- - src/tools/darwin.jam | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam -index 8d477410b043207e35c5ecd543aa5680ae66f39d..97e7ecb851303a1f9a759c7801d42922a420a4fa 100644 ---- a/src/tools/darwin.jam -+++ b/src/tools/darwin.jam -@@ -137,13 +137,14 @@ rule init ( version ? : command * : options * : requirement * ) - # - Set the toolset generic common options. - common.handle-options darwin : $(condition) : $(command) : $(options) ; - -+ real-version = [ regex.split $(real-version) \\. ] ; - # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates. -- if $(real-version) < "4.0.0" -+ if [ version.version-less $(real-version) : 4 0 ] - { - flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ; - } - # - GCC 4.2 and higher in Darwin does not have -Wno-long-double. -- if $(real-version) < "4.2.0" -+ if [ version.version-less $(real-version) : 4 2 ] - { - flags darwin.compile OPTIONS $(condition) : -Wno-long-double ; - } diff --git a/third-party/boost/bundled_boost.cmake b/third-party/boost/bundled_boost.cmake index 67fa21b3f0212..a95c9388a38b2 100644 --- a/third-party/boost/bundled_boost.cmake +++ b/third-party/boost/bundled_boost.cmake @@ -1,19 +1,20 @@ -include(ExternalProject) +include(ExternalProject) include(HPHPFunctions) # We usually use SHA512, but given the SHA256 is on the boost.org download # page, use that for transparency/ease of confirmation. SET_HHVM_THIRD_PARTY_SOURCE_ARGS( BOOST_DOWNLOAD_ARGS SOURCE_URL - "https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2" + "https://archives.boost.io/release/1.83.0/source/boost_1_83_0.tar.gz" SOURCE_HASH - "SHA256=4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402" + "SHA256=c0685b68dd44cc46574cce86c4e17c0f611b15e195be9848dfd0769a0a207628" ) set( COMMON_ARGS --prefix= --libdir=/lib ) + set( B2_ARGS ${COMMON_ARGS} @@ -22,9 +23,13 @@ set( variant=release threading=multi runtime-link=static - cxxflags=-std=gnu++14 + cxxstd=${CMAKE_CXX_STANDARD} ) +if (CLANG_FORCE_LIBCPP) + list(APPEND B2_ARGS toolset=clang stdlib=libc++) +endif() + string(REPLACE ";" "," BOOST_COMPONENTS_CSV "${BOOST_COMPONENTS}") # We pass --with-libraires to bootstrap.sh, but that does not consistently # affect b2 @@ -36,12 +41,11 @@ if (APPLE) set(BOOST_CXX_FLAGS "-isysroot${CMAKE_OSX_SYSROOT}") endif() -ExternalProject_Add( +ExternalProject_Add( bundled_boost ${BOOST_DOWNLOAD_ARGS} - PATCH_COMMAND - cd tools/build && patch -p1 < "${CMAKE_CURRENT_SOURCE_DIR}/b3a59d265929a213f02a451bb6-macos-coalesce-template.patch" CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E env CXX=${CMAKE_CXX_COMPILER} CXXFLAGS=${BOOST_CXX_FLAGS} NO_CXX11_CHECK=true # we have c++17 (at least), and the check ignores CXXFLAGS, including `-isysroot` on macos