summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp38
1 files changed, 34 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index ab434843..98b2eee7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -40,6 +40,13 @@ cc_defaults {
//// libcrypto
+// This should be removed when clang can compile everything.
+libcrypto_sources_no_clang = [
+ "linux-arm/crypto/aes/aes-armv4.S",
+ "linux-arm/crypto/aes/bsaes-armv7.S",
+ "linux-arm/crypto/sha/sha256-armv4.S",
+]
+
cc_defaults {
name: "libcrypto_defaults",
host_supported: true,
@@ -61,15 +68,15 @@ cc_defaults {
local_include_dirs: ["src/crypto"],
- // sha256-armv4.S does not compile with clang.
arch: {
- arm: {
- clang_asflags: ["-no-integrated-as"],
- },
arm64: {
clang_asflags: ["-march=armv8-a+crypto"],
},
},
+
+ // This should be removed when clang can compile everything.
+ exclude_srcs: libcrypto_sources_no_clang,
+ whole_static_libs: ["libcrypto_no_clang"],
}
// Target and host library
@@ -79,6 +86,29 @@ cc_library {
unique_host_soname: true,
}
+// Target and host library: files that don't compile with clang. This should
+// go away when clang can compile everything with integrated assembler.
+cc_library_static {
+ name: "libcrypto_no_clang",
+ defaults: ["boringssl_defaults", "boringssl_flags"],
+ host_supported: true,
+
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+
+ local_include_dirs: ["src/crypto"],
+
+ arch: {
+ arm: {
+ clang_asflags: ["-no-integrated-as"],
+ srcs: libcrypto_sources_no_clang,
+ },
+ },
+}
+
// Static library
// This should only be used for host modules that will be in a JVM, all other
// modules should use the static variant of libcrypto.