Specify dlltool prefix when generating import libs
This commit is contained in:
parent
044a28a409
commit
c825e08571
1 changed files with 8 additions and 0 deletions
|
@ -183,6 +183,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
||||||
// able to control the *exact* spelling of each of the symbols that are being imported:
|
// able to control the *exact* spelling of each of the symbols that are being imported:
|
||||||
// hence we don't want `dlltool` adding leading underscores automatically.
|
// hence we don't want `dlltool` adding leading underscores automatically.
|
||||||
let dlltool = find_binutils_dlltool(sess);
|
let dlltool = find_binutils_dlltool(sess);
|
||||||
|
let temp_prefix = {
|
||||||
|
let mut path = PathBuf::from(&output_path);
|
||||||
|
path.pop();
|
||||||
|
path.push(lib_name);
|
||||||
|
path
|
||||||
|
};
|
||||||
let result = std::process::Command::new(dlltool)
|
let result = std::process::Command::new(dlltool)
|
||||||
.args([
|
.args([
|
||||||
"-d",
|
"-d",
|
||||||
|
@ -192,6 +198,8 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
||||||
"-l",
|
"-l",
|
||||||
output_path.to_str().unwrap(),
|
output_path.to_str().unwrap(),
|
||||||
"--no-leading-underscore",
|
"--no-leading-underscore",
|
||||||
|
"--temp-prefix",
|
||||||
|
temp_prefix.to_str().unwrap(),
|
||||||
])
|
])
|
||||||
.output();
|
.output();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue