[PATCH] D62718: [llvm-objcopy] Change output file permissions to be the same as the input file

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 23:06:05 PDT 2019


abrachet marked an inline comment as done.
abrachet added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:231
 
-  if (auto EC = sys::fs::setLastAccessAndModificationTime(
-          FD, Stat.getLastAccessedTime(), Stat.getLastModificationTime()))
+  if (RestoreDate)
+    if (auto EC = sys::fs::setLastAccessAndModificationTime(
----------------
We could have -p preserve permissions ignoring both the umask and whether or not it is an executable object. Although it is a little bit strange to have --preserve-date do this too, but I figured I would suggest while we are working on this now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62718





More information about the llvm-commits mailing list