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

Fix OSS build #9564

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0866078
Add mvfst and usdt dependencies
mszabo-wikia Dec 28, 2024
f83f13f
Fix thrift build
mszabo-wikia Dec 28, 2024
46fe23b
Update extension count
mszabo-wikia Dec 28, 2024
f9d5dd0
IWYU: add missing includes to hphp/util
mszabo-wikia Dec 28, 2024
0e03388
Fix phph/hhbbc/index.cpp compilation
mszabo-wikia Dec 28, 2024
97cf9fd
IWYU: fix boost include in hphp/compiler/systemlib.cpp
mszabo-wikia Dec 28, 2024
2e555c8
Update OCaml stubs
mszabo-wikia Dec 28, 2024
0fa7512
Update filepaths in extension listfiles
mszabo-wikia Dec 28, 2024
cda6c11
Remove nonexistent actions runner label
mszabo-wikia Dec 28, 2024
14e0749
Require the ldap package
mszabo-wikia Dec 28, 2024
d25b39c
Remove nonexistent dso_tests reference
mszabo-wikia Dec 28, 2024
766008a
Provide OCaml env vars for ocamlrep crate
mszabo-wikia Dec 28, 2024
64c6d2f
IWYU: Add missing cstdint include to hdf.h
mszabo-wikia Dec 28, 2024
4419904
Update folly patches
mszabo-wikia Dec 28, 2024
d27a6fc
IWYU: Add missing cstdint include to fcall-args-flags.h
mszabo-wikia Dec 28, 2024
8055f81
Fix hhbc-unit.h generation
mszabo-wikia Dec 28, 2024
f352ab2
Use system libraries for xxhash, lz4 and double-conversion
mszabo-wikia Dec 28, 2024
04a4660
Use vendored fast_float library for folly
mszabo-wikia Dec 28, 2024
e77a04e
Don't build squangle and mcrouter for OSS for now
mszabo-wikia Dec 28, 2024
7290d9b
Add missing extension dependencies
mszabo-wikia Dec 28, 2024
132f8fc
hack: skip building blake3 hash for now
mszabo-wikia Dec 28, 2024
ae29d1f
Fix HPHP::Facts::Clock formatter compat with newer libfmt
mszabo-wikia Dec 28, 2024
800b443
Disable more broken extensions
mszabo-wikia Dec 28, 2024
4c7e91d
Allow building with system lz4
mszabo-wikia Dec 28, 2024
390f761
Fix spammy -Winconsistent-override in transport.h
mszabo-wikia Dec 28, 2024
b8b465d
Fix TBB clang patch
mszabo-wikia Dec 28, 2024
ae3f4bd
Attempt to workaround build races
mszabo-wikia Dec 28, 2024
09fe5ae
Install and force libc++ for the OSS build
mszabo-wikia Dec 29, 2024
4699b6e
Silence spammy 'non-local-definitions' rust lint
mszabo-wikia Dec 29, 2024
5e4bc35
Use LLVM 17 to satisfy C++20 requirements
mszabo-wikia Dec 29, 2024
8f22b09
Build xed since it's now required
mszabo-wikia Dec 29, 2024
9d5f7a3
Parallelize the folly build
mszabo-wikia Dec 29, 2024
2eb494f
Update Fizz patches
mszabo-wikia Dec 29, 2024
6f7ff2c
Update third-party GitHub actions
mszabo-wikia Dec 30, 2024
b67021b
Switch CI from Focal to Jammy
mszabo-wikia Dec 31, 2024
20a8cbd
Use single Rust staticlib for FFI
mszabo-wikia Dec 31, 2024
5e568d8
Use underlying type for formatting HPHP::jit::Opcode to fix debug build
mszabo-wikia Jan 3, 2025
5c70a9b
Ensure Rust commands execute after OPAM setup
mszabo-wikia Jan 3, 2025
c3e100f
Generate config headers from configs.specification
mszabo-wikia Dec 28, 2024
cd03d04
Add missing dependencies for gd and lmdb extensions
mszabo-wikia Jan 3, 2025
678b95c
Link fizz against liboqs transitively if it was found
mszabo-wikia Jan 3, 2025
21c4954
Exclude Meta-specific code in ext/fb
mszabo-wikia Jan 3, 2025
2a99c95
Register missing sources and headers in ext/decl and ext/facts
mszabo-wikia Jan 3, 2025
89e6efc
Pass CMAKE_CXX_FLAGS to tbb
mszabo-wikia Jan 3, 2025
b1e66f9
Add missing 'long long' rr::serialize() specialization
mszabo-wikia Jan 3, 2025
8b42162
Add missing tc-print source file
mszabo-wikia Jan 3, 2025
8ff6d6a
support new libdwarfp API
mszabo-wikia Jan 5, 2025
b3c5bd1
Fix tc-print link order
mszabo-wikia Jan 5, 2025
33fc103
Fix compilation error with OpenSSL 3
Atry Nov 2, 2022
3af63d6
Update systemlib generation to support precompiled systemlibs
mszabo-wikia Dec 28, 2024
e5d04e5
Use an Ubuntu 24.04 CI
mszabo-wikia Jan 5, 2025
889c78c
Fix ocamlrep_marshal dune lock
mszabo-wikia Jan 5, 2025
23abcef
Use Opensource Team-approved runner label
mszabo-wikia Jan 6, 2025
2d72fe6
Fix tc-print subdirectory load order
mszabo-wikia Jan 6, 2025
e229af1
Switch back to RelWithDebInfo builds after stabilizing CI
mszabo-wikia Jan 7, 2025
9e626dd
Add simplelock ext
mszabo-wikia Jan 15, 2025
d79bc97
Unset -fno-operator-names for Folly/boost compat
mszabo-wikia Jan 23, 2025
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
22 changes: 8 additions & 14 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,16 @@ env:

