DO NOT MERGE - Skip qt-dev-plus-aosp-without-vendor (5713463) in stage-aosp-master

Bug: 134405016
Change-Id: Ibdfe6905183861a6a7cda499e146425eda7e0f73
diff --git a/Android.bp b/Android.bp
index 7c921dd..d8f5cff 100644
--- a/Android.bp
+++ b/Android.bp
@@ -417,35 +417,3 @@
     },
     stl: "none",
 }
-
-cc_defaults {
-    name: "asan_arch_defaults",
-
-    vendor_available: true,
-    enabled: false,
-    target: {
-        android_arm: {
-            enabled: true,
-        },
-        android_arm64: {
-            enabled: true,
-        },
-        android_mips: {
-            enabled: true,
-        },
-        android_mips64: {
-            enabled: true,
-        },
-        android_x86: {
-            enabled: true,
-        },
-        android_x86_64: {
-            enabled: true,
-        },
-        linux_glibc: {
-            enabled: true,
-        },
-    },
-}
-
-subdirs=["lib/*"]
diff --git a/lib/asan/Android.bp b/lib/asan/Android.bp
deleted file mode 100644
index ed4d740..0000000
--- a/lib/asan/Android.bp
+++ /dev/null
@@ -1,218 +0,0 @@
-//
-// Copyright (C) 2012 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.
-//
-//
-
-ASAN_NEEDS_SEGV = "0"
-ASAN_HAS_EXCEPTIONS = "1"
-ASAN_FLEXIBLE_MAPPING_AND_OFFSET = "0"
-
-asan_rtl_files = [
-    "asan_activation.cc",
-    "asan_allocator.cc",
-    "asan_fake_stack.cc",
-    "asan_flags.cc",
-    "asan_globals.cc",
-    "asan_interceptors.cc",
-    "asan_linux.cc",
-    "asan_mac.cc",
-    "asan_malloc_linux.cc",
-    "asan_malloc_mac.cc",
-    "asan_malloc_win.cc",
-    "asan_poisoning.cc",
-    "asan_posix.cc",
-    "asan_report.cc",
-    "asan_rtl.cc",
-    "asan_stack.cc",
-    "asan_stats.cc",
-    "asan_suppressions.cc",
-    "asan_thread.cc",
-    "asan_win.cc",
-]
-
-asan_rtl_cxx_files = ["asan_new_delete.cc"]
-
-asan_rtl_cflags = [
-    "-fvisibility=hidden",
-    "-fno-exceptions",
-    "-DASAN_LOW_MEMORY=1",
-    "-DASAN_NEEDS_SEGV=" + ASAN_NEEDS_SEGV,
-    "-DASAN_HAS_EXCEPTIONS=" + ASAN_HAS_EXCEPTIONS,
-    "-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=" + ASAN_FLEXIBLE_MAPPING_AND_OFFSET,
-    "-Wall",
-    "-Werror",
-    "-Wno-covered-switch-default",
-    "-Wno-non-virtual-dtor",
-    "-Wno-sign-compare",
-    "-Wno-unused-parameter",
-    "-std=c++11",
-    "-fno-rtti",
-    "-fno-builtin",
-]
-
-cc_library_static {
-    name: "libasan",
-    host_supported: true,
-    recovery_available: true,
-    native_bridge_supported: true,
-    defaults: ["asan_arch_defaults"],
-    include_dirs: [
-        "external/compiler-rt/lib",
-        "external/compiler-rt/include",
-    ],
-    cflags: asan_rtl_cflags,
-    target: {
-        android: {
-            srcs: ["asan_preinit.cc"],
-            system_shared_libs: [],
-        },
-        host: {
-            srcs: asan_rtl_files,
-            whole_static_libs: [
-                "libubsan",
-                "libinterception",
-                "liblsan",
-                "libsan"
-            ],
-        },
-    },
-
-    sdk_version: "19",
-    stl: "none",
-
-    sanitize: {
-        never: true,
-    },
-}
-
-cc_library_host_static {
-    name: "libasan_cxx",
-    include_dirs: [
-        "external/compiler-rt/lib",
-        "external/compiler-rt/include",
-    ],
-    cflags: asan_rtl_cflags,
-    srcs: asan_rtl_cxx_files,
-
-    compile_multilib: "both",
-
-    sanitize: {
-        never: true,
-    },
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_binary {
-    name: "asanwrapper",
-    defaults: ["asan_arch_defaults"],
-
-    srcs: ["asanwrapper.cc"],
-
-    cflags: ["-Wall", "-Werror"],
-    cppflags: ["-std=c++11"],
-    sanitize: {
-        never: true,
-    },
-
-    stl: "libc++",
-}
-
-// ANDROIDMK TRANSLATION ERROR: unsupported conditional
-// ifneq (true,$(SKIP_LLVM_TESTS))
-cc_library_static {
-    name: "libasan_noinst_test",
-    host_supported: true,
-    defaults: ["asan_arch_defaults"],
-
-    include_dirs: [
-        "external/compiler-rt/include",
-        "external/compiler-rt/lib",
-        "external/compiler-rt/lib/asan/tests",
-        "external/compiler-rt/lib/sanitizer_common/tests",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wno-non-virtual-dtor",
-        "-Wno-unused-parameter",
-        "-Wno-sign-compare",
-        "-DASAN_UAR=0",
-        "-DASAN_HAS_BLACKLIST=1",
-        "-DASAN_HAS_EXCEPTIONS=" + ASAN_HAS_EXCEPTIONS,
-        "-DASAN_NEEDS_SEGV=" + ASAN_NEEDS_SEGV,
-        "-std=c++11",
-    ],
-    srcs: [
-        "tests/asan_noinst_test.cc",
-        "tests/asan_test_main.cc",
-    ],
-
-    static_libs: ["libgtest"],
-
-    sanitize: {
-        never: true,
-    },
-
-    stl: "libc++",
-}
-
-cc_test {
-    name: "asan_test",
-    host_supported: true,
-    defaults: ["asan_arch_defaults"],
-
-    include_dirs: [
-        "external/compiler-rt/lib",
-        "external/compiler-rt/lib/asan/tests",
-        "external/compiler-rt/lib/sanitizer_common/tests",
-    ],
-    cflags: [
-        "-DASAN_LOW_MEMORY=1",
-        "-DASAN_UAR=0",
-        "-DASAN_NEEDS_SEGV=" + ASAN_NEEDS_SEGV,
-        "-DASAN_HAS_EXCEPTIONS=" + ASAN_HAS_EXCEPTIONS,
-        "-DASAN_HAS_BLACKLIST=1",
-        "-Wall",
-        "-Werror",
-        "-Wno-covered-switch-default",
-        "-Wno-non-virtual-dtor",
-        "-Wno-sign-compare",
-        "-Wno-unused-parameter",
-        "-std=c++11",
-    ],
-
-    srcs: [
-        "tests/asan_globals_test.cc",
-        "tests/asan_test.cc",
-        //"tests/asan_noinst_test.cc",
-        //"tests/asan_test_main.cc",
-    ],
-
-    static_libs: ["libasan_noinst_test"],
-    sanitize: {
-        address: true,
-        blacklist: "tests/asan_test.ignore",
-    },
-
-    stl: "libc++",
-}
-
-// ANDROIDMK TRANSLATION ERROR: endif from unsupported contitional
-// endif
-// SKIP_LLVM_TESTS
diff --git a/lib/interception/Android.bp b/lib/interception/Android.bp
deleted file mode 100644
index edca9e6..0000000
--- a/lib/interception/Android.bp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Copyright (C) 2015 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_library_static {
-    name: "libinterception",
-    host_supported: true,
-    sdk_version: "19",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-    cppflags: [
-        "-fvisibility=hidden",
-        "-fno-exceptions",
-        "-std=c++11",
-        "-Wno-unused-parameter",
-    ],
-    srcs: [
-        "interception_linux.cc",
-        "interception_mac.cc",
-        "interception_type_test.cc",
-        "interception_win.cc",
-    ],
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-}
diff --git a/lib/lsan/Android.bp b/lib/lsan/Android.bp
deleted file mode 100644
index 80e43be..0000000
--- a/lib/lsan/Android.bp
+++ /dev/null
@@ -1,50 +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.
-//
-//
-
-cc_library_static {
-    name: "liblsan",
-    host_supported: true,
-    defaults: ["asan_arch_defaults"],
-    include_dirs: [
-        "external/compiler-rt/lib",
-        "external/compiler-rt/include",
-    ],
-    cflags: [
-        "-fvisibility=hidden",
-        "-fno-exceptions",
-        "-Wno-covered-switch-default",
-        "-Wno-non-virtual-dtor",
-        "-Wno-sign-compare",
-        "-Wno-unused-parameter",
-        "-std=c++11",
-        "-fno-rtti",
-        "-fno-builtin",
-        "-Wall",
-        "-Werror",
-    ],
-    srcs: [
-        "lsan_common.cc",
-        "lsan_common_linux.cc",
-    ],
-
-    sdk_version: "19",
-    stl: "none",
-
-    sanitize: {
-        never: true,
-    },
-}
diff --git a/lib/profile/Android.bp b/lib/profile/Android.bp
deleted file mode 100644
index de76de9..0000000
--- a/lib/profile/Android.bp
+++ /dev/null
@@ -1,47 +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.
-//
-//
-
-//=====================================================================
-// Static Library: libprofile_rt
-//=====================================================================
-
-cc_library_static {
-    name: "libprofile_rt",
-    host_supported: true,
-
-    cflags: [
-        "-Werror",
-        "-Wall",
-    ],
-    srcs:  [
-        "GCDAProfiling.c",
-        "InstrProfiling.c",
-        "InstrProfilingBuffer.c",
-        "InstrProfilingFile.c",
-        "InstrProfilingPlatformDarwin.c",
-        "InstrProfilingPlatformOther.c",
-        "InstrProfilingRuntime.cc",
-        "InstrProfilingUtil.c",
-    ],
-
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-    stl: "none",
-    sdk_version: "21",
-}
diff --git a/lib/sanitizer_common/Android.bp b/lib/sanitizer_common/Android.bp
deleted file mode 100644
index 3783767..0000000
--- a/lib/sanitizer_common/Android.bp
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// Copyright (C) 2015 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.
-//
-//
-
-//###############################################################################
-// Host modules
-
-cc_library_static {
-    name: "libsan",
-    host_supported: true,
-    sdk_version: "19",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-    cppflags: [
-        "-fvisibility=hidden",
-        "-fno-exceptions",
-        "-fno-rtti",
-        "-fno-builtin",
-        "-std=c++11",
-        "-Wno-non-virtual-dtor",
-        "-Wno-unused-parameter",
-    ],
-    srcs: [
-        "*.cc",
-    ],
-    exclude_srcs: [
-        "sanitizer_common_nolibc.cc",
-    ],
-    arch: {
-        x86_64: {
-            srcs: [
-                "sanitizer_linux_x86_64.S",
-            ]
-        }
-    },
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-subdirs = ["tests"]
-
-// ANDROIDMK TRANSLATION ERROR: unsupported conditional
-// ifndef SANITIZE_HOST
-// ANDROIDMK TRANSLATION ERROR: unsupported include
-// include $(LOCAL_PATH)/tests/Android.mk
-// ANDROIDMK TRANSLATION ERROR: endif from unsupported contitional
-// endif
diff --git a/lib/sanitizer_common/tests/Android.bp b/lib/sanitizer_common/tests/Android.bp
deleted file mode 100644
index b82c2de..0000000
--- a/lib/sanitizer_common/tests/Android.bp
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// Copyright (C) 2015 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: "san_test_defaults",
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-    cppflags: [
-        "-fvisibility=hidden",
-        "-fno-exceptions",
-        "-fno-rtti",
-        "-std=c++11",
-        "-Wno-unused-parameter",
-        "-Wno-non-virtual-dtor",
-        "-Wno-format",
-    ],
-
-    include_dirs: ["external/compiler-rt/lib"],
-}
-
-
-cc_test_host {
-    name: "san_test",
-    defaults: ["san_test_defaults"],
-
-    srcs: [
-        "sanitizer_allocator_test.cc",
-        "sanitizer_atomic_test.cc",
-        "sanitizer_bitvector_test.cc",
-        "sanitizer_bvgraph_test.cc",
-        "sanitizer_common_test.cc",
-        "sanitizer_deadlock_detector_test.cc",
-        "sanitizer_flags_test.cc",
-        "sanitizer_format_interceptor_test.cc",
-        "sanitizer_ioctl_test.cc",
-        "sanitizer_libc_test.cc",
-        "sanitizer_linux_test.cc",
-        "sanitizer_list_test.cc",
-        "sanitizer_mutex_test.cc",
-        "sanitizer_nolibc_test.cc",
-        "sanitizer_posix_test.cc",
-        "sanitizer_printf_test.cc",
-        "sanitizer_procmaps_test.cc",
-        "sanitizer_stackdepot_test.cc",
-        "sanitizer_stacktrace_printer_test.cc",
-        "sanitizer_stacktrace_test.cc",
-        "sanitizer_stoptheworld_test.cc",
-        "sanitizer_suppressions_test.cc",
-        "sanitizer_test_main.cc",
-        "sanitizer_thread_registry_test.cc",
-    ],
-    static_libs: ["libsan"],
-    sanitize: {
-        never: true,
-    },
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_binary_host {
-    name: "san_test-Nolibc",
-    defaults: ["san_test_defaults"],
-
-    srcs: ["sanitizer_nolibc_test_main.cc"],
-    static_libs: [
-        "libsan",
-        "libgtest_host",
-    ],
-    ldflags: [
-        "-nostdlib",
-        "-Qunused-arguments",
-    ],
-    sanitize: {
-        never: true,
-    },
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
diff --git a/lib/tsan/Android.bp b/lib/tsan/Android.bp
deleted file mode 100644
index 13eb7da..0000000
--- a/lib/tsan/Android.bp
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// Copyright (C) 2015 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.
-//
-//
-
-tsan_rtl_cflags = [
-    "-Wall",
-    "-Werror",
-]
-
-tsan_rtl_cppflags = [
-    "-std=c++11",
-    "-Wno-unused-parameter",
-    "-Wno-non-virtual-dtor",
-    "-fno-rtti",
-    "-fno-builtin",
-]
-
-cc_library_host_static {
-    name: "libtsan",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    cflags: tsan_rtl_cflags,
-    cppflags: tsan_rtl_cppflags,
-    srcs: [
-        "rtl/*.cc",
-        "rtl/tsan_rtl_amd64.S",
-    ],
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "64",
-    whole_static_libs: [
-        "libinterception",
-        "libsan",
-        "libubsan",
-    ],
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_library_host_static {
-    name: "libtsan_cxx",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    cflags: tsan_rtl_cflags,
-    cppflags: tsan_rtl_cppflags,
-    srcs: ["rtl/tsan_new_delete.cc"],
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "64",
-    whole_static_libs: ["libubsan_cxx"],
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_test_host {
-    name: "libtsan_unit_test",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    local_include_dirs: ["rtl"],
-    cflags: tsan_rtl_cflags,
-    cppflags: tsan_rtl_cppflags,
-    srcs: [
-        "tests/unit/tsan_clock_test.cc",
-        "tests/unit/tsan_dense_alloc_test.cc",
-        "tests/unit/tsan_flags_test.cc",
-        "tests/unit/tsan_mman_test.cc",
-        "tests/unit/tsan_mutex_test.cc",
-        "tests/unit/tsan_mutexset_test.cc",
-        "tests/unit/tsan_shadow_test.cc",
-        "tests/unit/tsan_stack_test.cc",
-        "tests/unit/tsan_sync_test.cc",
-        "tests/unit/tsan_unit_test_main.cc",
-        "tests/unit/tsan_vector_test.cc",
-    ],
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "64",
-    static_libs: [
-        "libtsan",
-        "libubsan",
-    ],
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_test_host {
-    name: "libtsan_rtl_test",
-
-    include_dirs: ["external/compiler-rt/lib"],
-    local_include_dirs: ["rtl"],
-    cflags: tsan_rtl_cflags,
-    cppflags: tsan_rtl_cppflags,
-    srcs: [
-        "tests/rtl/tsan_bench.cc",
-        "tests/rtl/tsan_mop.cc",
-        "tests/rtl/tsan_mutex.cc",
-        "tests/rtl/tsan_posix.cc",
-        "tests/rtl/tsan_string.cc",
-        "tests/rtl/tsan_test_util_posix.cc",
-        "tests/rtl/tsan_test.cc",
-        "tests/rtl/tsan_thread.cc",
-    ],
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "64",
-    static_libs: [
-        "libtsan",
-        "libubsan",
-    ],
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
diff --git a/lib/ubsan/Android.bp b/lib/ubsan/Android.bp
deleted file mode 100644
index bcd176f..0000000
--- a/lib/ubsan/Android.bp
+++ /dev/null
@@ -1,215 +0,0 @@
-//
-// Copyright (C) 2015 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.
-//
-//
-
-ubsan_rtl_files = [
-    "ubsan_diag.cc",
-    "ubsan_init.cc",
-    "ubsan_flags.cc",
-    "ubsan_handlers.cc",
-    "ubsan_value.cc",
-]
-
-ubsan_cxx_rtl_files = [
-    "ubsan_handlers_cxx.cc",
-    "ubsan_type_hash.cc",
-    "ubsan_type_hash_itanium.cc",
-    "ubsan_type_hash_win.cc",
-]
-
-ubsan_rtl_cflags = [
-    "-Wall",
-    "-Werror",
-]
-
-ubsan_rtl_cppflags = [
-    "-fvisibility=hidden",
-    "-fno-exceptions",
-    "-std=c++11",
-    "-Wno-unused-parameter",
-    "-Wno-non-virtual-dtor",
-    "-DUBSAN_CAN_USE_CXXABI",
-]
-
-ubsan_rtl_c_includes = ["external/compiler-rt/lib"]
-
-cc_library_static {
-    name: "libubsan",
-    host_supported: true,
-
-    include_dirs: ubsan_rtl_c_includes,
-    cflags: ubsan_rtl_cflags,
-    cppflags: ubsan_rtl_cppflags,
-    srcs: ubsan_rtl_files,
-    sdk_version: "19",
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-    target: {
-        host: {
-            cflags: ["-fno-rtti"],
-        },
-    },
-}
-
-cc_library_static {
-    name: "libubsan_cxx",
-    host_supported: true,
-
-    include_dirs: ubsan_rtl_c_includes,
-    cflags: ubsan_rtl_cflags,
-    cppflags: ubsan_rtl_cppflags,
-    rtti: true,
-    srcs: ubsan_cxx_rtl_files,
-    sdk_version: "19",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-}
-
-cc_defaults {
-    name: "libclang_rt_ubsan_defaults",
-
-    include_dirs: [
-        "external/compiler-rt/lib",
-        "external/compiler-rt/include",
-    ],
-    static_libs: [
-        "libsan",
-    ],
-    whole_static_libs: [
-        "libubsan",
-        "libubsan_cxx",
-    ],
-    shared_libs: [
-        "liblog",
-        "libdl",
-    ],
-    sanitize: {
-        never: true,
-    },
-    // _cxx bits (vptr-sanitizer and cfi) need dynamic_cast<>
-    stl: "c++_static",
-    sdk_version: "19",
-    enabled: false,
-}
-
-// Disable libubsan_standalone prebuilts in aosp/master until soong has a build
-// option to pick a prebuilt or compile/build a module.
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-arm-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         arm: {
-//             enabled: true,
-//         },
-//     },
-// }
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-aarch64-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         arm64: {
-//             enabled: true,
-//         },
-//     },
-// }
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-i686-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         x86: {
-//             enabled: true,
-//         },
-//     },
-// }
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-x86_64-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         x86_64: {
-//             enabled: true,
-//         },
-//     },
-// }
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-mips-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         mips: {
-//             enabled: true,
-//         },
-//     },
-// }
-//
-// cc_library_shared {
-//     name: "libclang_rt.ubsan_standalone-mips64-android",
-//     defaults: ["libclang_rt_ubsan_defaults"],
-//     arch: {
-//         mips64: {
-//             enabled: true,
-//         },
-//     },
-// }
-
-//###############################################################################
-// Host modules
-
-cc_library_host_static {
-    name: "libubsan_standalone",
-
-    include_dirs: ubsan_rtl_c_includes,
-    cflags: ubsan_rtl_cflags,
-    cppflags: ubsan_rtl_cppflags + ["-fno-rtti"],
-    srcs: ubsan_rtl_files,
-    whole_static_libs: ["libsan"],
-    stl: "none",
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
-cc_library_host_static {
-    name: "libubsan_standalone_cxx",
-
-    include_dirs: ubsan_rtl_c_includes,
-    cflags: ubsan_rtl_cflags,
-    cppflags: ubsan_rtl_cppflags,
-    srcs: ubsan_cxx_rtl_files,
-    sanitize: {
-        never: true,
-    },
-    compile_multilib: "both",
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-}