Skip to content

Commit 4e5f9c5

Browse files
committed
Go back to rwinlib because upstream seems broken on Windows
1 parent bf17cb9 commit 4e5f9c5

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

src/Makevars.win

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu
2-
LIBDIR = myrustlib/target/$(TARGET)/release
3-
STATLIB = $(LIBDIR)/myrustlib.lib
4-
PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lws2_32 -ladvapi32 -luserenv -ldbghelp
1+
RWINLIB = ../windows/gifski-0.8.4
2+
PKG_CPPFLAGS= -I$(RWINLIB)/include
3+
PKG_LIBS= -L$(RWINLIB)/lib${R_ARCH} \
4+
-lgifski -lws2_32 -ladvapi32 -luserenv -ldbghelp
55

6-
# These can also be set in ~/.cargo/config
7-
export CARGO_TARGET_I686_PC_WINDOWS_GNU_LINKER=$(CC)
8-
export CC=$(CC)
9-
export AR=$(AR)
6+
all: clean winlibs
107

11-
# This bypasses the exception stuff
12-
#export CARGO_TARGET_I686_PC_WINDOWS_GNU_RUSTFLAGS=-C panic=abort
13-
14-
all: clean
15-
16-
$(SHLIB): $(STATLIB)
17-
18-
$(STATLIB):
19-
cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
8+
winlibs:
9+
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
2010

2111
clean:
22-
rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) myrustlib/target
12+
rm -f $(SHLIB) $(OBJECTS)

src/Makevars.win.rust

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu
2+
LIBDIR = myrustlib/target/$(TARGET)/release
3+
STATLIB = $(LIBDIR)/myrustlib.lib
4+
PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lws2_32 -ladvapi32 -luserenv -ldbghelp
5+
6+
# These can also be set in ~/.cargo/config
7+
export CARGO_TARGET_I686_PC_WINDOWS_GNU_LINKER=$(CC)
8+
export CC=$(CC)
9+
export AR=$(AR)
10+
11+
# This bypasses the exception stuff
12+
#export CARGO_TARGET_I686_PC_WINDOWS_GNU_RUSTFLAGS=-C panic=abort
13+
14+
all: clean
15+
16+
$(SHLIB): $(STATLIB)
17+
18+
$(STATLIB):
19+
cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
20+
21+
clean:
22+
rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) myrustlib/target

src/Makevars.win.rwinlib

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)