Compare commits

...

2 Commits

Author SHA1 Message Date
Raffaello Bertini
c37e273d68
feat: Add ucrt64 support in makefile (#455) 2025-05-29 15:09:22 +03:00
Luau
138f06e88a
ci: Fix the build for LuaJIT and OpenResty on Windows (#453) 2025-05-29 14:43:12 +03:00
3 changed files with 29 additions and 3 deletions

View File

@ -25,8 +25,9 @@ jobs:
uses: luarocks/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.luaVersion }}
buildCache: false
- name: Setup luarocks
uses: luarocks/gh-actions-luarocks@v5
uses: luau-project/gh-actions-luarocks@fix-mingw-MSVCRT
- name: Make and install
run: |
luarocks make -- luasocket-scm-3.rockspec

View File

@ -10,7 +10,7 @@
# print print the build settings
PLAT?= linux
PLATS= macosx linux win32 win64 mingw freebsd solaris
PLATS= macosx linux win32 win64 mingw freebsd solaris ucrt64
all: $(PLAT)

View File

@ -74,6 +74,13 @@ LUAPREFIX_mingw?=/usr
CDIR_mingw?=lua/$(LUAV)
LDIR_mingw?=lua/$(LUAV)/lua
# where lua headers are found for ucrt64 builds
# LUAINC_ucrt64:
LUAINC_ucrt64?=/ucrt64/include
LUALIB_ucrt64?=/ucrt64/bin/lua$(subst .,,$(LUAV)).dll
LUAPREFIX_ucrt64?=/ucrt64
CDIR_ucrt64?=lib/lua/$(LUAV)
LDIR_ucrt64?=share/lua/$(LUAV)
# LUAINC_win32:
# LUALIB_win32:
@ -153,7 +160,7 @@ print:
#------
# Supported platforms
#
PLATS= macosx linux win32 win64 mingw solaris
PLATS= macosx linux win32 win64 mingw solaris ucrt64
#------
# Compiler and linker settings
@ -219,6 +226,21 @@ LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o
LD_mingw=gcc
SOCKET_mingw=wsocket.o
#------
# Compiler and linker settings
# for ucrt64
SO_ucrt64=dll
O_ucrt64=o
CC_ucrt64=gcc
DEF_ucrt64= -DLUASOCKET_$(DEBUG) \
-DWINVER=0x0501
CFLAGS_ucrt64= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common
# \
-fvisibility=hidden
LDFLAGS_ucrt64= $(LUALIB) -shared -Wl,-s -lws2_32 -o
LD_ucrt64=gcc
SOCKET_ucrt64=wsocket.o
#------
# Compiler and linker settings
@ -384,6 +406,9 @@ linux:
mingw:
$(MAKE) all PLAT=mingw
ucrt64:
$(MAKE) all PLAT=ucrt64
solaris:
$(MAKE) all-unix PLAT=solaris