From 6c13b72f15785b0e698520df5f1023aae93b5203 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Fri, 11 Sep 2020 21:24:03 -0700 Subject: [PATCH] Ignore -C codegen-units flag Test: regenerate .bp files in external/rust/crates/* Change-Id: I023b0b035d50db9eb7c7462d21beba9b95078378 --- scripts/cargo2android.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index 6af3cde95..40d023022 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -370,7 +370,9 @@ class Crate(object): # ignore options not used in Android # 'prefer-dynamic' does not work with common flag -C lto # 'embed-bitcode' is ignored; we might control LTO with other .bp flag - if not (flag.startswith('debuginfo=') or + # 'codegen-units' is set in Android global config or by default + if not (flag.startswith('codegen-units=') or + flag.startswith('debuginfo=') or flag.startswith('embed-bitcode=') or flag.startswith('extra-filename=') or flag.startswith('incremental=') or