Skip to content

Commit 5f9ee56

Browse files
singaraionaclaude
andcommitted
fix(raykx): use absolute path for def file on Windows
Use cygpath to convert to Windows-style absolute path, avoiding MSYS2 path conversion issues with /DEF: argument. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d32d640 commit 5f9ee56

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

ext/raykx/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ CFLAGS = -Wall -Wextra -std=c17 -fsigned-char -m64 -I. -I../../core
1212

1313
ifneq (,$(IS_WINDOWS))
1414
TARGET = raykx.dll
15-
# On Windows, link against rayforce.lib import library and export functions via .def
16-
# lld requires TEMP for temp files, but make doesn't pass env vars by default
17-
# MSYS2_ARG_CONV_EXCL prevents path conversion for /DEF: argument
15+
# On Windows, link against rayforce.lib import library
16+
# Use absolute path for .def file to avoid MSYS2 path conversion issues
1817
TEMP ?= /tmp
1918
export TEMP
20-
export MSYS2_ARG_CONV_EXCL = /DEF:
21-
LDFLAGS = -shared -fuse-ld=lld -Wl,/DEF:raykx.def
19+
DEF_PATH := $(shell cygpath -m $(CURDIR)/raykx.def)
20+
LDFLAGS = -shared -fuse-ld=lld -Wl,/DEF:$(DEF_PATH)
2221
LIBS = -lws2_32 -lmswsock ../../rayforce.lib
2322
DEBUG_CFLAGS = $(CFLAGS) -g -O0 -DDEBUG -D_CRT_SECURE_NO_WARNINGS
2423
RELEASE_CFLAGS = $(CFLAGS) -O3 -D_CRT_SECURE_NO_WARNINGS

0 commit comments

Comments
 (0)