[llvm] [llvm-ar] fix inconsistent case sensitivity for path matching on Windows (PR #196541)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 00:58:04 PDT 2026
================
@@ -27,3 +27,35 @@
# RUN: FileCheck %s -input-file=%t/thin-archive.a --check-prefix=EMPTY --implicit-check-not {{.}}
EMPTY: !<thin>
+
+# File instance counting should respect Windows case-insensitive name matching.
+# Otherwise, if you have foo.txt and FOO.TXT, "-N 2 foo.txt" fails because
+# file is not found.
+
+# RUN: rm -f %t/count-case.a
+# RUN: mkdir -p %t/a %t/b
+# RUN: echo first > %t/a/foo.txt
+# RUN: echo second > %t/b/FOO.TXT
+# RUN: llvm-ar rc %t/count-case.a %t/a/foo.txt %t/b/FOO.TXT
+
+# RUN: mkdir -p %t/out1 %t/out2
+# RUN: llvm-ar xN 1 --output %t/out1 %t/count-case.a foo.txt
----------------
jh7370 wrote:
FWIW, this case would still work without your changes. Is that by design?
https://github.com/llvm/llvm-project/pull/196541
More information about the llvm-commits
mailing list