Skip to content

Commit 4edf186

Browse files
committed
Build: Disable LuaJIT on Windows-ARM.
1 parent 9bf9f40 commit 4edf186

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
env:
113113
MACOSX_DEPLOYMENT_TARGET: '11.0'
114114
LUPA_WITH_LUA_DLOPEN: ${{ startsWith(matrix.os, 'windows') && 'false' || 'true' }}
115+
LUPA_NO_LUAJIT: ${{ contains(matrix.only, 'win_arm64') && 'true' || 'false' }}
115116

116117
steps:
117118
- name: Check out project

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ def handle_arg(arg: str):
393393
for lua_bundle_path in glob.glob(os.path.join(basedir, 'third-party', 'lua*' + os.sep))
394394
if not (
395395
False
396+
# Allow disabling LuaJIT manually.
397+
or (option_no_luajit and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
396398
# LuaJIT 2.0 on macOS requires a CPython linked with "-pagezero_size 10000 -image_base 100000000"
397399
# http://t-p-j.blogspot.com/2010/11/lupa-on-os-x-with-macports-python-26.html
398400
# LuaJIT 2.1-alpha3 fails at runtime.
@@ -401,8 +403,6 @@ def handle_arg(arg: str):
401403
or (get_machine().lower() not in ("x86_64", "amd64", "aarch64", "arm64") and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
402404
# LuaJIT 2.0 does not support aarch64.
403405
or (get_machine().lower() in ("aarch64", "arm64") and 'luajit20' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
404-
# Cannot currently build LuaJIT on Windows-ARM.
405-
or (platform.startswith('win') and get_machine().lower() in ("aarch64", "arm64") and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
406406
)
407407
]
408408
if not configs:

0 commit comments

Comments
 (0)