jobs:
build_ubuntu_focal_nightly:
runs-on: 16-core
runs-on: 8-core-ubuntu
container:
image: ubuntu:focal
image: ubuntu:noble
env:
DISTRO: ubuntu-20.04-focal
DISTRO: ubuntu-24.04-noble
IS_NIGHTLY: 1
CLANG_VERSION: 12
CLANG_VERSION: 18
steps:
- name: Installing dependencies to bootstrap env
run: apt update -y && apt install -y git wget lsb-release software-properties-common gpg
- name: Installing llvm
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
# Note: Keep this version in sync with the one in the Debian control file.
./llvm.sh ${CLANG_VERSION}
run: apt update -y && apt install -y git wget lsb-release software-properties-common gpg clang clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev
- name: Making LLVM the default compiler
run: |
if [ -f /etc/alternatives/cc ]
Expand All @@ -53,19 +47,19 @@ jobs:
then
update-alternatives --remove-all c++
fi

update-alternatives --install /usr/bin/cc cc /usr/bin/clang++-${CLANG_VERSION} 500
update-alternatives --set cc /usr/bin/clang++-${CLANG_VERSION}
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 500
update-alternatives --set c++ /usr/bin/clang++-${CLANG_VERSION}
- name: Fetching HHVM and its submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Installing HHVM deps and building HHVM
run: ci/bin/make-debianish-package
- name: Uploading artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: out-directory
path: ${{ env.OUT }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ install_manifest.txt
/hphp/hack/test/.mypy_cache
/hphp/util/generated-hhjs-babel-transform.txt

# Generated core systemlib
/hphp/runtime/ext/core/ext_core.php

# CPack
CPackConfig.cmake
CPackSourceConfig.cmake
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
[submodule "xed-xed"]
path = third-party/xed/xed
url = https://github.com/intelxed/xed.git
[submodule "third-party/mvfst/src"]
path = third-party/mvfst/src
url = https://github.com/facebook/mvfst.git
67 changes: 52 additions & 15 deletions CMake/FindLibDwarf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,72 @@ endif (LIBDWARF_LIBRARIES AND LIBDWARF_INCLUDE_DIRS)
find_package(PkgConfig)
pkg_check_modules(PkgConfig_LibDwarf QUIET libdwarf)

set(
LIBDWARF_INCLUDE_PATHS
${PkgConfig_LibDwarf_INCLUDE_DIRS}
/usr/include
/usr/include/libdwarf
/usr/local/include
/usr/local/include/libdwarf
/opt/local/include
/sw/include
)

find_path (DWARF_INCLUDE_DIR
NAMES
libdwarf.h dwarf.h
PATHS
${PkgConfig_LibDwarf_INCLUDE_DIRS}
/usr/include
/usr/include/libdwarf
/usr/local/include
/usr/local/include/libdwarf
/opt/local/include
/sw/include
${LIBDWARF_INCLUDE_PATHS}
ENV CPATH) # PATH and INCLUDE will also work

if (DWARF_INCLUDE_DIR)
set (LIBDWARF_INCLUDE_DIRS ${DWARF_INCLUDE_DIR})
endif ()

set(LIBDWARF_LIBRARY_NAMES dwarf libdwarf)

find_path (LIBDWARF_PRODUCER_PATHS
NAMES
libdwarfp.h
PATHS
${LIBDWARF_INCLUDE_PATHS}
ENV CPATH
)

set(
LIBDWARF_LIBRARY_PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
${PkgConfig_LibDwarf_LIBRARY_DIRS}
ENV LIBRARY_PATH # PATH and LIB will also work
ENV LD_LIBRARY_PATH
)

if (LIBDWARF_PRODUCER_PATHS)
set(LIBDWARF_USE_NEW_PRODUCER_API 1)
else()
set(LIBDWARF_USE_NEW_PRODUCER_API 0)
endif()

find_library (LIBDWARF_LIBRARIES
NAMES
dwarf libdwarf
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
${PkgConfig_LibDwarf_LIBRARY_DIRS}
ENV LIBRARY_PATH # PATH and LIB will also work
ENV LD_LIBRARY_PATH)
include (FindPackageHandleStandardArgs)
${LIBDWARF_LIBRARY_PATHS})

