Commit c5abaa38 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Fix native partitions in non-component debug builds

lld's partitions logic requires -fdata-sections, -ffunction-sections,
and --gc-sections. For debug non-component builds, --gc-sections
was missing.

Bug: 1055945
Change-Id: Iac21d90f4158cae1c392c37f9fd4e5d8be9d5f0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2233690
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776217}
parent 06a48faf
......@@ -2023,6 +2023,12 @@ config("no_optimize") {
} else {
cflags = [ "-Os" ] + common_optimize_on_cflags
}
if (!is_component_build) {
# Required for library partitions. Without this all symbols just end up
# in the base partition.
ldflags = [ "-Wl,--gc-sections" ]
}
} else if (is_fuchsia) {
# On Fuchsia, we optimize for size here to reduce the size of debug build
# packages so they can be run in a KVM. See crbug.com/910243 for details.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment