Skip to content

Commit

Permalink
Ensure stable file prefixes in the *_gnu import libraries
Browse files Browse the repository at this point in the history
For some reason, the import libraries currently in the repository don't
match what running the tool_gnu command produces, due to the use of
different prefixes. This adjusts the command to produce the same
prefixes as the ones currently in the import libraries from the
repository.
  • Loading branch information
glandium committed Aug 17, 2022
1 parent c63b15d commit fc2b4bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/tools/gnu/src/main.rs
Expand Up @@ -82,6 +82,13 @@ EXPORTS
cmd.arg(format!("{}.def", library));
cmd.arg("-l");
cmd.arg(format!("lib{}.a", library));
// Ensure consistency in the prefixes used by dlltool.
cmd.arg("-t");
if library.contains('.') {
cmd.arg(format!("{}_", library).replace('.', "_").replace('-', "_"));
} else {
cmd.arg(format!("{}_dll_", library).replace('-', "_"));
}
cmd.output().unwrap();

// Work around lack of determinism in dlltool output.
Expand Down

0 comments on commit fc2b4bf

Please sign in to comment.