if (LIBDWARF_USE_NEW_PRODUCER_API)
find_library (LIBDWARFP_LIBRARIES
NAMES
dwarfp libdwarfp
PATHS
${LIBDWARF_LIBRARY_PATHS})

list(PREPEND LIBDWARF_LIBRARIES ${LIBDWARFP_LIBRARIES})
endif()

include (FindPackageHandleStandardArgs)

# handle the QUIETLY and REQUIRED arguments and set LIBDWARF_FOUND to TRUE
# if all listed variables are TRUE
Expand Down Expand Up @@ -127,3 +163,4 @@ endif()
mark_as_advanced(LIBDW_INCLUDE_DIR DWARF_INCLUDE_DIR)
mark_as_advanced(LIBDWARF_INCLUDE_DIRS LIBDWARF_LIBRARIES)
mark_as_advanced(LIBDWARF_CONST_NAME LIBDWARF_USE_INIT_C)
mark_as_advanced(LIBDWARF_USE_NEW_PRODUCER_API)
23 changes: 23 additions & 0 deletions CMake/FindLibheif.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
if(LIBHEIF_FOUND)
set(LIBHEIF_FIND_QUIETLY TRUE)
endif()

find_path(LIBHEIF_INCLUDE_DIR
NAMES heif.h
PATH_SUFFIXES libheif
PATHS /usr/include /usr/local/include /usr/pkg/include
)

find_library(LIBHEIF_LIBRARY
NAMES heif
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)

if(LIBHEIF_INCLUDE_DIR AND LIBHEIF_LIBRARY)
set(LIBHEIF_FOUND TRUE)
endif()

mark_as_advanced(
LIBHEIF_INCLUDE_DIR
LIBHEIF_LIBRARY
)
17 changes: 17 additions & 0 deletions CMake/FindLmdb.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if(LMDB_FOUND)
set(LMDB_FIND_QUIETLY TRUE)
endif()

find_path(LMDB_INCLUDE_DIR
NAMES lmdb.h
PATHS /usr/include /usr/local/include /usr/pkg/include
)

find_library(LMDB_LIBRARY
NAMES lmdb
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)

