Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 49a859ac5e1c54864790f9b82e191e45368dbce8..2d9564f3e1d1d47aa74c2a8fd8fa57da05c356e2 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -674,8 +674,18 @@ if (is_win) { |
"-fdata-sections", |
"-ffunction-sections", |
] |
- |
common_optimize_on_ldflags = [] |
+ |
+ if (is_android) { |
+ common_optimize_on_cflags += [ |
+ "-fomit-frame-pointer", |
+ ] |
+ common_optimize_on_ldflags += [ |
+ # Warn in case of text relocations. |
+ "-Wl,--warn-shared-textrel", |
+ ] |
+ } |
+ |
if (is_mac) { |
if (symbol_level == 2) { |
# Mac dead code stripping requires symbols. |