Skip to content

Commit

Permalink
Force static linking for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
DSchroer committed Mar 9, 2023
1 parent 5fc598c commit cd3414c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ RUN ln -s /osxcross/target/bin/x86_64-apple-darwin20.4-ld /osxcross/target/bin/x
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Remove win32 dlls to force static linking
RUN rm /usr/lib/gcc/x86_64-w64-mingw32/12-win32/*.dll.a

# Toolchains
RUN rustup toolchain install nightly
RUN rustup target add x86_64-pc-windows-gnu
Expand Down
3 changes: 1 addition & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ cargo run --bin cheat_sheet > cheatsheet.md

# Build Windows
(
WIN_DLLS="/usr/lib/gcc/x86_64-w64-mingw32/10-win32"
cargo build --release --target x86_64-pc-windows-gnu
(cd target/x86_64-pc-windows-gnu/release/ && cp $WIN_DLLS/*.dll . && zip ../../../windows.zip dslcad.exe *.dll)
(cd target/x86_64-pc-windows-gnu/release/ && zip ../../../windows.zip dslcad.exe)
)

# Build MacOSX
Expand Down

0 comments on commit cd3414c

Please sign in to comment.