Skip to content

Commit

Permalink
Restore reproducible libs (#2402)
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Mar 29, 2023
1 parent 36ea325 commit 91e0a5c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified crates/targets/i686_gnu/lib/libwindows.a
Binary file not shown.
Binary file modified crates/targets/i686_msvc/lib/windows.lib
Binary file not shown.
Binary file modified crates/targets/x86_64_gnu/lib/libwindows.a
Binary file not shown.
Binary file modified crates/targets/x86_64_msvc/lib/windows.lib
Binary file not shown.
2 changes: 2 additions & 0 deletions crates/tools/gnu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 2 additions & 0 deletions crates/tools/msvc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 91e0a5c

Please sign in to comment.