[PATCH] D56423: gn build: Copy file permissions from input file in configure_file() emulation.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 8 20:43:22 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350688: gn build: Copy file permissions from input file in configure_file() emulation. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56423?vs=180785&id=180787#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D56423

Files:
  llvm/trunk/utils/gn/build/write_cmake_config.py


Index: llvm/trunk/utils/gn/build/write_cmake_config.py
===================================================================
--- llvm/trunk/utils/gn/build/write_cmake_config.py
+++ llvm/trunk/utils/gn/build/write_cmake_config.py
@@ -101,6 +101,7 @@
 
     if not os.path.exists(args.output) or open(args.output).read() != output:
         open(args.output, 'w').write(output)
+        os.chmod(args.output, os.stat(args.input).st_mode & 0777)
 
 
 if __name__ == '__main__':


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56423.180787.patch
Type: text/x-patch
Size: 473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/546d09f8/attachment.bin>


More information about the llvm-commits mailing list