Skip to content

Commit

Permalink
build: link to libmingw32
Browse files Browse the repository at this point in the history
  • Loading branch information
inkydragon committed Jan 18, 2025
1 parent 79cb547 commit 26b7ffb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion base/linking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ function link_image_cmd(path, out)
LIBS = is_debug() ? ("-ljulia-debug", "-ljulia-internal-debug") :
("-ljulia", "-ljulia-internal")
@static if Sys.iswindows()
LIBS = (LIBS..., "-lssp", "-lgcc_s", "-lgcc", "-lmsvcrt", "-lmingwex")
LIBS = (LIBS..., "-lssp", "-lgcc_s", "-lgcc")
# libm
LIBS = (LIBS..., "-lmingw32", "-lmingwex", "-lmsvcrt")
end

V = VERBOSE[] ? "--verbose" : ""
Expand Down
8 changes: 5 additions & 3 deletions deps/csl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,15 @@ install-csl:
cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libssp.dll.a $(build_private_libdir)/
cp -a $(build_libdir)/gcc/$(BB_TRIPLET)/$(GCC_VERSION)/libssp.dll.a $(build_libdir)/
ifeq ($(ARCH),x86_64)
-cp -a /mingw64/lib/libmsvcrt.a $(build_private_libdir)/
# libmingw32: mingw_raise_matherr
# libmingwex: ldexp,log2l,exp2l,powi
-cp -a /mingw64/lib/libmingw32.a $(build_private_libdir)/
-cp -a /mingw64/lib/libmingwex.a $(build_private_libdir)/
else
# For i686 we are using niXman/mingw-builds-binaries, i686-12.2.0-release-posix-sjlj-rt_v10-rev0.7z
# https://github.com/JuliaCI/rootfs-images/blob/e7be8086ff1285b0f333ca72884977d01aed0e1f/windows/package-i686/Dockerfile#L28C107-L28C152
-cp -a /mingw32/i686-w64-mingw32/lib/libmsvcrt.a $(build_private_libdir)/
-cp -a /mingw32/i686-w64-mingw32/lib/libmingwex.a $(build_private_libdir)/
-cp -a /mingw32/i686-w64-mingw32/lib/libmingw32.a $(build_private_libdir)/
-cp -a /mingw32/i686-w64-mingw32/lib/libmingwex.a $(build_private_libdir)/
endif # ifeq ($(ARCH),x86_64)
endif

Expand Down

0 comments on commit 26b7ffb

Please sign in to comment.