Merge "Move libLLVM prebuilt to Android.bp"
am: b847cccbd0
Change-Id: I3a38552ab010f95130314c0100c4e9b34b642b11
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..a47266b
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1 @@
+subdirs=["tools"]
diff --git a/tools/Android.bp b/tools/Android.bp
new file mode 100644
index 0000000..12df8c1
--- /dev/null
+++ b/tools/Android.bp
@@ -0,0 +1,19 @@
+cc_prebuilt_shared_library {
+ name: "libLLVM",
+ host_supported: true,
+ target: {
+ linux_x86_64: {
+ srcs: ["linux/lib64/libLLVM.so"],
+ },
+ darwin_x86_64: {
+ srcs: ["darwin/lib64/libLLVM.dylib"],
+ },
+ // TODO(ccross): this is necessary because the prebuilt module must have
+ // all the variants that are in the source module. Ideally Soong's
+ // arch mutator should handle this.
+ windows: {
+ enabled: true,
+ }
+ },
+ prefer: false,
+}
diff --git a/tools/Android.mk b/tools/Android.mk
index 8f1a7a5..6adc7a3 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -334,18 +334,7 @@
# Only build Clang/LLVM components when forced to.
ifneq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libLLVM
-LOCAL_SRC_FILES := $(HOST_OS)/lib64/$(LOCAL_MODULE)$(HOST_SHLIB_SUFFIX)
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := $(HOST_SHLIB_SUFFIX)
-LOCAL_IS_HOST_MODULE := true
-LOCAL_MULTILIB := 64
-
-include $(BUILD_PREBUILT)
+# libLLVM is defined in Android.bp
##################################
include $(CLEAR_VARS)