aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-04-08 19:57:59 +0000
committerElliott Hughes <enh@google.com>2024-04-08 19:57:59 +0000
commitc5acbd0bdb3e407a1ce1a4857ac5e88032c9deb4 (patch)
treec3625e43ca667c1b761ebce1ee7e67971d900708
parent956d6939bf93f762c20c3e07e75398b9487403a9 (diff)
downloadxz-embedded-c5acbd0bdb3e407a1ce1a4857ac5e88032c9deb4.tar.gz
Disable BCJ filters.
It's just a coincidence that we happened to wonder about these just before the recent https://en.wikipedia.org/wiki/XZ_Utils_backdoor incident, and the results came in just after! Extra code we don't need, and extra runtime that doesn't win us any size benefits --- it would be embarrassing to feel compelled to do the riscv64 work for "feature parity" with a useless feature... Bug: http://b/329112384 Change-Id: If258d57ab8a860ede52eb124e04434ba647734aa
-rw-r--r--Android.bp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index f9f46a9..bc04048 100644
--- a/Android.bp
+++ b/Android.bp
@@ -29,12 +29,12 @@ cc_library_static {
],
local_include_dirs: ["userspace"],
- // Enable branch/call/jump filters. See http://b/27817327.
+ // We don't enable branch/call/jump filters because they have no impact on
+ // Android OTA sizes (measured in http://b/329112384). The frequent
+ // function calls this is supposed to optimize will all go via the PLT, so
+ // the actual branch/call/jump instructions in the ELF file will be zeroed
+ // out anyway.
cflags: [
- "-DXZ_DEC_X86",
- "-DXZ_DEC_ARM",
- "-DXZ_DEC_ARM64",
- "-DXZ_DEC_ARMTHUMB",
"-Wall",
"-Werror",
],