gn build: Copy file permissions from input file in configure_file() emulation.

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

Differential Revision: https://reviews.llvm.org/D56423

llvm-svn: 350688
This commit is contained in:
Peter Collingbourne 2019-01-09 04:39:29 +00:00
parent 2fa8e2d8a8
commit 17f10abe1a
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ def main():
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__':