Fix oss.py script

- Adds newline fix from release branch
- Adds transformation for MessageLite from google3 to open source

Change-Id: Ie6c3f5263417fbbccc67835eb22fbe568a249125
This commit is contained in:
Himanshu Jaju
2020-06-04 20:19:58 +01:00
parent 841b92e943
commit fdd8038428
+4 -2
View File
@@ -88,6 +88,7 @@ def post_process_oss_files(path, args):
else:
top_dirs = ["cpp", "proto"]
transforms = (
("::google3_proto_compat::MessageLite", "::google::protobuf::MessageLite"),
("third_party/webrtc/files/stable/", ""),
("webrtc/files/stable/", ""),
("third_party/", ""),
@@ -154,8 +155,9 @@ def post_process_oss_files(path, args):
continue
if add_proto_lite_runtime and line.startswith("option "):
lines.append("option optimize_for = LITE_RUNTIME;")
modified = True
if not line.startswith("option optimize_for = LITE_RUNTIME"):
lines.append("option optimize_for = LITE_RUNTIME;\n")
modified = True
# LITE_RUNTIME should be added only once per file.
add_proto_lite_runtime = False