Merge changes from topic "rs_soong"

* changes:
  Convert rs2spirv to Android.bp
  Convert libspirit to Android.bp
diff --git a/rsov/compiler/Android.bp b/rsov/compiler/Android.bp
new file mode 100644
index 0000000..61dd921
--- /dev/null
+++ b/rsov/compiler/Android.bp
@@ -0,0 +1,109 @@
+//
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+//=====================================================================
+// Unit tests for Wrapper module
+//=====================================================================
+
+cc_test_host {
+    name: "Wrapper_test",
+    defaults: [
+        "llvm-defaults",
+        "spirit_defaults",
+    ],
+
+    srcs: [
+        "Builtin.cpp",
+        "Context.cpp",
+        "GlobalAllocSPIRITPass.cpp",
+        "RSAllocationUtils.cpp",
+        "Wrapper.cpp",
+        "Wrapper_test.cpp",
+    ],
+
+    shared_libs: [
+        "libLLVM_android",
+        "libbcinfo",
+        "libspirit",
+    ],
+}
+
+//=====================================================================
+// Unit tests for Builtin module
+//=====================================================================
+
+cc_test_host {
+    name: "Builtin_test",
+    defaults: ["spirit_defaults"],
+
+    srcs: [
+        "Builtin.cpp",
+        "Builtin_test.cpp",
+    ],
+
+    shared_libs: ["libspirit"],
+}
+
+//=====================================================================
+// Host and Device Executable rs2spirv
+//=====================================================================
+
+cc_binary {
+    name: "rs2spirv",
+    defaults: [
+        "llvm-defaults",
+        "spirit_defaults",
+    ],
+    host_supported: true,
+    device_supported: false,
+
+    srcs: [
+        "rs2spirv.cpp",
+        "Builtin.cpp",
+        "Context.cpp",
+        "GlobalAllocPass.cpp",
+        "GlobalAllocSPIRITPass.cpp",
+        "GlobalMergePass.cpp",
+        "InlinePreparationPass.cpp",
+        "RemoveNonkernelsPass.cpp",
+        "RSAllocationUtils.cpp",
+        "RSSPIRVWriter.cpp",
+        "Wrapper.cpp",
+    ],
+
+    // TODO: fix the remaining warnings
+    cflags: [
+        "-D_SPIRV_LLVM_API",
+        "-Wno-error=pessimizing-move",
+        "-Wno-error=unused-variable",
+        "-Wno-error=unused-private-field",
+        "-Wno-error=unused-function",
+        "-Wno-error=dangling-else",
+        "-Wno-error=ignored-qualifiers",
+        "-Wno-error=non-virtual-dtor",
+
+        // For debug builds
+        //"-O0",
+        //"-DRS2SPIRV_DEBUG=1",
+    ],
+
+    shared_libs: [
+        "libLLVM_android",
+        "libbcinfo",
+        "libSPIRV",
+        "libspirit",
+    ],
+}
diff --git a/rsov/compiler/Android.mk b/rsov/compiler/Android.mk
deleted file mode 100644
index 9eab5a2..0000000
--- a/rsov/compiler/Android.mk
+++ /dev/null
@@ -1,199 +0,0 @@
-#
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-LLVM_ROOT_PATH := external/llvm
-LIBBCC_ROOT_PATH := frameworks/compile/libbcc
-LIBSPIRV_ROOT_PATH := external/spirv-llvm/lib/SPIRV
-
-FORCE_RS2SPIRV_DEBUG_BUILD ?= false
-RS2SPRIV_DEVICE_BUILD ?= true
-
-RS2SPIRV_SOURCES := \
-  rs2spirv.cpp \
-  Builtin.cpp \
-  Context.cpp \
-  GlobalAllocPass.cpp \
-  GlobalAllocSPIRITPass.cpp \
-  GlobalMergePass.cpp \
-  InlinePreparationPass.cpp \
-  RemoveNonkernelsPass.cpp \
-  RSAllocationUtils.cpp \
-  RSSPIRVWriter.cpp \
-  Wrapper.cpp \
-
-RS2SPIRV_INCLUDES := \
-  $(LIBSPIRV_ROOT_PATH) \
-  $(LIBSPIRV_ROOT_PATH)/Mangler \
-  $(LIBSPIRV_ROOT_PATH)/libSPIRV \
-  $(LIBBCC_ROOT_PATH)/include \
-  $(LLVM_ROOT_PATH)/include \
-  $(LLVM_ROOT_PATH)/host/include
-
-#=====================================================================
-# Unit tests for Wrapper module
-#=====================================================================
-
-include $(CLEAR_VARS)
-include $(CLEAR_TBLGEN_VARS)
-
-LOCAL_SRC_FILES := \
-  Builtin.cpp \
-  Context.cpp \
-  GlobalAllocSPIRITPass.cpp \
-  RSAllocationUtils.cpp \
-  Wrapper.cpp \
-  Wrapper_test.cpp \
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_SHARED_LIBRARIES := libLLVM_android libbcinfo libspirit
-
-LOCAL_C_INCLUDES := \
-  $(LLVM_ROOT_PATH)/include \
-  $(LLVM_ROOT_PATH)/host/include
-
-# End protobuf section
-
-LOCAL_MODULE := Wrapper_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-
-include $(LLVM_ROOT_PATH)/llvm.mk
-include $(LLVM_HOST_BUILD_MK)
-include $(LLVM_GEN_INTRINSICS_MK)
-include $(LLVM_GEN_ATTRIBUTES_MK)
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Unit tests for Builtin module
-#=====================================================================
-
-include $(CLEAR_VARS)
-include $(CLEAR_TBLGEN_VARS)
-
-LOCAL_SRC_FILES := \
-  Builtin.cpp \
-  Builtin_test.cpp \
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_SHARED_LIBRARIES := libspirit
-
-# End protobuf section
-
-LOCAL_MODULE := Builtin_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Host Executable rs2spirv
-#=====================================================================
-
-# Don't build for unbundled branches
-ifeq (,$(TARGET_BUILD_APPS))
-
-include $(CLEAR_VARS)
-include $(CLEAR_TBLGEN_VARS)
-
-LOCAL_SRC_FILES := \
-  $(RS2SPIRV_SOURCES)
-
-LOCAL_C_INCLUDES := \
-  $(RS2SPIRV_INCLUDES)
-
-LOCAL_MODULE := rs2spirv
-LOCAL_MODULE_CLASS := EXECUTABLES
-
-# TODO: fix the remaining warnings
-
-LOCAL_CFLAGS += $(TOOL_CFLAGS) \
-  -D_SPIRV_LLVM_API \
-  -Wno-error=pessimizing-move \
-  -Wno-error=unused-variable \
-  -Wno-error=unused-private-field \
-  -Wno-error=unused-function \
-  -Wno-error=dangling-else \
-  -Wno-error=ignored-qualifiers \
-  -Wno-error=non-virtual-dtor
-
-ifeq (true, $(FORCE_RS2SPIRV_DEBUG_BUILD))
-  LOCAL_CFLAGS += -O0 -DRS2SPIRV_DEBUG=1
-endif
-
-LOCAL_SHARED_LIBRARIES := libLLVM_android libbcinfo libSPIRV libspirit
-
-include $(LLVM_ROOT_PATH)/llvm.mk
-include $(LLVM_HOST_BUILD_MK)
-include $(LLVM_GEN_INTRINSICS_MK)
-include $(LLVM_GEN_ATTRIBUTES_MK)
-include $(BUILD_HOST_EXECUTABLE)
-
-endif # Don't build in unbundled branches
-
-#=====================================================================
-# Device Executable rs2spirv
-#=====================================================================
-
-ifneq (true,$(RS2SPRIV_DEVICE_BUILD)))
-
-include $(CLEAR_VARS)
-include $(CLEAR_TBLGEN_VARS)
-
-LOCAL_SRC_FILES := \
-  $(RS2SPIRV_SOURCES)
-
-LOCAL_C_INCLUDES := \
-  $(RS2SPIRV_INCLUDES)
-
-LOCAL_MODULE := rs2spirv
-LOCAL_MODULE_CLASS := EXECUTABLES
-
-LOCAL_SHARED_LIBRARIES += libLLVM_android libbcinfo libSPIRV libspirit
-
-LOCAL_CFLAGS += $(TOOL_CFLAGS) \
-  -D_SPIRV_LLVM_API \
-  -Wno-error=pessimizing-move \
-  -Wno-error=unused-variable \
-  -Wno-error=unused-private-field \
-  -Wno-error=unused-function \
-  -Wno-error=dangling-else \
-  -Wno-error=ignored-qualifiers \
-  -Wno-error=non-virtual-dtor \
-
-ifeq (true, $(FORCE_RS2SPIRV_DEBUG_BUILD))
-  LOCAL_CFLAGS += -O0 -DRS2SPIRV_DEBUG=1
-endif
-
-include $(LLVM_GEN_INTRINSICS_MK)
-include $(LLVM_GEN_ATTRIBUTES_MK)
-include $(LLVM_DEVICE_BUILD_MK)
-include $(BUILD_EXECUTABLE)
-
-endif # Don't build in unbundled branches
-
-#=====================================================================
-# Include Subdirectories
-#=====================================================================
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/rsov/compiler/spirit/Android.bp b/rsov/compiler/spirit/Android.bp
new file mode 100644
index 0000000..043e851
--- /dev/null
+++ b/rsov/compiler/spirit/Android.bp
@@ -0,0 +1,172 @@
+//
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_defaults {
+    name: "spirit_defaults",
+
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    target: {
+        host: {
+            compile_multilib: "first",
+        },
+    },
+    product_variables: {
+        pdk: {
+            enabled: false,
+        },
+        unbundled_build: {
+            enabled: false,
+        },
+    },
+}
+
+python_binary_host {
+    name: "libspirit_generate_py",
+    main: "generate.py",
+    srcs: ["generate.py"],
+    version: {
+        py2: {
+            enabled: true,
+            embedded_launcher: true,
+        },
+        py3: {
+            enabled: false,
+        },
+    },
+}
+
+genrule {
+    name: "libspirit_gen",
+    tools: ["libspirit_generate_py"],
+    cmd: "$(location libspirit_generate_py) $(location :spirv.core.grammar.json-1.1) " +
+        "--instructions=$(location instructions_generated.h) " +
+        "--types=$(location types_generated.h) " +
+        "--opcodes=$(location opcodes_generated.h) " +
+        "--instruction_dispatches=$(location instruction_dispatches_generated.h) " +
+        "--enum_dispatches=$(location enum_dispatches_generated.h) " +
+        "--type_inst_dispatches=$(location type_inst_dispatches_generated.h) " +
+        "--const_inst_dispatches=$(location const_inst_dispatches_generated.h) " +
+        "--factory_methods=$(location factory_methods_generated.h)",
+    srcs: [":spirv.core.grammar.json-1.1"],
+    out: [
+        "instructions_generated.h",
+        "types_generated.h",
+        "opcodes_generated.h",
+        "instruction_dispatches_generated.h",
+        "enum_dispatches_generated.h",
+        "type_inst_dispatches_generated.h",
+        "const_inst_dispatches_generated.h",
+        "factory_methods_generated.h",
+    ],
+}
+
+//=====================================================================
+// Host and device shared library libspirit.so
+//=====================================================================
+cc_library_shared {
+    name: "libspirit",
+    defaults: ["spirit_defaults"],
+    host_supported: true,
+
+    srcs: [
+        "builder.cpp",
+        "entity.cpp",
+        "instructions.cpp",
+        "module.cpp",
+        "pass.cpp",
+        "pass_queue.cpp",
+        "transformer.cpp",
+        "visitor.cpp",
+        "word_stream.cpp",
+        "word_stream_impl.cpp",
+    ],
+
+    generated_headers: ["libspirit_gen"],
+    export_generated_headers: ["libspirit_gen"],
+
+    export_include_dirs: ["."],
+
+    target: {
+        android: {
+            cflags: ["-Wno-error=non-virtual-dtor"],
+        },
+    },
+}
+
+//=====================================================================
+// Tests for host module word_stream
+//=====================================================================
+cc_test_host {
+    name: "word_stream_test",
+    defaults: ["spirit_defaults"],
+    srcs: [
+        "word_stream.cpp",
+        "word_stream_impl.cpp",
+        "word_stream_test.cpp",
+    ],
+    generated_headers: ["libspirit_gen"],
+}
+
+//=====================================================================
+// Tests for host module instructions
+//=====================================================================
+
+cc_test_host {
+    name: "instructions_test",
+    defaults: ["spirit_defaults"],
+    srcs: [
+        "entity.cpp",
+        "instructions.cpp",
+        "instructions_test.cpp",
+        "visitor.cpp",
+        "word_stream.cpp",
+        "word_stream_impl.cpp",
+    ],
+    generated_headers: ["libspirit_gen"],
+}
+
+//=====================================================================
+// Tests for host module pass queue
+//=====================================================================
+
+cc_test_host {
+    name: "pass_queue_test",
+    defaults: ["spirit_defaults"],
+    srcs: [
+        "pass.cpp",
+        "pass_queue.cpp",
+        "pass_queue_test.cpp",
+    ],
+    shared_libs: ["libspirit"],
+}
+
+//=====================================================================
+// Tests for host shared library
+//=====================================================================
+
+cc_test_host {
+    name: "libspirit_test",
+    defaults: ["spirit_defaults"],
+    srcs: [
+        "builder_test.cpp",
+        "module_test.cpp",
+        "transformer_test.cpp",
+    ],
+    shared_libs: ["libspirit"],
+}
diff --git a/rsov/compiler/spirit/Android.mk b/rsov/compiler/spirit/Android.mk
deleted file mode 100644
index 1765979..0000000
--- a/rsov/compiler/spirit/Android.mk
+++ /dev/null
@@ -1,249 +0,0 @@
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-SPIRIT_SRCS := \
-	builder.cpp\
-	entity.cpp\
-	instructions.cpp\
-	module.cpp\
-	pass.cpp\
-	pass_queue.cpp\
-	transformer.cpp\
-	visitor.cpp\
-	word_stream.cpp\
-	word_stream_impl.cpp
-
-LIBNAME = libspirit
-
-NDK_PREBUILTS := $(TOP)/prebuilts/ndk/current
-SPIRV_TOOLS_PATH := $(NDK_PREBUILTS)/sources/third_party/shaderc/third_party/spirv-tools
-SPIRV_HEADERS_PATH := $(SPIRV_TOOLS_PATH)/external/spirv-headers
-SPIRV_CORE_GRAMMAR := $(SPIRV_HEADERS_PATH)/include/spirv/1.1/spirv.core.grammar.json
-GENERATOR := $(LOCAL_PATH)/generate.py
-
-LOCAL_CFLAGS := -Wall -Werror
-
-# Don't build for unbundled branches
-ifeq (,$(TARGET_BUILD_APPS))
-
-#=====================================================================
-# Host shared library libspirit.so
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(SPIRIT_SRCS)
-
-LOCAL_MODULE := $(LIBNAME)
-LOCAL_MULTILIB := first
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_IS_HOST_MODULE := true
-
-PATH_TO_GENERATED := $(local-generated-sources-dir)
-GEN := \
-	instructions_generated.h\
-	types_generated.h\
-	opcodes_generated.h\
-	instruction_dispatches_generated.h\
-	enum_dispatches_generated.h\
-	type_inst_dispatches_generated.h\
-	const_inst_dispatches_generated.h\
-	factory_methods_generated.h
-
-FULL_GEN := $(addprefix $(PATH_TO_GENERATED)/,$(GEN))
-$(FULL_GEN): $(SPIRV_CORE_GRAMMAR) $(GENERATOR)
-	$(GENERATOR) $< --$(notdir $(@:%_generated.h=%)) $@
-
-LOCAL_GENERATED_SOURCES := $(FULL_GEN)
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += $(PATH_TO_GENERATED)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) $(PATH_TO_GENERATED)
-
-include $(BUILD_HOST_SHARED_LIBRARY)
-
-#=====================================================================
-# Tests for host module word_stream
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-  word_stream.cpp \
-  word_stream_impl.cpp \
-  word_stream_test.cpp
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_MODULE := word_stream_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-LOCAL_IS_HOST_MODULE := true
-
-PATH_TO_GENERATED := $(local-generated-sources-dir)
-GEN := \
-	enum_dispatches_generated.h\
-	types_generated.h
-
-FULL_GEN := $(addprefix $(PATH_TO_GENERATED)/,$(GEN))
-$(FULL_GEN): $(SPIRV_CORE_GRAMMAR) $(GENERATOR)
-	$(GENERATOR) $< --$(notdir $(@:%_generated.h=%)) $@
-
-LOCAL_GENERATED_SOURCES := $(FULL_GEN)
-
-LOCAL_C_INCLUDES += $(PATH_TO_GENERATED)
-
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Tests for host module instructions
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-  entity.cpp \
-  instructions.cpp \
-  instructions_test.cpp \
-  visitor.cpp \
-  word_stream.cpp \
-  word_stream_impl.cpp
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_MODULE := instructions_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-LOCAL_IS_HOST_MODULE := true
-
-PATH_TO_GENERATED := $(local-generated-sources-dir)
-GEN := \
-	enum_dispatches_generated.h\
-	instruction_dispatches_generated.h\
-	instructions_generated.h\
-	types_generated.h\
-	opcodes_generated.h
-
-FULL_GEN := $(addprefix $(PATH_TO_GENERATED)/,$(GEN))
-$(FULL_GEN): $(SPIRV_CORE_GRAMMAR) $(GENERATOR)
-	$(GENERATOR) $< --$(notdir $(@:%_generated.h=%)) $@
-
-LOCAL_GENERATED_SOURCES := $(FULL_GEN)
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += $(PATH_TO_GENERATED)
-
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Tests for host module pass queue
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-  pass.cpp \
-  pass_queue.cpp \
-  pass_queue_test.cpp \
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_SHARED_LIBRARIES := $(LIBNAME)
-
-LOCAL_MODULE := pass_queue_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-LOCAL_IS_HOST_MODULE := true
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Tests for host shared library
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-  builder_test.cpp \
-  module_test.cpp \
-  transformer_test.cpp \
-
-LOCAL_STATIC_LIBRARIES := libgtest_host
-
-LOCAL_SHARED_LIBRARIES := $(LIBNAME)
-
-LOCAL_MODULE := $(LIBNAME)_test
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_CLASS := NATIVE_TESTS
-LOCAL_IS_HOST_MODULE := true
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_HOST_NATIVE_TEST)
-
-#=====================================================================
-# Device shared library libspirit.so
-#=====================================================================
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(SPIRIT_SRCS)
-
-LOCAL_C_INCLUDES := $(SPIRIT_INCLUDES)
-
-LOCAL_MODULE := $(LIBNAME)
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-LOCAL_SHARED_LIBRARIES +=
-
-PATH_TO_GENERATED := $(local-generated-sources-dir)
-
-GEN := \
-	instructions_generated.h\
-	types_generated.h\
-	opcodes_generated.h\
-	instruction_dispatches_generated.h\
-	enum_dispatches_generated.h\
-	type_inst_dispatches_generated.h\
-	const_inst_dispatches_generated.h\
-	factory_methods_generated.h
-
-FULL_GEN := $(addprefix $(PATH_TO_GENERATED)/,$(GEN))
-$(FULL_GEN): $(SPIRV_CORE_GRAMMAR) $(GENERATOR)
-	$(GENERATOR) $< --$(notdir $(@:%_generated.h=%)) $@
-
-LOCAL_GENERATED_SOURCES := $(FULL_GEN)
-
-LOCAL_C_INCLUDES += $(PATH_TO_GENERATED)
-
-LOCAL_CFLAGS := -Wall -Werror -Wno-error=non-virtual-dtor
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) $(PATH_TO_GENERATED)
-
-include $(BUILD_SHARED_LIBRARY)
-
-endif # Don't build in unbundled branches