More google3 fixes.
diff --git a/benchmarks/BUILD b/benchmarks/BUILD
index 1697e34..7d05232 100644
--- a/benchmarks/BUILD
+++ b/benchmarks/BUILD
@@ -80,6 +80,7 @@
 py_binary(
     name = "gen_synthetic_protos",
     srcs = ["gen_synthetic_protos.py"],
+    python_version = "PY3",
 )
 
 py_binary(
@@ -103,7 +104,7 @@
         "100_fields.proto",
         "200_fields.proto",
     ],
-    cmd = "$(execpath :gen_synthetic_protos) $(GENDIR)",
+    cmd = "$(execpath :gen_synthetic_protos) $(RULEDIR)",
 )
 
 proto_library(
@@ -145,7 +146,7 @@
     testonly = 1,
     gen = ":gen_upb_binary_c",
     args = [
-        "benchmarks/" + k + ".upb.h", 
+        package_name() + "/" + k + ".upb.h",
         "upb_benchmark_" + v,
     ],
     deps = [
@@ -157,7 +158,7 @@
     testonly = 1,
     gen = ":gen_protobuf_binary_cc",
     args = [
-        "benchmarks/" + k + ".pb.h",
+        package_name() + "/" + k + ".pb.h",
         "upb_benchmark::" + v,
     ],
     deps = [
@@ -174,7 +175,7 @@
     testonly = 1,
     gen = ":gen_protobuf_binary_cc",
     args = [
-        "benchmarks/" + k + "_lite.pb.h",
+        package_name() + "/" + k + "_lite.pb.h",
         "upb_benchmark::" + v,
     ],
     deps = [
diff --git a/benchmarks/build_defs.bzl b/benchmarks/build_defs.bzl
index 731ba04..533c844 100644
--- a/benchmarks/build_defs.bzl
+++ b/benchmarks/build_defs.bzl
@@ -25,6 +25,10 @@
     )
 
     native.cc_binary(
+        # copybara:insert_for_google3_begin
+        # malloc="//base:system_malloc",
+        # features = ["-static_linking_mode"],
+        # copybara:insert_end
         name = name,
         srcs = srcs,
         **kwargs,
@@ -41,7 +45,7 @@
         cmd = "cp $< $@ && chmod a+w $@ && echo 'option optimize_for = LITE_RUNTIME;' >> $@",
     )
 
-    native.proto_library(
+    proto_library(
         name = name + "_proto",
         srcs = outs,
     )
diff --git a/benchmarks/gen_synthetic_protos.py b/benchmarks/gen_synthetic_protos.py
index 2d28aa8..a95deff 100644
--- a/benchmarks/gen_synthetic_protos.py
+++ b/benchmarks/gen_synthetic_protos.py
@@ -51,21 +51,21 @@
     print("WARNING: old Python version, field types are not properly weighted!")
     return [random.choice(population) for _ in range(k)]
 
-with open(base + "/benchmarks/100_msgs.proto", "w") as f:
+with open(base + "/100_msgs.proto", "w") as f:
   f.write('syntax = "proto3";\n')
   f.write('package upb_benchmark;\n')
   f.write('message Message {}\n')
   for i in range(2, 101):
     f.write('message Message{i} {{}}\n'.format(i=i))
 
-with open(base + "/benchmarks/200_msgs.proto", "w") as f:
+with open(base + "/200_msgs.proto", "w") as f:
   f.write('syntax = "proto3";\n')
   f.write('package upb_benchmark;\n')
   f.write('message Message {}\n')
   for i in range(2, 501):
     f.write('message Message{i} {{}}\n'.format(i=i))
 
-with open(base + "/benchmarks/100_fields.proto", "w") as f:
+with open(base + "/100_fields.proto", "w") as f:
   f.write('syntax = "proto2";\n')
   f.write('package upb_benchmark;\n')
   f.write('enum Enum { ZERO = 0; }\n')
@@ -78,7 +78,7 @@
     i += 1
   f.write('}\n')
 
-with open(base + "/benchmarks/200_fields.proto", "w") as f:
+with open(base + "/200_fields.proto", "w") as f:
   f.write('syntax = "proto2";\n')
   f.write('package upb_benchmark;\n')
   f.write('enum Enum { ZERO = 0; }\n')