Add "no-proguard-location-reference" flag to aapt2
This fixes relocatability issues with the code shrinkers.
Bug: 144529940
Test: None
Change-Id: I65e08e850193e67dcdf4c533d9e66332714f0c8c
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index 99a686b..4555caa 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -1297,7 +1297,8 @@
return false;
}
- proguard::WriteKeepSet(keep_set, &fout, options_.generate_minimal_proguard_rules);
+ proguard::WriteKeepSet(keep_set, &fout, options_.generate_minimal_proguard_rules,
+ options_.no_proguard_location_reference);
fout.Flush();
if (fout.HadError()) {