if(LMDB_INCLUDE_DIR AND LMDB_LIBRARY)
set(LMDB_FOUND TRUE)
endif()
22 changes: 22 additions & 0 deletions CMake/HHVMExtensionConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,17 @@ function (HHVM_EXTENSION_INTERNAL_HANDLE_LIBRARY_DEPENDENCY extensionID dependen
HHVM_EXTENSION_INTERNAL_ADD_LINK_LIBRARIES(${GMP_LIBRARY})
HHVM_EXTENSION_INTERNAL_ADD_DEFINES("-DHAVE_LIBGMP")
endif()
elseif (${libraryName} STREQUAL "heif")
find_package(Libheif ${requiredVersion} REQUIRED)
if (NOT LIBHEIF_INCLUDE_DIR OR NOT LIBHEIF_LIBRARY)
HHVM_EXTENSION_INTERNAL_SET_FAILED_DEPENDENCY(${extensionID} ${dependencyName})
return()
endif()

if (${addPaths})
HHVM_EXTENSION_INTERNAL_ADD_INCLUDE_DIRS(${LIBHEIF_INCLUDE_DIR})
HHVM_EXTENSION_INTERNAL_ADD_LINK_LIBRARIES(${LIBHEIF_LIBRARY})
endif()
elseif (${libraryName} STREQUAL "iconv")
find_package(Libiconv ${requiredVersion})
if (NOT LIBICONV_INCLUDE_DIR)
Expand Down Expand Up @@ -863,6 +874,17 @@ function (HHVM_EXTENSION_INTERNAL_HANDLE_LIBRARY_DEPENDENCY extensionID dependen
HHVM_EXTENSION_INTERNAL_ADD_LINK_LIBRARIES(${LDAP_LIBRARIES})
HHVM_EXTENSION_INTERNAL_ADD_DEFINES("-DHAVE_LIBLDAP")
endif()
elseif (${libraryName} STREQUAL "lmdb")
find_package(Lmdb ${requiredVersion} REQUIRED)
if (NOT LMDB_INCLUDE_DIR OR NOT LMDB_LIBRARY)
HHVM_EXTENSION_INTERNAL_SET_FAILED_DEPENDENCY(${extensionID} ${dependencyName})
return()
endif()

if (${addPaths})
HHVM_EXTENSION_INTERNAL_ADD_INCLUDE_DIRS(${LMDB_INCLUDE_DIR})
HHVM_EXTENSION_INTERNAL_ADD_LINK_LIBRARIES(${LMDB_LIBRARY})
endif()
elseif (${libraryName} STREQUAL "magickwand")
find_package(LibMagickWand ${requiredVersion})
if (NOT LIBMAGICKWAND_INCLUDE_DIRS OR NOT LIBMAGICKWAND_LIBRARIES OR NOT LIBMAGICKCORE_LIBRARIES)
Expand Down
62 changes: 62 additions & 0 deletions CMake/HHVMRenderConfigSpecification.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Generate C++ source files and headers from doc/configs.specification
# using the generate_configs tool.
#
# Supported arguments:
# TARGET: The target to add the generated files to.
# TYPE: An output type supported by generate_configs ("hackc", "defs" or "loader").
# OUTPUT_PATH: The directory where the generated files will be placed.
function (HHVM_RENDER_CONFIG_SPECIFICATION TARGET)
cmake_parse_arguments("HHVM_RENDER_CONFIG_SPEC" "" "TYPE;OUTPUT_PATH" "" ${ARGN})

get_target_property(CARGO_EXE cargo LOCATION)
get_target_property(RUSTC_EXE rustc LOCATION)

execute_process(
COMMAND python3 ${CMAKE_SOURCE_DIR}/hphp/tools/configs/get_config_sections.py ${CMAKE_SOURCE_DIR}/hphp/doc/configs.specification
OUTPUT_VARIABLE HHVM_RENDER_CONFIG_SPEC_CONFIG_SECTIONS
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if ("${HHVM_RENDER_CONFIG_SPEC_TYPE}" STREQUAL "hackc")
list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/options_gen.h)
elseif("${HHVM_RENDER_CONFIG_SPEC_TYPE}" STREQUAL "loader")
foreach(SECTION ${HHVM_RENDER_CONFIG_SPEC_CONFIG_SECTIONS})
list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/${SECTION}-loader.h)
list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/${SECTION}-loader.cpp)
endforeach()

list(
APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS
${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/repo-global-data-generated.h
${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/unit-cache-generated.h
${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/repo-option-flags-generated.h
)

list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/configs-generated.cpp)
elseif("${HHVM_RENDER_CONFIG_SPEC_TYPE}" STREQUAL "defs")
foreach(SECTION ${HHVM_RENDER_CONFIG_SPEC_CONFIG_SECTIONS})
list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/${SECTION}.h)
list(APPEND HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}/${SECTION}.cpp)
endforeach()
else()
message(FATAL_ERROR "Invalid output type: ${HHVM_RENDER_CONFIG_SPEC_TYPE}")
endif()

set(HHVM_RENDER_CONFIG_SPEC_CARGO_HOME ${CMAKE_BINARY_DIR}/hphp/tools/configs/.cargo)

add_custom_command(
OUTPUT ${HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES} ${HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS}
COMMAND ${CMAKE_COMMAND} -E make_directory ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH}
COMMAND ${CMAKE_COMMAND} -E env RUSTC=${RUSTC_EXE} CARGO_HOME=${HHVM_RENDER_CONFIG_SPEC_CARGO_HOME}
${CARGO_EXE} run --quiet -- ${HHVM_RENDER_CONFIG_SPEC_TYPE} ${HHVM_RENDER_CONFIG_SPEC_OUTPUT_PATH} ${CMAKE_SOURCE_DIR}/hphp/doc/configs.specification
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/hphp/tools/configs
DEPENDS ${CMAKE_SOURCE_DIR}/hphp/doc/configs.specification rustc cargo
VERBATIM
)

