Fix ARM64 cross-compilation and improve NuGet pipeline#1244
Open
Fix ARM64 cross-compilation and improve NuGet pipeline#1244
Conversation
da1cce3 to
e6bbec0
Compare
Collaborator
|
Thanks Gustavo. However, we do not need |
309d778 to
bf0eb11
Compare
Collaborator
Author
Done! |
bf0eb11 to
cf17fc5
Compare
ca639cb to
4e8bfdc
Compare
Fix MI_ARCH detection when cross-compiling for ARM64 on an x64 host. CMAKE_SYSTEM_PROCESSOR (AMD64) was matching the x64 condition before reaching ARM64, causing the wrong redirect lib to be linked. Also fix NuGet pipeline: correct nuspec paths, add BasePath, add branch parameter with auto-increment versioning, remove buildConfig parameter, and enable publishToFeed by default.
4e8bfdc to
a445bd7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When cross-compiling mimalloc for ARM64 on an x64 host (e.g., cmake .. -A ARM64), the architecture detection logic incorrectly resolved to x64. This caused the x64 mimalloc-redirect.lib to be linked instead of the ARM64 variant, resulting in linker errors (LNK2019/LNK1120).
The NuGet pipeline also had several issues: incorrect nuspec file paths after the move to contrib/nuget, missing BasePath for nuget pack, wrong lib names in the nuspec, and no branch selection or auto-versioning.
What
How
AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL ARM64guard to the x64 elseif condition so that-A ARM64on an x64 host correctly resolves MI_ARCH to arm64