Skip to content

Commit

Permalink
Remove workaround, seems fixed in latest rust
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed May 19, 2023
1 parent b493ad9 commit 153c92f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Makevars.win.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@ PKG_LIBS = -L$(LIBDIR) -lmyrustlib -lws2_32 -ladvapi32 -luserenv -ldbghelp -lbcr

# These can also be set in ~/.cargo/config
ifeq ($(R_COMPILED_BY),gcc 8.3.0)
GCCPATH=$(subst C:\,/c/,$(RTOOLS40_HOME))/mingw$(WIN)/bin
ADDPATH=$(subst C:\,/c/,$(RTOOLS40_HOME))/mingw$(WIN)/bin:$(USERPROFILE)\\.cargo\\bin
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=$(RTOOLS40_HOME)\\mingw64\\bin\\gcc
export CARGO_TARGET_I686_PC_WINDOWS_GNU_LINKER=$(RTOOLS40_HOME)\\\mingw32\\bin\\gcc
else
GCCPATH=$(subst C:\,/c/,$(RTOOLS43_HOME))/x86_64-w64-mingw32.static.posix/bin
ADDPATH=$(USERPROFILE)\\.cargo\\bin
endif

all: clean rustup

$(SHLIB): $(STATLIB)

$(STATLIB):
ifeq ($(WIN),64) #hack for mxe-rtools42 missing -lgcc_eh
mkdir -p myrustlib/target/release/deps; echo '!<arch>' > myrustlib/target/release/deps/libgcc_eh.a
endif
PATH="$(GCCPATH):$(USERPROFILE)\.cargo:$(PATH)" cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
PATH="$(ADDPATH):$(PATH)" cargo build --target=$(TARGET) --release --manifest-path=myrustlib/Cargo.toml
rm -Rf $(LIBDIR)/build

clean:
Expand Down

0 comments on commit 153c92f

Please sign in to comment.