Skip to content

Commit

Permalink
Windows lto (#113)
Browse files Browse the repository at this point in the history
* enable lto for windows build

* drop support for win32
  • Loading branch information
Congyuwang authored Mar 1, 2024
1 parent 2b16ddd commit d3af19b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [x64, x86]
target: [x64]
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
Expand All @@ -83,6 +83,12 @@ jobs:
args: --release --out dist
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib
CC: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
AR: ${{ runner.temp }}/llvm-17.0/bin/llvm-lib
CFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
CXXFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
RUSTFLAGS: "-Clinker-plugin-lto -Clinker=lld-link"
- name: Install built wheel and test
run: |
pip install rocksdict --no-index --find-links dist --force-reinstall || true
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [x64, x86]
target: [x64]
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
Expand All @@ -83,6 +83,12 @@ jobs:
args: --release --out dist
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib
CC: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
AR: ${{ runner.temp }}/llvm-17.0/bin/llvm-lib
CFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
CXXFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
RUSTFLAGS: "-Clinker-plugin-lto -Clinker=lld-link"
- name: Install built wheel and test
run: |
pip install rocksdict --no-index --find-links dist --force-reinstall || true
Expand Down

0 comments on commit d3af19b

Please sign in to comment.