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())