[llvm] [llvm-objcopy] Allow -p on COFF targets (PR #171237)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 00:26:24 PST 2025


================
@@ -0,0 +1,48 @@
+## Note: ls -l prints the modified timestamp
+
+## Preserve dates when stripping to an output file.
+# RUN: yaml2obj %s -o %t.1.exe
+# RUN: touch -m -t 199705050555.55 %t.1.exe
+# RUN: llvm-strip -p %t.1.exe -o %t-preserved.1.exe
+# RUN: ls -l %t-preserved.1.exe | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
+# Check that the stripped output is in fact a valid object file.
----------------
jh7370 wrote:

Nit: ## for comments in newer llvm-objcopy tests. I think you can amend the comment too to mention the timestamp field.

https://github.com/llvm/llvm-project/pull/171237


More information about the llvm-commits mailing list