Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32 wheels #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions .github/workflows/dist_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
build_llvm_win:
name: Build LLVM release for Windows
strategy:
matrix:
arch: [x64, x86]
runs-on: windows-latest
steps:
- name: Cache LLVM
Expand All @@ -20,7 +23,7 @@ jobs:
path: llvm/install
# TODO: would be really better to add the hash of the LLVM commit cloned
# TODO: add "14.16" as a variable easy to replace
key: ${{ runner.os }}-llvm-release-11-msvc1416
key: ${{ runner.os }}-llvm-release-11-msvc1416-${{ matrix.arch }}
- name: Get LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
uses: actions/checkout@v2
Expand All @@ -32,6 +35,7 @@ jobs:
if: steps.cache-llvm.outputs.cache-hit != 'true'
with:
toolset: "14.16"
arch: ${{ matrix.arch }}
- name: Build LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -143,9 +147,12 @@ jobs:
os:
- macos-latest
- windows-latest
arch: [x64, x86]
exclude:
- os: windows-latest
python-version: 2.7
- os: macos-latest
arch: x86

runs-on: ${{ matrix.os }}
needs: build_llvm_win
Expand All @@ -155,18 +162,20 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: "14.16"
arch: ${{ matrix.arch }}
if: runner.os == 'Windows'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Cache LLVM
if: runner.os == 'Windows'
id: cache-llvm
uses: actions/cache@v2
with:
path: llvm/install
key: ${{ runner.os }}-llvm-release-11-msvc1416
key: ${{ runner.os }}-llvm-release-11-msvc1416-${{ matrix.arch }}
- name: Python dependencies
run: |
pip install wheel
Expand Down
11 changes: 9 additions & 2 deletions include/dffi/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
#endif

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
// LLVM's C API defines "by hand" ssize_t. We need to do the same otherwise we
// got a conflicting type...
// #include <BaseTsd.h>
// typedef SSIZE_T ssize_t;
#if defined(_WIN64)
typedef signed __int64 ssize_t;
#else
typedef signed int ssize_t;
#endif /* _WIN64 */
#endif


Expand Down