Index: chrome/BUILD.gn |
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn |
index d741423927b7be6f43066f886ab28e632f22942b..b7481faad874330641d2ddae8373603c5b302f2f 100644 |
--- a/chrome/BUILD.gn |
+++ b/chrome/BUILD.gn |
@@ -962,8 +962,14 @@ if (is_android) { |
] |
} |
+ # Some android targets still depend on --gc-sections to link. |
+ # TODO: remove --gc-sections for Debug builds (crbug.com/159847). |
+ config("gc_sections") { |
+ ldflags = [ "-Wl,--gc-sections" ] |
+ } |
+ |
# GYP: //chrome/chrome_android.gypi:chrome_android_core |
- static_library("chrome_android_core") { |
+ source_set("chrome_android_core") { |
sources = [ |
"app/android/chrome_android_initializer.cc", |
"app/android/chrome_android_initializer.h", |
@@ -974,6 +980,7 @@ if (is_android) { |
"app/chrome_main_delegate.cc", |
"app/chrome_main_delegate.h", |
] |
+ public_configs = [ ":gc_sections" ] |
include_dirs = [ android_ndk_include_dir ] |