Merge "Changes to bionic/libc to demonstrate mixed builds."
diff --git a/libc/Android.bp b/libc/Android.bp
index cce23b3..d739ce6 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1268,6 +1268,7 @@
     srcs: ["SYSCALLS.TXT"],
     tool_files: [":bionic-gensyscalls"],
     cmd: "$(location :bionic-gensyscalls) arm $(in) > $(out)",
+    bazel_module: { label: "//bionic/libc:syscalls-arm" }
 }
 
 genrule {
@@ -1276,6 +1277,7 @@
     srcs: ["SYSCALLS.TXT"],
     tool_files: [":bionic-gensyscalls"],
     cmd: "$(location :bionic-gensyscalls) arm64 $(in) > $(out)",
+    bazel_module: { label: "//bionic/libc:syscalls-arm64" },
 }
 
 genrule {
@@ -1284,6 +1286,7 @@
     srcs: ["SYSCALLS.TXT"],
     tool_files: [":bionic-gensyscalls"],
     cmd: "$(location :bionic-gensyscalls) x86 $(in) > $(out)",
+    bazel_module: { label: "//bionic/libc:syscalls-x86" },
 }
 
 genrule {
@@ -1292,6 +1295,7 @@
     srcs: ["SYSCALLS.TXT"],
     tool_files: [":bionic-gensyscalls"],
     cmd: "$(location :bionic-gensyscalls) x86_64 $(in) > $(out)",
+    bazel_module: { label: "//bionic/libc:syscalls-x86_64" },
 }
 
 cc_library_static {
diff --git a/libc/BUILD.bazel b/libc/BUILD.bazel
new file mode 100644
index 0000000..2fda45f
--- /dev/null
+++ b/libc/BUILD.bazel
@@ -0,0 +1,36 @@
+# This file added for experimental interoperability with Bazel.
+package(
+    default_visibility = ["@//:__pkg__"],
+)
+
+genrule(
+    name = "syscalls-arm",
+    outs = ["syscalls-arm.S"],
+    srcs = ["SYSCALLS.TXT"],
+    tools = ["//bionic/libc/tools:bionic-gensyscalls"],
+    cmd = "$(location //bionic/libc/tools:bionic-gensyscalls) arm $< > $@",
+)
+
+genrule(
+    name = "syscalls-arm64",
+    outs = ["syscalls-arm64.S"],
+    srcs = ["SYSCALLS.TXT"],
+    tools = ["//bionic/libc/tools:bionic-gensyscalls"],
+    cmd = "$(location //bionic/libc/tools:bionic-gensyscalls) arm64 $< > $@",
+)
+
+genrule(
+    name = "syscalls-x86",
+    outs = ["syscalls-x86.S"],
+    srcs = ["SYSCALLS.TXT"],
+    tools = ["//bionic/libc/tools:bionic-gensyscalls"],
+    cmd = "$(location //bionic/libc/tools:bionic-gensyscalls) x86 $< > $@",
+)
+
+genrule(
+    name = "syscalls-x86_64",
+    outs = ["syscalls-x86_64.S"],
+    srcs = ["SYSCALLS.TXT"],
+    tools = ["//bionic/libc/tools:bionic-gensyscalls"],
+    cmd = "$(location //bionic/libc/tools:bionic-gensyscalls) x86_64 $< > $@",
+)
diff --git a/libc/tools/BUILD.bazel b/libc/tools/BUILD.bazel
new file mode 100644
index 0000000..469cfab
--- /dev/null
+++ b/libc/tools/BUILD.bazel
@@ -0,0 +1,8 @@
+# This file added for experimental interoperability with Bazel.
+package(default_visibility = ["//visibility:private"])
+
+filegroup(
+    name = "bionic-gensyscalls",
+    srcs = ["gensyscalls.py"],
+    visibility = ["//bionic/libc:__pkg__"],
+)