Repository navigation
Use Windows symlinks when available - #13494
Merged
Merged
Conversation
dra27
force-pushed
the
windows-ln
branch
5 times, most recently
from
September 28, 2024 23:25
4ac7efa to
43ac4e3
Compare
gasche
approved these changes
Sep 29, 2024
gasche
left a comment
Member
There was a problem hiding this comment.
The code looks reasonable to me, approved.
dra27
marked this pull request as draft
September 30, 2024 13:21
Member
Author
|
Chatting to @MisterDA, I realise there's a slight error with the configuration for Cygwin/MSYS2 here which I'll fix shortly. The change in |
dra27
force-pushed
the
windows-ln
branch
2 times, most recently
from
October 3, 2024 13:40
81193c9 to
e265efa
Compare
dra27
marked this pull request as ready for review
October 3, 2024 13:41
MisterDA
approved these changes
Oct 23, 2024
Previously Windows unconditionally uses `cp`, doubling the size required for the OCaml binaries. `configure` now determines if `ln` creates native symlinks and only uses `cp` if that fails. Users of the compiler are simply required to enable Developer Mode (or build OCaml using an elevated shell).
Slightly easier detection, and a somewhat hardened implementation.
This was referenced Jan 9, 2025
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.
The impact of this is not as profound as it was prior to #11993, but it still saves in >60MiB on current trunk installations on Windows.
The mechanism used for creating native Windows symlinks is as introduced in #12198 - Cygwin will create native symlinks if
winsymlinks:nativeis included in theCYGWINenvironment variable (the MSYS2 fork of Cygwin uses theMSYSenvironment variable instead). The behaviour under this setting is to use native symlinks if available and fallback to emulation otherwise. If instead of:native,:nativestrictis used, thenln -sfails if native symlinks cannot be created. This creates a simple test inconfigure, and we fallback to the previouscp -pfotherwise.