Skip to content

Conversation

@dpaoliello
Copy link
Contributor

@dpaoliello dpaoliello commented Dec 6, 2023

  • Building for ARM64EC requires passing the -arm64EC flag to cl.exe and /machine:arm64ec to lib.exe: https://learn.microsoft.com/en-us/windows/arm/arm64ec-build#developer-command-prompt
  • Updated tool discovery to handle arm64ec as a target arch by using the aarch64 paths.
  • When targeting arm64ec the lib path must ALSO include the arm64ec VC libs BEFORE the aarch64 libs.
  • Added a new TargetArch wrapper type to avoid splitting the target string multiple times or calling contains when we could be using string comparison.

@dpaoliello dpaoliello marked this pull request as draft December 13, 2023 05:55
@dpaoliello dpaoliello force-pushed the arm64ec branch 2 times, most recently from 5692c65 to 52a3f46 Compare December 13, 2023 20:18
@dpaoliello dpaoliello marked this pull request as ready for review December 15, 2023 18:10
@dpaoliello
Copy link
Contributor Author

@ChrisDenton would you mind having a look at this PR? It's blocking adding ARM64EC as a new target, and also provides some cleanups to avoid splitting the target triple over-and-over again within windows_registry.

@ChrisDenton
Copy link
Member

For sure, I'm still catching up on review but I'll prioritize this.

Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I have one observation but nothing that should block merging this.

I do think using TargetArch is a clear improvement even without the other changes in this PR.

target: TargetArch<'_>,
instance_path: &Path,
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf, PathBuf)> {
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf, Option<PathBuf>, PathBuf)> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this return type is getting increasingly out of hand and should probably be a proper struct or otherwise rearchitectured. However, vs15plus_vc_paths is only called from one place and that immediately deconstructs it into named variables so I'm not minded to block this PR on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants