[PATCH] D68033: [llvm-ar] Make paths case insensitive when on windows

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 10:32:35 PDT 2019


rupprecht added a comment.

In D68033#1703605 <https://reviews.llvm.org/D68033#1703605>, @ruiu wrote:

> As jhenderson suggested, could you add a description about this behavior? Looks like llvm-ar doesn't have a manual page, so the second best thing to add a description is probably the help message for `--help`.


We have a command guide entry: http://llvm.org/docs/CommandGuide/llvm-ar.html
And it looks like that is also available (at least on debian-based systems) via `man llvm-ar-8`
+1 to documenting it there.

> 
> 
> In D68033#1703583 <https://reviews.llvm.org/D68033#1703583>, @MaskRay wrote:
> 
>> Case insensitivity and platform differences do make me sad, but if people think it is the right thing to do on Windows I'll not insist.
> 
> 
> Well I'm not happy about this change, but this is probably an unavoidable consequence of the decision that Microsoft made in the early 80s...

:)



================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:509
+#else
+  return normalizePath(Path1) == normalizePath(Path2);
+#endif
----------------
I'm not quite sure about this change... a few of the callsites before were `Name == normalizePath(Path)`, not `normalizePath(Name) == normalizePath(Path)`. My past experiences of compatibility testing llvm-ar vs GNU ar has largely been paged out, but I think this may have been one of the differences. It may actually be something we want, but we should test it. e.g. to test the `performReadOperation` can you see if extracting "foo/file.txt" will end up extracting "bar/file.txt" (in a situation where `CompareFullPath` is false)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68033/new/

https://reviews.llvm.org/D68033





More information about the llvm-commits mailing list