From a1dccc74b480477acaa17e21dde706c159c56b48 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Mon, 7 Aug 2023 05:40:47 -0400 Subject: [PATCH] enable common CPU performance features without going totally target-cpu=native these features should be universally available for the platforms [skip ci] --- .github/workflows/publish-nightly.yml | 10 ++++++++-- .github/workflows/publish.yml | 13 +++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index 2f4477b1e..68c1ae0ca 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -37,6 +37,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma # - os: ubuntu-latest # os-name: linux # target: x86_64-unknown-linux-musl @@ -52,6 +53,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 - os: windows-latest os-name: windows target: x86_64-pc-windows-gnu @@ -60,6 +62,7 @@ jobs: default-features: --no-default-features addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 - os: macos-latest os-name: macos target: x86_64-apple-darwin @@ -68,6 +71,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 steps: - name: Installing Rust toolchain @@ -91,6 +95,8 @@ jobs: - name: Build qsv-nightly # env: # RUSTFLAGS: --emit=asm + env: + RUSTFLAGS: ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build @@ -99,7 +105,7 @@ jobs: args: --profile release-nightly --bin qsv -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable,nightly ${{ matrix.job.default-features }} - name: Build qsvlite-nightly env: - RUSTFLAGS: --emit=asm + RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build @@ -108,7 +114,7 @@ jobs: args: --profile release-nightly --bin qsvlite -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --features=lite,self_update,nightly,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }} - name: Build qsvdp-nightly env: - RUSTFLAGS: --emit=asm + RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e2ffc2ef8..7a433d711 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,6 +43,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma - os: ubuntu-22.04 os-name: linux target: x86_64-unknown-linux-musl @@ -53,6 +54,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma - os: ubuntu-22.04 os-name: linux target: i686-unknown-linux-gnu @@ -62,6 +64,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: + addl-rustflags: - os: windows-latest os-name: windows target: x86_64-pc-windows-msvc @@ -71,6 +74,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 - os: windows-latest os-name: windows target: i686-pc-windows-msvc @@ -80,6 +84,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: + addl-rustflags: - os: windows-latest os-name: windows target: x86_64-pc-windows-gnu @@ -89,6 +94,7 @@ jobs: default-features: --no-default-features addl-qsvlite-features: addl-qsvdp-features: luau + addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 # - os: macos-12 # os-name: macos # target: x86_64-apple-darwin @@ -116,6 +122,7 @@ jobs: default-features: addl-qsvlite-features: addl-qsvdp-features: + addl-rustflags: # - os: ubuntu-20.04 # os-name: linux # target: arm-unknown-linux-gnueabihf @@ -151,6 +158,8 @@ jobs: - name: Build qsv # env: # RUSTFLAGS: --emit=asm + env: + RUSTFLAGS: ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build @@ -159,7 +168,7 @@ jobs: args: --release --locked --bin qsv --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable ${{ matrix.job.default-features }} - name: Build qsvlite env: - RUSTFLAGS: --emit=asm + RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build @@ -168,7 +177,7 @@ jobs: args: --release --locked --bin qsvlite --features=lite,self_update,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }} - name: Build qsvdp env: - RUSTFLAGS: --emit=asm + RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} uses: actions-rs/cargo@v1 with: command: build