build wheel with enable_haswell

This commit is contained in:
xufeihong.xfh 2026-02-27 16:04:27 +08:00
parent 1d5aeeed1d
commit 1333c6aecb
4 changed files with 20 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,7 +5,6 @@ build*
bin/*
lib/*
var/*
thirdparty
venv*
tests/integration/conf/*
tests/de_integration/conf/*

View File

@ -116,6 +116,7 @@ sdist.include = [
[tool.scikit-build.cmake.define]
BUILD_TOOLS = "OFF"
BUILD_PYTHON_BINDINGS = "ON"
CMAKE_VERBOSE_MAKEFILE = "ON"
# Setuptools config for test pypi
[tool.setuptools_scm]
@ -165,7 +166,8 @@ archs = ["auto"]
test-command = "cd {project} && pytest python/tests -v --tb=short"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
skip = "*musllinux*"
skip = ["*-manylinux_i686", "*-musllinux*"]
environment = { CMAKE_ARGS = "-DENABLE_HASWELL=ON" }
[tool.cibuildwheel.macos]
archs = ["arm64"]

View File

@ -1,3 +1,7 @@
set(ROCKSDB_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb-8.1.1)
set(ROCKSDB_PATCH ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb.avx2.patch)
apply_patch_once("rocksdb_fix" "${ROCKSDB_SRC_DIR}" "${ROCKSDB_PATCH}")
set(ROCKSDB_BUILD_SHARED OFF CACHE BOOL "Disable install in rocksdb" FORCE)
set(WITH_TESTS OFF CACHE BOOL "Disable testing in rocksdb" FORCE)

13
thirdparty/rocksdb/rocksdb.avx2.patch vendored Normal file
View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 598c72815..8c34d623b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,7 +294,7 @@ else()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390x" AND NOT HAS_S390X_MARCH_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=z196")
elseif(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64" AND NOT HAS_ARMV8_CRC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=haswell")
endif()
endif()
endif()