add_custom_target(hhvm_render_config_section_${HHVM_RENDER_CONFIG_SPEC_TYPE}
DEPENDS ${HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES} ${HHVM_RENDER_CONFIG_SPEC_CONFIG_HEADERS})

add_dependencies(${TARGET} hhvm_render_config_section_${HHVM_RENDER_CONFIG_SPEC_TYPE})
target_sources(${TARGET} PRIVATE ${HHVM_RENDER_CONFIG_SPEC_CONFIG_SOURCES})
endfunction()
9 changes: 4 additions & 5 deletions CMake/HPHPCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
list(APPEND GENERAL_CXX_OPTIONS
"std=gnu++1z"
"fno-omit-frame-pointer"
"fno-operator-names"
"Wall"
"Werror=format-security"
"Wno-unused-variable"
Expand Down Expand Up @@ -166,7 +165,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9)
list(APPEND GENERAL_OPTIONS "fno-delete-null-pointer-checks")
else()
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.9 or greater.")
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.9 or greater.")
endif()

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.4)
Expand All @@ -175,7 +174,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.3 OR
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 11.3)
message(WARNING "HHVM is primarily tested on GCC 7.4-11.3. Using other versions may produce unexpected results, or may not even build at all.")
message(WARNING "HHVM is primarily tested on GCC 7.4-11.3. Using other versions may produce unexpected results, or may not even build at all.")
endif()

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1 OR
Expand Down Expand Up @@ -293,11 +292,11 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2 -march=core-avx2")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mavx2 -march=core-avx2")
endif()
# using Intel C++
# using Intel C++
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -w")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -fno-omit-frame-pointer -Wall -Woverloaded-virtual -Wno-deprecated -w1 -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names")
# using Visual Studio C++
# using Visual Studio C++
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
message(WARNING "MSVC support is VERY experimental. It will likely not compile, and is intended for the utterly insane.")

Expand Down
21 changes: 16 additions & 5 deletions CMake/HPHPFindLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ if (FASTLZ_INCLUDE_DIR)
include_directories(${FASTLZ_INCLUDE_DIR})
endif()

# ldap
find_package(Ldap)

# ICU
find_package(ICU REQUIRED)
if (ICU_FOUND)
Expand Down Expand Up @@ -235,6 +238,10 @@ if (NOT WINDOWS)
add_definitions("-DLIBDWARF_USE_INIT_C")
endif()

if (LIBDWARF_USE_NEW_PRODUCER_API)
add_definitions("-DLIBDWARF_USE_NEW_PRODUCER_API")
endif()

find_package(LibElf REQUIRED)
include_directories(${LIBELF_INCLUDE_DIRS})
if (ELF_GETSHDRSTRNDX)
Expand Down Expand Up @@ -271,6 +278,10 @@ if (APPLE)
find_library(KERBEROS_LIB NAMES gssapi_krb5)
endif()

if (LINUX)
find_package(LibUnwind REQUIRED)
endif()

# This is required by Homebrew's libc. See
# https://github.com/facebook/hhvm/pull/5728#issuecomment-124290712
# for more info.
Expand Down Expand Up @@ -332,6 +343,10 @@ macro(hphp_link target)
target_link_libraries(${target} ${VISIBILITY} ${CURL_LIBRARIES})
target_link_libraries(${target} ${VISIBILITY} glog)

if (LINUX)
target_link_libraries(${target} ${VISIBILITY} ${LIBUNWIND_LIBRARIES})
endif()

if (LIBINOTIFY_LIBRARY)
target_link_libraries(${target} ${VISIBILITY} ${LIBINOTIFY_LIBRARY})
endif()
Expand Down Expand Up @@ -408,11 +423,7 @@ macro(hphp_link target)
target_link_libraries(${target} ${VISIBILITY} fizz)
target_link_libraries(${target} ${VISIBILITY} brotli)
target_link_libraries(${target} ${VISIBILITY} hhbc_ast_header)
target_link_libraries(${target} ${VISIBILITY} compiler_ffi)
target_link_libraries(${target} ${VISIBILITY} package_ffi)
target_link_libraries(${target} ${VISIBILITY} parser_ffi)
target_link_libraries(${target} ${VISIBILITY} hhvm_types_ffi)
target_link_libraries(${target} ${VISIBILITY} hhvm_hhbc_defs_ffi)
target_link_libraries(${target} ${VISIBILITY} hack_rust_ffi_bridge)

target_link_libraries(${target} ${VISIBILITY} tbb)

Expand Down
Loading