mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-31 07:38:24 +00:00
CI: bundled LLD also gets the ktmw32, propsys and version import libraries winsafe binds (refs #1886)
This commit is contained in:
1 parent
d3d3b86539
commit
09d41e54ca
1 file changed
+12
-7
@@ -1,8 +1,9 @@
|
||||
# Windows builds with the toolchains contributors use, not just the MSVC one releases use: build
|
||||
# the desktop app and the CLI with MSVC, with GNU (mingw-w64 from MSYS2, the setup CONTRIBUTING.md
|
||||
# describes), and with GNU linked by Rust's bundled LLD plus mingw-w64's `libshlwapi.a` (#1886),
|
||||
# then run each binary with `--version`. Both packages build in one `cargo build`, the way people
|
||||
# build them, so features unify and the CLI links everything the desktop app pulls in.
|
||||
# describes), and with GNU linked by Rust's bundled LLD plus the mingw-w64 import libraries its
|
||||
# self-contained sysroot lacks (#1886), then run each binary with `--version`. Both packages build
|
||||
# in one `cargo build`, the way people build them, so features unify and the CLI links everything
|
||||
# the desktop app pulls in.
|
||||
name: Windows toolchains
|
||||
|
||||
# Nightly on main (a dependency update is what brings in a new system library), and on PRs that
|
||||
@@ -55,13 +56,17 @@ jobs:
|
||||
if: matrix.target == 'x86_64-pc-windows-gnu' && !matrix.rust-lld
|
||||
run: |
|
||||
printf '%s\n' 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH"
|
||||
# Only libshlwapi.a, in a folder of its own: with all of mingw-w64's lib folder on the search
|
||||
# path, its C runtime mixes with Rust's bundled one (undefined `DllEntryPoint`).
|
||||
- name: Link with Rust's bundled LLD and mingw-w64's shlwapi import library
|
||||
# Only the import libraries the self-contained sysroot lacks, in a folder of its own: with all
|
||||
# of mingw-w64's lib folder on the search path, its C runtime mixes with Rust's bundled one
|
||||
# (undefined `DllEntryPoint`). webbrowser, which opens links, binds shlwapi; winsafe, which the
|
||||
# updater (craft-update) uses, binds shlwapi, ktmw32, propsys and version.
|
||||
- name: Link with Rust's bundled LLD and mingw-w64's missing import libraries
|
||||
if: matrix.rust-lld
|
||||
run: |
|
||||
mkdir -p /c/gnu-import-libs
|
||||
cp /c/msys64/mingw64/lib/libshlwapi.a /c/gnu-import-libs/
|
||||
for lib in shlwapi ktmw32 propsys version; do
|
||||
cp "/c/msys64/mingw64/lib/lib$lib.a" /c/gnu-import-libs/
|
||||
done
|
||||
echo 'CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=rust-lld' >> "$GITHUB_ENV"
|
||||
echo 'CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS=-C link-self-contained=yes -L native=C:/gnu-import-libs' >> "$GITHUB_ENV"
|
||||
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
||||
|
||||
Reference in new issue
Block a user