Skip to content

Use Cygwin to build libiconv on Windows CI#14999

Merged
straight-shoota merged 6 commits intocrystal-lang:masterfrom
HertzDevil:refactor/window-libiconv-cygwin
Sep 17, 2024
Merged

Use Cygwin to build libiconv on Windows CI#14999
straight-shoota merged 6 commits intocrystal-lang:masterfrom
HertzDevil:refactor/window-libiconv-cygwin

Conversation

@HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Sep 13, 2024

Resolves part of #14802. This uses the official releases and build instructions.

To compile code with this PR using a Windows Crystal compiler without this PR, either the new library files (lib\iconv.lib, lib\iconv-dynamic.lib, iconv-2.dll) shall be copied to that existing Crystal installation, or CRYSTAL_LIBRARY_PATH shall include the new lib directory so that the @[Link] annotation will pick up the new iconv-2.dll on program builds. Otherwise, compiled programs will continue to look for the old libiconv.dll, and silently break if it is not in %PATH% (which is hopefully rare since most of the time Crystal itself is also in %PATH%).

Cygwin's location is currently hardcoded to C:\cygwin64, the default installation location for 64-bit Cygwin.

Cygwin itself doesn't have native ARM64 support, but cross-compilation should be possible by simply using the x64-to-ARM64 cross tools MSVC developer prompt on an ARM64 machine.

@HertzDevil HertzDevil added kind:refactor platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:text topic:infrastructure/ci labels Sep 13, 2024
@HertzDevil HertzDevil marked this pull request as ready for review September 14, 2024 05:30
@straight-shoota straight-shoota added this to the 1.14.0 milestone Sep 16, 2024
@straight-shoota straight-shoota merged commit 5c18900 into crystal-lang:master Sep 17, 2024
@HertzDevil HertzDevil deleted the refactor/window-libiconv-cygwin branch September 17, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:refactor platform:windows Windows support based on the MSVC toolchain / Win32 API topic:infrastructure/ci topic:stdlib:text

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants