Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add win-arm64 support using cl.exe #9

Merged
merged 19 commits into from
Nov 18, 2024
Merged

Add win-arm64 support using cl.exe #9

merged 19 commits into from
Nov 18, 2024

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Nov 14, 2024

Description

recipe/build.sh Outdated
Comment on lines 51 to 56
# An executable with mingw and `static-libgcc` is 42K
# An executable with vcruntime statically linked (-MT) in is 920K
# An executable with vcruntime dynamically linked (-MD) in is 84K
# For arm64, since we don't have mingw, we are going to use -MD
# to reduce the binary size. Let's hope that all arm64 machines
# have vcruntime140.dll installed.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@finnagin and @zooba, is this correct or should we go with -MT? The executables built here need to able to run without the conda supplied vcurntime140.dll

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, we don't need to run standalone. So let's use MD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do need them to run from Scripts which doesn't have a vcruntime140.dll.

Copy link
Contributor

Choose a reason for hiding this comment

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

So do we need -MD or -MT? I think we are currently using MD but your last message hints at needing MT as far as I can see? 🤔

Copy link

Choose a reason for hiding this comment

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

I would use -MT for safety for launchers - it's too likely to end up running from a place where it can't find a suitable runtime.

Using -MD matter more for Python itself, because extension modules will also need to load it, and they'll want to share state. The launcher (I assume) is only going to create a new process, rather than dynamically loading DLLs, so it won't be a huge impact.

run:
# Any Python works as `%PREFIX%/python.exe` is present
# cli-64.exe (and friends) will look for it as `../python.exe`, so that's
# why we package the executables in `%PREFIX%/Scripts`
- python
- python # [x86_64]
Copy link
Contributor

Choose a reason for hiding this comment

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

We are only selecting this so the solver doesn't error out right now, right? But in the future we should re-enable it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes to both

@jaimergp
Copy link
Contributor

<3 This is awesome, just have a couple comments but otherwise LGTM.

@jaimergp jaimergp merged commit d23e557 into conda:main Nov 18, 2024
3 checks passed
@jaimergp
Copy link
Contributor

Thanks!

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.

3 participants