Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
100e6f0
Add mvfst and usdt dependencies
mszabo-wikia Dec 28, 2024
bd28a6d
Fix thrift build
mszabo-wikia Dec 28, 2024
a89cab9
IWYU: add missing includes to hphp/util
mszabo-wikia Dec 28, 2024
e835042
Fix phph/hhbbc/index.cpp compilation
mszabo-wikia Dec 28, 2024
daf5e8f
IWYU: fix boost include in hphp/compiler/systemlib.cpp
mszabo-wikia Dec 28, 2024
b04b9de
Update OCaml stubs
mszabo-wikia Dec 28, 2024
37bedcf
Remove nonexistent actions runner label
mszabo-wikia Dec 28, 2024
b6c729c
Require the ldap package
mszabo-wikia Dec 28, 2024
d8e4227
Provide OCaml env vars for ocamlrep crate
mszabo-wikia Dec 28, 2024
a242505
IWYU: Add missing cstdint include to hdf.h
mszabo-wikia Dec 28, 2024
cf1e500
Update folly patches
mszabo-wikia Dec 28, 2024
160bb31
IWYU: Add missing cstdint include to fcall-args-flags.h
mszabo-wikia Dec 28, 2024
e48eca6
Fix hhbc-unit.h generation
mszabo-wikia Apr 14, 2025
f628311
Use system libraries for xxhash, lz4 and double-conversion
mszabo-wikia Dec 28, 2024
0fc5180
Use vendored fast_float library for folly
mszabo-wikia Dec 28, 2024
3fff398
Don't build squangle and mcrouter for OSS for now
mszabo-wikia Dec 28, 2024
8e7978f
Add missing extension dependencies
mszabo-wikia Dec 28, 2024
c7ebb9c
hack: skip building blake3 hash for now
mszabo-wikia Dec 28, 2024
5d0b9cc
Fix HPHP::Facts::Clock formatter compat with newer libfmt
mszabo-wikia Dec 28, 2024
1944a3d
Disable more broken extensions
mszabo-wikia Dec 28, 2024
0fe5118
Allow building with system lz4
mszabo-wikia Dec 28, 2024
7fd1fae
Fix spammy -Winconsistent-override in transport.h
mszabo-wikia Dec 28, 2024
c5836c6
Fix TBB clang patch
mszabo-wikia Dec 28, 2024
fc008e4
Attempt to workaround build races
mszabo-wikia Dec 28, 2024
a5b799a
Install and force libc++ for the OSS build
mszabo-wikia Dec 29, 2024
447d474
Silence spammy 'non-local-definitions' rust lint
mszabo-wikia Dec 29, 2024
b19d4d7
Use LLVM 17 to satisfy C++20 requirements
mszabo-wikia Dec 29, 2024
5c2e46e
Build xed since it's now required
mszabo-wikia Dec 29, 2024
61ba31e
Parallelize the folly build
mszabo-wikia Dec 29, 2024
a95f96a
Update Fizz patches
mszabo-wikia Dec 29, 2024
2d3e1a4
Update third-party GitHub actions
mszabo-wikia Dec 30, 2024
61fbbb6
Switch CI from Focal to Jammy
mszabo-wikia Dec 31, 2024
9bde7ca
Use single Rust staticlib for FFI
mszabo-wikia Dec 31, 2024
1bf9336
Use underlying type for formatting HPHP::jit::Opcode to fix debug build
mszabo-wikia Jan 3, 2025
6c72d83
Ensure Rust commands execute after OPAM setup
mszabo-wikia Jan 3, 2025
d83bea7
Generate config headers from configs.specification
mszabo-wikia Dec 28, 2024
50fd553
Add missing dependencies for gd and lmdb extensions
mszabo-wikia Jan 3, 2025
05bce3c
Link fizz against liboqs transitively if it was found
mszabo-wikia Jan 3, 2025
2f0537b
Pass CMAKE_CXX_FLAGS to tbb
mszabo-wikia Jan 3, 2025
f4adc41
Add missing 'long long' rr::serialize() specialization
mszabo-wikia Jan 3, 2025
0d048aa
support new libdwarfp API
mszabo-wikia Jan 5, 2025
a191e1d
Fix tc-print link order
mszabo-wikia Jan 5, 2025
d78103d
Fix compilation error with OpenSSL 3
Atry Nov 2, 2022
2c852c6
Update systemlib generation to support precompiled systemlibs
mszabo-wikia Dec 28, 2024
8b7b7dc
Use an Ubuntu 24.04 CI
mszabo-wikia Jan 5, 2025
aa261e8
Fix ocamlrep_marshal dune lock
mszabo-wikia Jan 5, 2025
111aaea
Use Opensource Team-approved runner label
mszabo-wikia Jan 6, 2025
f69bcc8
Fix tc-print subdirectory load order
mszabo-wikia Jan 6, 2025
d961623
Switch back to RelWithDebInfo builds after stabilizing CI
mszabo-wikia Jan 7, 2025
eb738bd
Stabilize ocaml build
mszabo-wikia Feb 1, 2025
6d6bc93
Update mvfst submodule ref
mszabo-wikia Feb 1, 2025
c5eb5ae
Lowercase fizz reference
mszabo-wikia Feb 2, 2025
28a73ad
Undefine a MySQL constant until the client is updated
mszabo-wikia Feb 10, 2025
bbc894d
Remove outdated Squangle patches
mszabo-wikia Feb 10, 2025
3ed54e1
Use C++20 for building Squangle
mszabo-wikia Feb 12, 2025
1fcf206
Forward CMAKE_CXX_STANDARD to fizz, mvfst and wangle
mszabo-wikia Feb 13, 2025
ac9c2e3
Remove SSE4.2 and AVX2 toggles in favor of march=x86-64-v3
mszabo-wikia Feb 14, 2025
3983f8a
Add sandcastle module dependency
mszabo-wikia Mar 13, 2025
89cf837
Add diagnostics stub
mszabo-wikia Mar 18, 2025
fad39e0
Update mvfst submodule
mszabo-wikia Mar 18, 2025
ff447bf
Update to Rust 1.87
mszabo-wikia Apr 14, 2025
8c55b2d
Stub DeclarationsRewriter.rename_decls
mszabo-wikia Apr 14, 2025
a9622e4
Update cargo lockfile
mszabo-wikia Mar 18, 2025
0b1d1a3
Include cxxabi and libunwind headers in unique-stubs.cpp
mszabo-wikia Apr 15, 2025
97cd6cb
Drop unused headers
mszabo-wikia May 13, 2025
bb5397d
Fix OCaml stubs
mszabo-wikia May 15, 2025
ebbeaab
Add libbpf dependency
mszabo-wikia May 16, 2025
5a8b8f9
Silence noisy nontrivial-memcall diagnostic on clang 20
mszabo-wikia May 16, 2025
d1d7c5f
Try to use a new runner label
mszabo-wikia May 29, 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 May 29, 2025
commit ac9c2e3d5bae32fb14d27b8321ee8b1bb9e401cc
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