Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
fd9be76
Add mvfst and usdt dependencies
mszabo-wikia Dec 28, 2024
3515414
Fix thrift build
mszabo-wikia Dec 28, 2024
93c45a3
IWYU: add missing includes to hphp/util
mszabo-wikia Dec 28, 2024
f0bc903
Fix phph/hhbbc/index.cpp compilation
mszabo-wikia Dec 28, 2024
f996652
IWYU: fix boost include in hphp/compiler/systemlib.cpp
mszabo-wikia Dec 28, 2024
99a98ea
Update OCaml stubs
mszabo-wikia Dec 28, 2024
086ff9b
Remove nonexistent actions runner label
mszabo-wikia Dec 28, 2024
059d2eb
Require the ldap package
mszabo-wikia Dec 28, 2024
36ce34a
Provide OCaml env vars for ocamlrep crate
mszabo-wikia Dec 28, 2024
ace5c39
IWYU: Add missing cstdint include to hdf.h
mszabo-wikia Dec 28, 2024
1a55dae
Update folly patches
mszabo-wikia Dec 28, 2024
84486d6
IWYU: Add missing cstdint include to fcall-args-flags.h
mszabo-wikia Dec 28, 2024
5a2b838
Fix hhbc-unit.h generation
mszabo-wikia Apr 14, 2025
3d66e79
Use system libraries for xxhash, lz4 and double-conversion
mszabo-wikia Dec 28, 2024
3d97225
Use vendored fast_float library for folly
mszabo-wikia Dec 28, 2024
93a1b07
Don't build squangle and mcrouter for OSS for now
mszabo-wikia Dec 28, 2024
c92d575
Add missing extension dependencies
mszabo-wikia Dec 28, 2024
24d51f9
hack: skip building blake3 hash for now
mszabo-wikia Dec 28, 2024
27efb4c
Disable more broken extensions
mszabo-wikia Dec 28, 2024
9212ae2
Allow building with system lz4
mszabo-wikia Dec 28, 2024
a15579a
Fix spammy -Winconsistent-override in transport.h
mszabo-wikia Dec 28, 2024
b5ae689
Fix TBB clang patch
mszabo-wikia Dec 28, 2024
07379f1
Attempt to workaround build races
mszabo-wikia Dec 28, 2024
839cbc2
Install and force libc++ for the OSS build
mszabo-wikia Dec 29, 2024
299068a
Silence spammy 'non-local-definitions' rust lint
mszabo-wikia Dec 29, 2024
cabfc5e
Use LLVM 17 to satisfy C++20 requirements
mszabo-wikia Dec 29, 2024
ca2c383
Build xed since it's now required
mszabo-wikia Dec 29, 2024
f418b40
Parallelize the folly build
mszabo-wikia Dec 29, 2024
3db6915
Update Fizz patches
mszabo-wikia Dec 29, 2024
9c97b1a
Update third-party GitHub actions
mszabo-wikia Dec 30, 2024
92c3c88
Switch CI from Focal to Jammy
mszabo-wikia Dec 31, 2024
3466e13
Use single Rust staticlib for FFI
mszabo-wikia Dec 31, 2024
321cd75
Use underlying type for formatting HPHP::jit::Opcode to fix debug build
mszabo-wikia Jan 3, 2025
2f99d38
Ensure Rust commands execute after OPAM setup
mszabo-wikia Jan 3, 2025
09e9e47
Generate config headers from configs.specification
mszabo-wikia Dec 28, 2024
95b7a01
Add missing dependencies for gd and lmdb extensions
mszabo-wikia Jan 3, 2025
e1d07c6
Link fizz against liboqs transitively if it was found
mszabo-wikia Jan 3, 2025
242cbc3
Pass CMAKE_CXX_FLAGS to tbb
mszabo-wikia Jan 3, 2025
c144ab4
Add missing 'long long' rr::serialize() specialization
mszabo-wikia Jan 3, 2025
e002738
support new libdwarfp API
mszabo-wikia Jan 5, 2025
50e4df8
Fix tc-print link order
mszabo-wikia Jan 5, 2025
474ae3c
Fix compilation error with OpenSSL 3
Atry Nov 2, 2022
53aa9b7
Update systemlib generation to support precompiled systemlibs
mszabo-wikia Dec 28, 2024
5d4762e
Use an Ubuntu 24.04 CI
mszabo-wikia Jan 5, 2025
9a023a4
Fix ocamlrep_marshal dune lock
mszabo-wikia Jan 5, 2025
90b810e
Use Opensource Team-approved runner label
mszabo-wikia Jan 6, 2025
aa3abe7
Fix tc-print subdirectory load order
mszabo-wikia Jan 6, 2025
b56ae79
Switch back to RelWithDebInfo builds after stabilizing CI
mszabo-wikia Jan 7, 2025
58e2dda
Stabilize ocaml build
mszabo-wikia Feb 1, 2025
d6661c8
Update mvfst submodule ref
mszabo-wikia Feb 1, 2025
dc1a6e1
Lowercase fizz reference
mszabo-wikia Feb 2, 2025
d839dbd
Undefine a MySQL constant until the client is updated
mszabo-wikia Feb 10, 2025
7e1fc34
Remove outdated Squangle patches
mszabo-wikia Feb 10, 2025
ac279e3
Use C++20 for building Squangle
mszabo-wikia Feb 12, 2025
47e2a31
Forward CMAKE_CXX_STANDARD to fizz, mvfst and wangle
mszabo-wikia Feb 13, 2025
a30e4b9
Remove SSE4.2 and AVX2 toggles in favor of march=x86-64-v3
mszabo-wikia Feb 14, 2025
fa27811
Add sandcastle module dependency
mszabo-wikia Mar 13, 2025
41b9f94
Add diagnostics stub
mszabo-wikia Mar 18, 2025
499677c
Update mvfst submodule
mszabo-wikia Mar 18, 2025
b191511
Update to Rust 1.87
mszabo-wikia Apr 14, 2025
35aeb8d
Stub DeclarationsRewriter.rename_decls
mszabo-wikia Apr 14, 2025
f1703e5
Update cargo lockfile
mszabo-wikia Mar 18, 2025
0d0209f
Include cxxabi and libunwind headers in unique-stubs.cpp
mszabo-wikia Apr 15, 2025
1c2bbd5
Drop unused headers
mszabo-wikia May 13, 2025
119abac
Fix OCaml stubs
mszabo-wikia May 15, 2025
050b928
Add libbpf dependency
mszabo-wikia May 16, 2025
7d5f537
Silence noisy nontrivial-memcall diagnostic on clang 20
mszabo-wikia May 16, 2025
421d99e
See whether we can build on a regular runner without debug info
mszabo-wikia Jun 3, 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
Prev Previous commit
Next Next commit
Remove SSE4.2 and AVX2 toggles in favor of march=x86-64-v3
  • Loading branch information
mszabo-wikia committed Jun 3, 2025
commit a30e4b91b200bd5835cb33344f3112977da6c4d4
27 changes: 2 additions & 25 deletions CMake/HPHPCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,8 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
endif()

if (IS_X64)
# For unclear reasons, our detection for what crc32 intrinsics you have
# will cause Apple clang to ICE. Specifying a baseline here works around
# the issue. (SSE4.2 has been available on processors for quite some time now.)
if(ENABLE_SSE4_2 OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
list(APPEND GENERAL_CXX_OPTIONS
# SSE4.2 has been available on processors for quite some time now. This
# allows enabling CRC hash function code
"msse4.2"
)
# Also pass the right option to ASM files to avoid inconsistencies
# in CRC hash function handling
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -msse4.2")
endif()
list(APPEND GENERAL_CXX_OPTIONS "march=x86-64-v3")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=x86-64-v3")
endif()

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang") # using Clang
Expand Down Expand Up @@ -285,13 +274,6 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -${opt}")
endforeach()

# The ASM part of this makes it more effort than it's worth
# to add these to the general flags system.
if(ENABLE_AVX2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx2 -march=core-avx2")
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++
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")
Expand Down Expand Up @@ -349,11 +331,6 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
list(APPEND MSVC_GENERAL_OPTIONS "MP")
endif()

# Enable AVX2 codegen if available and requested.
if (ENABLE_AVX2)
list(APPEND MSVC_GENERAL_OPTIONS "arch:AVX2")
endif()

# Validate, and then add the favored architecture.
if (NOT MSVC_FAVORED_ARCHITECTURE STREQUAL "blend" AND NOT MSVC_FAVORED_ARCHITECTURE STREQUAL "AMD64" AND NOT MSVC_FAVORED_ARCHITECTURE STREQUAL "INTEL64" AND NOT MSVC_FAVORED_ARCHITECTURE STREQUAL "ATOM")
message(FATAL_ERROR "MSVC_FAVORED_ARCHITECTURE must be set to one of exactly, 'blend', 'AMD64', 'INTEL64', or 'ATOM'! Got '${MSVC_FAVORED_ARCHITECTURE}' instead!")
Expand Down
41 changes: 8 additions & 33 deletions CMake/HPHPFindLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -442,39 +442,14 @@ macro(hphp_link target)
target_link_libraries(${target} ${VISIBILITY} dbghelp.lib dnsapi.lib)
endif()

# Check whether atomic operations require -latomic or not
# See https://github.com/facebook/hhvm/issues/5217
include(CheckCXXSourceCompiles)
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS "-std=c++1y")
CHECK_CXX_SOURCE_COMPILES("
#include <atomic>
#include <iostream>
#include <stdint.h>
int main() {
struct Test { int64_t val1; int64_t val2; };
std::atomic<Test> s;
// Do this to stop modern compilers from optimizing away the libatomic
// calls in release builds, making this test always pass in release builds,
// and incorrectly think that HHVM doesn't need linking against libatomic.
bool (std::atomic<Test>::* volatile x)(void) const =
&std::atomic<Test>::is_lock_free;
std::cout << (s.*x)() << std::endl;
}
" NOT_REQUIRE_ATOMIC_LINKER_FLAG)

if(NOT "${NOT_REQUIRE_ATOMIC_LINKER_FLAG}")
message(STATUS "-latomic is required to link hhvm")
find_library(ATOMIC_LIBRARY NAMES atomic libatomic.so.1)
if (ATOMIC_LIBRARY STREQUAL "ATOMIC_LIBRARY-NOTFOUND")
# -latomic should be available for gcc even when libatomic.so.1 is not
# in the library search path
target_link_libraries(${target} ${VISIBILITY} atomic)
else()
target_link_libraries(${target} ${VISIBILITY} ${ATOMIC_LIBRARY})
endif()
endif()
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
find_library(ATOMIC_LIBRARY NAMES atomic libatomic.so.1)
if (ATOMIC_LIBRARY STREQUAL "ATOMIC_LIBRARY-NOTFOUND")
# -latomic should be available for gcc even when libatomic.so.1 is not
# in the library search path
target_link_libraries(${target} ${VISIBILITY} atomic)
else()
target_link_libraries(${target} ${VISIBILITY} ${ATOMIC_LIBRARY})
endif()

if (ENABLE_XED)
if (LibXed_FOUND)
Expand Down
4 changes: 1 addition & 3 deletions CMake/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
option(ALWAYS_ASSERT "Enabled asserts in a release build" OFF)
option(ENABLE_SSP "Enabled GCC/LLVM stack-smashing protection" OFF)
option(STATIC_CXX_LIB "Statically link libstd++ and libgcc." OFF)
option(ENABLE_AVX2 "Enable the use of AVX2 instructions" OFF)
option(ENABLE_AARCH64_CRC "Enable the use of CRC instructions" OFF)
option(ENABLE_FASTCGI "Enable the FastCGI interface." ON)
option(ENABLE_SSE4_2 "Enable SSE4.2 supported code." OFF)

option(EXECUTION_PROFILER "Enable the execution profiler" OFF)

Expand Down Expand Up @@ -44,7 +42,7 @@ option(ENABLE_PROXYGEN_SERVER "Build the Proxygen HTTP server" ON)
option(ENABLE_SPLIT_DWARF "Reduce linker memory usage by putting debugging information into .dwo files" OFF)

IF (LINUX)
option(MAP_TEXT_HUGE_PAGES "Remap hot static code onto huge pages" ON)
option(MAP_TEXT_HUGE_PAGES "Remap hot static code onto huge pages" ON)
ENDIF()

IF (NOT DEFAULT_CONFIG_DIR)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if(NOT SKIP_CCACHE)
message(STATUS "Found ccache: ${CCACHE_FOUND} - enabling ccache as compiler wrapper")
else()
message(STATUS "Found ccache - ccache already in use as C and/or CXX compiler wrapper")
endif()
endif()
endif(CCACHE_FOUND)
endif(NOT SKIP_CCACHE)

Expand Down
2 changes: 0 additions & 2 deletions hphp/util/hphp-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
*/

#ifdef USE_CMAKE
#cmakedefine ENABLE_AVX2 1
#cmakedefine ENABLE_AARCH64_CRC 1
#cmakedefine EXECUTION_PROFILER 1
#else
/* #undef ENABLE_AVX2 */
/* #undef ENABLE_AARCH64_CRC */
/* #undef EXECUTION_PROFILER */
#endif
Expand Down
2 changes: 1 addition & 1 deletion hphp/util/memset-x64-avx2.S
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ETCH_LABEL(more_than_63bytes):
addq %rax, %rcx
subq %rax, %rdx
je ETCH_LABEL(EXIT_MEMSET)

ETCH_ALIGN8
ETCH_ALIGN4
ETCH_LABEL(128byte_loop_data_guzzler):
Expand Down
7 changes: 0 additions & 7 deletions third-party/folly/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ get_filename_component(BOOST_LIBRARY_DIR "${FIRST_LIB}" DIRECTORY)
set(FOLLY_CXXFLAGS "-I${JEMALLOC_INCLUDE_DIR} -I${CMAKE_CURRENT_LIST_DIR}/include")
message(STATUS "FOLLY_CXXFLAGS: ${FOLLY_CXXFLAGS}")

if(ENABLE_SSE4_2 OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
if(IS_X64)
message(STATUS "Enabling SSE 4.2 for bundled folly")
set(FOLLY_CXXFLAGS "${FOLLY_CXXFLAGS} -msse4.2")
endif()
endif()

ExternalProject_add(
bundled_folly
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/
Expand Down