Skip to content

Commit afb9714

Browse files
singaraionaclaude
andcommitted
fix(raykx): use cygpath -w in recipe to avoid MSYS2 path conversion
Evaluating cygpath in the recipe ensures the path is computed when the current directory is correct. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 83157e9 commit afb9714

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

ext/raykx/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ CFLAGS = -Wall -Wextra -std=c17 -fsigned-char -m64 -I. -I../../core
1313
ifneq (,$(IS_WINDOWS))
1414
TARGET = raykx.dll
1515
# On Windows, link against rayforce.lib import library
16-
# Requires MSYS2_ARG_CONV_EXCL='/DEF:' to prevent path conversion
1716
TEMP ?= /tmp
1817
export TEMP
19-
LDFLAGS = -shared -fuse-ld=lld -Wl,/DEF:raykx.def
18+
LDFLAGS = -shared -fuse-ld=lld
2019
LIBS = -lws2_32 -lmswsock ../../rayforce.lib
2120
DEBUG_CFLAGS = $(CFLAGS) -g -O0 -DDEBUG -D_CRT_SECURE_NO_WARNINGS
2221
RELEASE_CFLAGS = $(CFLAGS) -O3 -D_CRT_SECURE_NO_WARNINGS
@@ -37,10 +36,18 @@ endif
3736
default: debug
3837

3938
debug:
39+
ifneq (,$(IS_WINDOWS))
40+
$(CC) -include ../../core/def.h $(DEBUG_CFLAGS) $(LDFLAGS) -Wl,/DEF:$(shell cygpath -w raykx.def) -o $(TARGET) $(SRCS) $(LIBS)
41+
else
4042
$(CC) -include ../../core/def.h $(DEBUG_CFLAGS) $(LDFLAGS) -o $(TARGET) $(SRCS) $(LIBS)
43+
endif
4144

4245
release:
46+
ifneq (,$(IS_WINDOWS))
47+
$(CC) -include ../../core/def.h $(RELEASE_CFLAGS) $(LDFLAGS) -Wl,/DEF:$(shell cygpath -w raykx.def) -o $(TARGET) $(SRCS) $(LIBS)
48+
else
4349
$(CC) -include ../../core/def.h $(RELEASE_CFLAGS) $(LDFLAGS) -o $(TARGET) $(SRCS) $(LIBS)
50+
endif
4451

4552
clean:
4653
rm -f $(TARGET) libraykx.so libraykx.dylib raykx.dll

0 commit comments

Comments
 (0)