Skip to content

Commit

Permalink
Merge pull request #910 from dpaoliello/arm64ec
Browse files Browse the repository at this point in the history
Add support for ARM64EC when building with MSVC
  • Loading branch information
ChrisDenton authored Jan 5, 2024
2 parents 8f730e4 + 2f0acd1 commit f17047d
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 60 deletions.
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,8 @@ impl Build {
} else {
if target.contains("i586") {
cmd.push_cc_arg("-arch:IA32".into());
} else if target.contains("arm64ec") {
cmd.push_cc_arg("-arm64EC".into());
}
}

Expand Down Expand Up @@ -3017,10 +3019,14 @@ impl Build {

if lib.is_empty() {
name = String::from("lib.exe");
match windows_registry::find(&target, "lib.exe") {
let mut cmd = match windows_registry::find(&target, "lib.exe") {
Some(t) => t,
None => self.cmd("lib.exe"),
};
if target.contains("arm64ec") {
cmd.arg("/machine:arm64ec");
}
cmd
} else {
name = lib;
self.cmd(&name)
Expand Down
Loading

0 comments on commit f17047d

Please sign in to comment.