Disable LTO for cc libraries passed to rustc
Bug: http://b/336916369
Having cross-language LTO adds additional constraints in the LLVM
version used by the rust and clang toolchain. Disable LTO until
cross-language LTO is supported.
Test: make libring with ToT clang
Change-Id: I30de670db2679f92d34bfb3e391dcafcb13a6d50
diff --git a/Android.bp b/Android.bp
index 14e9e8f..fdf384c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -612,6 +612,12 @@
vendor_available: true,
product_available: true,
min_sdk_version: "29",
+
+ // b/336916369: This library gets linked into a rust rlib. Disable LTO
+ // until cross-language lto is supported.
+ lto: {
+ never: true,
+ },
}
cc_library_static {
@@ -628,4 +634,10 @@
vendor_available: true,
product_available: true,
min_sdk_version: "29",
+
+ // b/336916369: This library gets linked into a rust rlib. Disable LTO
+ // until cross-language lto is supported.
+ lto: {
+ never: true,
+ },
}