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

[ fix ] fix windows CI, aligned_alloc not supported on win32 #3283

Merged
merged 1 commit into from
May 18, 2024

Conversation

dunhamsteve
Copy link
Contributor

Description

The support code calls aligned_alloc which does not appear to be supported on windows, and is not defined in the stdlib.h header file. The latest GitHub windows image has turned the warning about this into an error, causing ci to fail.

I’ve updated the condition in memoryManagement.c to use the fallback branch which calls malloc when building on windows.

@dunhamsteve
Copy link
Contributor Author

Additional details:

It looks like we've been getting warnings about aligned_alloc being implicitly defined for a while, but the latest github windows image contains a newer version of GCC that escalates this to an error. I also found cppreference.com which says that "This function is not supported in Microsoft C Runtime library".

It looks like, despite not being defined in the header files, the linker was finding this function. But I presume malloc is fine here, since it is declared and is already being used on some systems.

@andrevidela
Copy link
Collaborator

Astounding work, thank you

@andrevidela andrevidela merged commit 2a3f031 into idris-lang:main May 18, 2024
22 checks passed
@dunhamsteve dunhamsteve deleted the fix-windows-ci branch May 18, 2024 13:46
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