diff --git a/.github/workflows/lib.yml b/.github/workflows/lib.yml index 5b090920f8..a1674ad174 100644 --- a/.github/workflows/lib.yml +++ b/.github/workflows/lib.yml @@ -23,7 +23,7 @@ jobs: - name: Build gnu libs shell: cmd run: | - set PATH=%PATH%;C:\msys64\mingw64\bin + set PATH=C:\msys64\mingw64\bin;%PATH% cargo run -p tool_gnu -- all - name: Build i686_msvc diff --git a/crates/targets/i686_gnu/lib/libwindows.a b/crates/targets/i686_gnu/lib/libwindows.a index 1bb2066f21..a1f92cace1 100644 Binary files a/crates/targets/i686_gnu/lib/libwindows.a and b/crates/targets/i686_gnu/lib/libwindows.a differ diff --git a/crates/targets/i686_msvc/lib/windows.lib b/crates/targets/i686_msvc/lib/windows.lib index 9fc54a4936..f331d0d872 100644 Binary files a/crates/targets/i686_msvc/lib/windows.lib and b/crates/targets/i686_msvc/lib/windows.lib differ diff --git a/crates/targets/x86_64_gnu/lib/libwindows.a b/crates/targets/x86_64_gnu/lib/libwindows.a index 0d54310378..754fcfc39c 100644 Binary files a/crates/targets/x86_64_gnu/lib/libwindows.a and b/crates/targets/x86_64_gnu/lib/libwindows.a differ diff --git a/crates/targets/x86_64_msvc/lib/windows.lib b/crates/targets/x86_64_msvc/lib/windows.lib index b17a4c7e11..e55e844bd8 100644 Binary files a/crates/targets/x86_64_msvc/lib/windows.lib and b/crates/targets/x86_64_msvc/lib/windows.lib differ diff --git a/crates/tools/gnu/src/main.rs b/crates/tools/gnu/src/main.rs index 2c3c730ded..d2b4c65321 100644 --- a/crates/tools/gnu/src/main.rs +++ b/crates/tools/gnu/src/main.rs @@ -109,6 +109,8 @@ EXPORTS // Ensure consistency in the prefixes used by dlltool. cmd.arg("-t"); cmd.arg(format!("{library}_").replace('.', "_").replace('-', "_")); + // Ensure deterministic output. (dlltool might be built with DEFAULT_AR_DETERMINISTIC=0) + cmd.arg("--deterministic-libraries"); } cmd.output().unwrap(); diff --git a/crates/tools/msvc/src/main.rs b/crates/tools/msvc/src/main.rs index 2771900634..871a7a6dcc 100644 --- a/crates/tools/msvc/src/main.rs +++ b/crates/tools/msvc/src/main.rs @@ -67,6 +67,8 @@ fn main() { break; } } + archive.flush().unwrap(); + drop(archive); std::fs::rename(output.join("windows.lib"), format!("crates/targets/{platform}/lib/windows.lib")).unwrap(); }