[llvm] [llvm][support] Refactor symlink handling and add readlink (PR #184256)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 10:02:37 PST 2026
================
@@ -445,6 +443,13 @@ std::error_code create_link(const Twine &to, const Twine &from) {
return std::error_code();
}
+std::error_code create_link(const Twine &to, const Twine &from) {
+ std::error_code EC = create_symlink(to, from);
----------------
MaskRay wrote:
On Unix, the old code was symlink-only. The new code tries symlink then falls back to hard link. This means create_link on Unix now silently creates a hard link if symlink fails. Is this the desired behavior? I think it's acceptable to change Windows behavior.
https://github.com/llvm/llvm-project/pull/184256
More information about the llvm-commits
mailing list