From 144aff9c636d14f0116423975fa54abae24826df Mon Sep 17 00:00:00 2001 From: ijl Date: Thu, 2 May 2024 13:31:58 +0000 Subject: [PATCH] manylinux_2_17 amd64 uses AVX512VL --- .github/workflows/artifact.yaml | 8 ++++---- script/develop | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/artifact.yaml b/.github/workflows/artifact.yaml index b745f4ea..daf6aa8a 100644 --- a/.github/workflows/artifact.yaml +++ b/.github/workflows/artifact.yaml @@ -74,9 +74,9 @@ jobs: ] env: CC: "clang" - CFLAGS: "-Os -fstrict-aliasing -flto=full" - LDFLAGS: "-fuse-ld=lld -Wl,--as-needed" - RUSTFLAGS: "-C linker=clang -C lto=fat -C link-arg=-fuse-ld=lld -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=4 -D warnings" + CFLAGS: "-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm" + LDFLAGS: "-fuse-ld=lld -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow" + RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld-C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=4 -D warnings" PATH: "/__w/orjson/orjson/.venv/bin:/github/home/.cargo/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" container: image: fedora:41 @@ -105,7 +105,7 @@ jobs: - name: maturin run: | maturin build --release --strip \ - --features=no-panic,unstable-simd,yyjson \ + --features=avx512,no-panic,unstable-simd,yyjson \ --compatibility manylinux_2_17 \ --interpreter python${{ matrix.python.version }} \ --target=x86_64-unknown-linux-gnu diff --git a/script/develop b/script/develop index a4207166..f18bb24c 100755 --- a/script/develop +++ b/script/develop @@ -9,9 +9,9 @@ export LD="${LD:-lld}" echo "CC: ${CC}, LD: ${LD}, LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" -export CFLAGS="-Os -fstrict-aliasing -fno-plt -flto=full" -export LDFLAGS="-fuse-ld=${LD} -Wl,--as-needed" -export RUSTFLAGS="-C linker=${CC} -C lto=fat -C link-arg=-fuse-ld=${LD} -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=8" +export CFLAGS="-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm" +export LDFLAGS="-fuse-ld=${LD} -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow" +export RUSTFLAGS="-C linker=${CC} -C link-arg=-fuse-ld=${LD} -C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=8" maturin build "$@"