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 @@ -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__':