Skip to content

Commit

Permalink
port: use cv2pdb on windows executables if present
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Jan 7, 2024
1 parent b1b17e2 commit 06f2283
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Makefile.port
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ ifneq (,$(findstring windows,$(TARGET_PLATFORM)))
TARGET_LDFLAGS := $(shell pkg-config sdl2 --libs) -lz -lopengl32 -static-libstdc++ -ldbghelp
# on windows/mingw we need this to be built with a 32-bit compiler so it finds the correct libs
TOOLCHAIN ?= i686-w64-mingw32-
# check if cv2pdb is present
ifeq ($(CV2PDB),)
CV2PDB := cv2pdb
ifeq (,$(shell which cv2pdb 2>/dev/null))
CV2PDB :=
endif
endif
else # assume *nix
TARGET_CFLAGS := $(shell pkg-config sdl2 --cflags-only-I)
TARGET_LDFLAGS := $(shell pkg-config sdl2 --libs) -lGL -lz -ldl
Expand Down Expand Up @@ -305,6 +312,9 @@ $(G_DIR)/tiles/%.h: $(A_DIR)/tiles/%.json

$(BIN): $(O_FILES)
$(LD) $(COMMON_CFLAGS) $(OPT_LVL) -o $(BIN) $^ $(LDFLAGS)
ifneq ($(CV2PDB),)
$(CV2PDB) $(BIN)
endif

$(B_DIR)/%.o: %.c
@mkdir -p $(dir $@)
Expand Down
2 changes: 1 addition & 1 deletion port/src/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "system.h"
#include "platform.h"

#define CRASH_MAX_MSG 4096
#define CRASH_MAX_MSG 8192
#define CRASH_MAX_SYM 256
#define CRASH_MAX_FRAMES 32
#define CRASH_MSG(...) \
Expand Down

0 comments on commit 06f2283

Please sign in to comment.