[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
Mon Jan 7 18:24:06 PST 2019


pcc created this revision.
pcc added reviewers: thakis, phosek.
Herald added a subscriber: mgorny.
Herald added a reviewer: serge-sans-paille.

Most significantly, this makes bin/llvm-lit executable so that it
can be run in the usual way.


Repository:
  rL LLVM

https://reviews.llvm.org/D56423

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


Index: llvm/utils/gn/build/write_cmake_config.py
===================================================================
--- llvm/utils/gn/build/write_cmake_config.py
+++ llvm/utils/gn/build/write_cmake_config.py
@@ -102,6 +102,8 @@
     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__':
     sys.exit(main())


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


More information about the llvm-commits mailing list