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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 05:53:18 PDT 2019


MaskRay added a comment.

In D68033#1688120 <https://reviews.llvm.org/D68033#1688120>, @gbreynoo wrote:

> My understanding is that although NTFS is case sensitive, the windows API makes file operations case insensitive by default.
>
> This means on Windows the two paths below are functionally the same:
>
> 1. c:\a\path\example
> 2. C:\A\PATH\EXAMPLE
>
>   As your snippet shows, gnu-ar treats these paths as the same when on Windows when doing member name comparisons e.g. when using the replace command one path will replace the other.
>
>   Under current llvm-ar behaviour they are considered as two different paths. If path 1 is stored in an archive, you can not select the member using path 2.


Agreed.

> This diff was put up for review to keep behaviour consistent with gnu-ar and with default windows path behaviour.

I asked because I want to make sure this patch is put up for practical use, not for a compatibility corner case that may rarely matter. I think most people may realize case insensitiveness on file systems is a bad idea. If my understanding is correct, llvm-lib used by Windows. llvm-ar is an ELF tool and it should match a generic ELF platform as close as possible and such platform disparity should be as little as possible.


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

https://reviews.llvm.org/D68033





More information about the llvm-commits mailing list